[linux-l] Kommandozeile editieren
Sven Guckes
maillist-belug at guckes.net
Sa Jun 30 15:58:05 CEST 2007
* Mike Dornberger <Mike.Dornberger at gmx.de> [2007-06-30 15:47]:
> On Sat, Jun 30, 2007 at 01:02:47AM +0200, Steffen Dettmer wrote:
> > Wenn ich so'n Kram in einer Shell brauche, nehme ich einfach "fc".
>
> hey, super, das Built-In muß mir bisher entgangen sein. :-)
da gibt es noch einige mehr.. ;)
> Wenn man screen nutzt und dessen Escape-Sequenz
> bei der Standard-Einstellung beläßt, müßte man ja
> C-A a tippen, um auf der Shell das C-A zu bekommen.
man kann ja auch CTRL-O fuer kommandos an screen benutzen:
:escape ^oo
> Da finde ich es einfacher Meta-# bzw. ESC #
> zu benutzen, spart einem außerdem das Enter. ;-)
$ man bash
/m-#
insert-comment (M-#)
Without a numeric argument, the value of the readline
comment-begin variable is inserted at the beginning of
the current line. If a numeric argument is supplied,
this command acts as a toggle: if the characters at
the beginning of the line do not match the value of
comment-begin, the value is inserted, otherwise the
characters in comment-begin are deleted from the
beginning of the line. In either case, the line is
accepted as if a newline had been typed. The default
value of comment-begin causes this command to make
the current line a shell comment. If a numeric
argument causes the comment character to be
removed, the line will be executed by the shell.
naja... da finde ich die interne funktion push-line bei
der zsh besser: die eingabe wird komplett geloescht - und
nach ausfueherung des naechsten kommandos wird die geloeschte
eingabe automatisch wieder in die eingabezeile gegeben, so dass
man an der stelle weitermachen kann, an der man vorher war.
und es braucht dafuer keine kommentierte zeile in der history. ;)
Sven
Mehr Informationen über die Mailingliste linux-l