[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

edit-and-execute-command is appropriately named, weird

From: David Thomas
Subject: edit-and-execute-command is appropriately named, weird
Date: Mon, 23 May 2011 10:05:12 -0700

Hi all,

In using bash over the years, I've been quite happy to be able to hit
ctrl-x ctrl-e to pull up an editor when my input has grown too

When using read -e for input, however, the behavior I find makes a lot
less sense: the input line is still opened in an editor, but the
result is not processed by read - it is executed by bash.  While a
means to escape to the shell can certainly be useful it seems like it
should generally be done in a more controlled environment.  It is much
harder to reason about my scripts when arbitrary variables might be
overwritten just because I asked for input.  In any case I'm not sure
it makes sense to conflate this with the "open this line in an editor"

I'm curious as to the reasoning was behind this behavior (if it was
intentional), and whether I'm likely to break anything if I "fix" it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]