[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
set -o vi needs '\' completion command (Modified by Len Lattanzi)
From: |
llattanzi+bash |
Subject: |
set -o vi needs '\' completion command (Modified by Len Lattanzi) |
Date: |
Tue, 22 Jun 2004 08:46:15 -0700 (PDT) |
Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp
-arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc'
-DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0'
-DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I.
-I/SourceCache/bash/bash-30/bash
-I/SourceCache/bash/bash-30/bash/include
-I/SourceCache/bash/bash-30/bash/lib -arch i386 -arch ppc -g -Os -pipe
-no-cpp-precomp -arch i386 -arch ppc -pipe
uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version
8.0.0b1: Mon May 10 23:45:14 PDT 2004;
root:xnu/xnu-600.3.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
vi mode command '\' should complete the partial filename
Repeat-By:
touch file file1
set -o vi
echo fil<ESC>\ #Should complete upto 'file'
Fix:
Index: bash/bashline.c
===================================================================
RCS file: /cvs/root/bash/bash/bashline.c,v
retrieving revision 1.2
diff -u -d -b -w -r1.2 bashline.c
--- bashline.c 2003/04/05 09:36:38 1.2
+++ bashline.c 2004/06/22 15:42:33
@@ -381,6 +381,8 @@
rl_bind_key_in_map (CTRL ('E'), emacs_edit_and_execute_command,
emacs_ctlx_keymap);
#if defined (VI_MODE)
rl_bind_key_in_map ('v', vi_edit_and_execute_command,
vi_movement_keymap);
+ if (posixly_correct)
+ rl_bind_key_in_map ('\\', bash_glob_complete_word,
vi_movement_keymap);
# if defined (ALIAS)
rl_bind_key_in_map ('@', posix_edit_macros, vi_movement_keymap);
# endif
@@ -2454,6 +2456,8 @@
rl_quote_func_t *orig_quoting_function;
rl_explicit_arg = 1; /* force `*' append */
+ if ((rl_editing_mode == VI_EDITING_MODE) && (rl_point == rl_end - 1))
+ rl_point++; /* Behave like emacs mode */
orig_quoting_function = rl_filename_quoting_function;
rl_filename_quoting_function = bash_glob_quote_filename;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- set -o vi needs '\' completion command (Modified by Len Lattanzi),
llattanzi+bash <=