Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: 4.1: complete set of bash word functions + doc



Index: Doc/Zsh/contrib.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/contrib.yo,v
retrieving revision 1.10
diff -u -r1.10 contrib.yo
--- Doc/Zsh/contrib.yo	2001/03/17 22:30:11	1.10
+++ Doc/Zsh/contrib.yo	2001/07/06 13:18:13
@@ -362,6 +362,23 @@
 with a key sequence.  Suggested bindings are described below.
 
 startitem()
+tindex(bash-forward-word)
+tindex(bash-backward-word)
+tindex(bash-kill-word)
+tindex(bash-backward-kill-word)
+xitem(tt(bash-forward-word), tt(bash-backward-word))
+item(tt(bash-kill-word), tt(bash-backward-kill-word))(
+These work similarly to the corresponding builtin zle functions without the
+`tt(bash-)' prefix, but a word is considered to consist of alphanumeric
+characters only.  If you wish to replace your existing bindings with these
+four widgets, the following is sufficient:
+
+example(for widget in kill-word backward-kill-word \ 
+forward-word backward-word; do 
+  autoload bash-$widget 
+  zle -N $widget bash-$widget
+done)
+)
 tindex(cycle-completion-positions)
 item(tt(cycle-completion-positions))(
 After inserting an unambiguous string into the command line, the new
Index: Functions/Zle/bash-backward-kill-word
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Zle/bash-backward-kill-word,v
retrieving revision 1.1
diff -u -r1.1 bash-backward-kill-word
--- Functions/Zle/bash-backward-kill-word	2001/06/29 13:47:32	1.1
+++ Functions/Zle/bash-backward-kill-word	2001/07/06 13:18:13
@@ -1,8 +1,9 @@
-# function bash-backward-kill-word {
 # This implements a bash-style backward-kill-word.
 # To use,
 #   zle -N bash-backward-kill-word
 #   bindkey '...' bash-backward-kill-word
+# or if you wish to replace existing backward-kill-word bindings,
+#   zle -N backward-kill-word bash-backward-kill-word
+
 local WORDCHARS=''
 zle .backward-kill-word
-# }
Index: Functions/Zle/bash-backward-word
===================================================================
RCS file: bash-backward-word
diff -N bash-backward-word
--- /dev/null	Thu May 24 22:33:05 2001
+++ bash-backward-word	Fri Jul  6 06:18:13 2001
@@ -0,0 +1,9 @@
+# This implements a bash-style backward-word.
+# To use,
+#   zle -N bash-backward-word
+#   bindkey '...' bash-backward-word
+# or if you wish to replace existing backward-word bindings,
+#   zle -N backward-word bash-backward-word
+
+local WORDCHARS=''
+zle .backward-word
Index: Functions/Zle/bash-forward-word
===================================================================
RCS file: bash-forward-word
diff -N bash-forward-word
--- /dev/null	Thu May 24 22:33:05 2001
+++ bash-forward-word	Fri Jul  6 06:18:13 2001
@@ -0,0 +1,9 @@
+# This implements a bash-style forward-word.
+# To use,
+#   zle -N bash-forward-word
+#   bindkey '...' bash-forward-word
+# or if you wish to replace existing forward-word bindings,
+#   zle -N forward-word bash-forward-word
+
+local WORDCHARS=''
+zle .forward-word
Index: Functions/Zle/bash-kill-word
===================================================================
RCS file: bash-kill-word
diff -N bash-kill-word
--- /dev/null	Thu May 24 22:33:05 2001
+++ bash-kill-word	Fri Jul  6 06:18:13 2001
@@ -0,0 +1,9 @@
+# This implements a bash-style kill-word.
+# To use,
+#   zle -N bash-kill-word
+#   bindkey '...' bash-kill-word
+# or if you wish to replace existing kill-word bindings,
+#   zle -N kill-word bash-kill-word
+
+local WORDCHARS=''
+zle .kill-word

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author