Hallo Am Donnerstag, 25. Februar 2010 schrieb David Haller (und Christian Brabandt):
Hallo,
Am Mit, 24 Feb 2010, Christian Brabandt schrieb:
On Mi, 24 Feb 2010, Matthias Müller wrote:
Am Mittwoch, 24. Februar 2010 schrieb David Haller:
set -o vi
(bzw. 'set -o emacs' zum abstellen).
^^ +o zum abstellen :-) Das muss(!) gemacht werden, sonst funzt der vi-Modus nicht richtig
Sicher? Dann auch 'set +o vi; set -o emacs' um zum emacs-mode zu kommen. Nein, weil: "This [emacs mode] is enabled by default when the shell is interactive, unless the shell is started with the --noediting option." Nur dann, wenn vi mode an war.
Shell? #v+ chrisbra@t41:~$ help set |grep -- '-o\|emacs\|vi ' set: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...] -o option-name emacs use an emacs-style line editing interface vi use a vi-style line editing interface chrisbra@t41:~$ echo $BASH_VERSION 4.0.33(1)-release #v-
Und in bash 3 war das IIRC auch schon so.
Was heißt da bash3?
$ $0 --version GNU bash, version 2.03.0(1)-release (i386-suse-linux) Copyright 1998 Free Software Foundation, Inc. $ help set | egrep 'emacs|vi |-o' set: set [--abefhkmnptuvxBCHP] [-o option] [arg ...] -o option-name emacs use an emacs-style line editing interface vi use a vi-style line editing interface
^^^ "benutze/verwende" nicht "schalte um von ... nach ...">
*scnr*,
matthias@alien:~$ help set | grep + Using + rather than - causes these flags to be turned off. The matthias@alien:~$ Dann vollständig aus man bash: The options are off by default unless otherwise noted. Using + rather than - causes these options to be turned off. The options can also be specified as arguments to an invocation of the shell. The current set of options may be found in $-. The return status is always true unless an invalid option is encountered. btw "set -o x" schaltet ja tracing ein, ganz nützlich, wenn man ksh/bash Scripte entwickelt. Das kann man dann zu jeder Zeit mit "set +o x" wieder ausschalten, wenn man Programmcode durchläuft, der nicht überwacht werden muss, weil bereits entwanzt. "set -o emacs" schaltet emacs mode ein, genau so wie ein "set -o vi" vi mode einschaltet. Einer von beiden muss aus sein, damit der andere richtig funktioniert. jm2c -- Mit freundlichen Grüßen Matthias Müller (Benutzer #439779 im Linux-Counter http://counter.li.org) PS: Bitte senden Sie als Antwort auf meine E-Mails reine Text-Nachrichten!