about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-03-17 10:03:23 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-03-17 10:03:23 +0000
commit1d025a2bb97b24afee8421f475355b6219667858 (patch)
treef73521855ea2c9dbbfd70ba9ab16d676e974d273
parent02710fd70499b9918b5f5a2b0e53e51565ce0a50 (diff)
downloadzsh-1d025a2bb97b24afee8421f475355b6219667858.tar.gz
zsh-1d025a2bb97b24afee8421f475355b6219667858.tar.xz
zsh-1d025a2bb97b24afee8421f475355b6219667858.zip
26746: tweak history modifier completion
-rw-r--r--ChangeLog9
-rw-r--r--Completion/Base/Core/_normal4
-rw-r--r--Completion/Zsh/Type/_history_modifiers2
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7095336d9..048cbe790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-03-17  Peter Stephenson  <pws@csr.com>
+
+	* 26746: Completion/Zsh/Context/_normal,
+	Completion/Zsh/Type/_history_modifiers: complete new history
+	modifiers a and A and allow completion of history modifiers
+	at the start of double quotes.
+
 2009-03-16  Peter Stephenson  <pws@csr.com>
 
 	* 26744: Completion/Zsh/Context/_normal: handle completion
@@ -11426,5 +11433,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4620 $
+* $Revision: 1.4621 $
 *****************************************************
diff --git a/Completion/Base/Core/_normal b/Completion/Base/Core/_normal
index 6bdb8f09b..539b3781f 100644
--- a/Completion/Base/Core/_normal
+++ b/Completion/Base/Core/_normal
@@ -13,7 +13,9 @@ fi
 # $PREFIX has a quoted form of the !, so we can't test that
 # (it might the start of a real argument), but words has the
 # raw McCoy.
-if [[ -o BANG_HIST && $words[CURRENT] = \!*: && -z $compstate[quote] ]]; then
+if [[ -o BANG_HIST &&
+     ( ( $words[CURRENT] = \!*: && -z $compstate[quote] ) ||
+       ( $words[CURRENT] = \"\!*: && $compstate[all_quotes] = \" ) ) ]]; then
   # This looks like a real history expansion; in that case
   # we'd better put the !'s back the way pfalstad intended.
   PREFIX=${PREFIX//\\!/!}
diff --git a/Completion/Zsh/Type/_history_modifiers b/Completion/Zsh/Type/_history_modifiers
index 3d112e1e6..a97e38d20 100644
--- a/Completion/Zsh/Type/_history_modifiers
+++ b/Completion/Zsh/Type/_history_modifiers
@@ -64,6 +64,8 @@ while true; do
       )
     if (( ! global )); then
       list+=(
+	"a:absolute path"
+	"A:absolute path resolving symbolic links"
 	"g:globally apply s or &"
 	"h:head - strip trailing path element"
 	"t:tail - strip directories"