bug-bash
[Top][All Lists]
Advanced

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

[patch] enabling vi-style completion in posix mode


From: Dick Streefland
Subject: [patch] enabling vi-style completion in posix mode
Date: Fri, 8 Mar 2002 19:03:20 +0100
User-agent: Mutt/1.2.5i

Hi,

The patch for bash-2.05a below removes a posix_readline_initialize()
call, which I think is superfluous. This function is already called
earlier from sv_strict_posix(). The second call makes it impossible to
enable vi-style completion in your ~/.inputrc file when the shell is
started in posix mode.

When the shell is started as /bin/sh, it will run in posix mode. This
means that when vi-style commandline editing is selected, TAB will be
bound to self-insert, because that is a POSIX requirement. Overruling
this behavior by adding a "TAB: complete" line to your ~/.inputrc file
doesn't work, because this binding is overruled again by the second
call to posix_readline_initialize(). The patch below shouldn't change
the default behavior, but makes it possible to use vi-style completion
(I can't live without it) in posix mode.

--- bashline.c.orig     Mon Nov  5 18:58:59 2001
+++ bashline.c  Mon Mar  4 00:15:57 2002
@@ -377,10 +380,10 @@
   rl_filename_quoting_function = bash_quote_filename;
   rl_filename_dequoting_function = bash_dequote_filename;
   rl_char_is_quoted_p = char_is_quoted;
-
+#if 0 /* already called from sv_strict_posix() */
   if (posixly_correct)
     posix_readline_initialize (1);
-
+#endif
   bash_readline_initialized = 1;
 }
 
-- 
Dick Streefland                      ////             Altium Software BV
address@hidden           (@ @)          http://www.altium.com
--------------------------------oOO--(_)--OOo---------------------------



reply via email to

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