1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

26744: completion of history modifiers in normal command line arguments

This commit is contained in:
Peter Stephenson 2009-03-16 18:29:38 +00:00
parent 14e7096982
commit b0fde52d53
2 changed files with 19 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2009-03-16 Peter Stephenson <pws@csr.com>
* 26744: Completion/Zsh/Context/_normal: handle completion
of history modifiers for normal command line arguments.
2009-03-15 Barton E. Schaefer <schaefer@zsh.org>
* users/13937, users/13939: configure.ac, Src/jobs.c: check for
@ -11421,5 +11426,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.4619 $
* $Revision: 1.4620 $
*****************************************************

View file

@ -9,6 +9,19 @@ else
_compskip=''
fi
# Check for a history reference to complete modifiers.
# $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
# This looks like a real history expansion; in that case
# we'd better put the !'s back the way pfalstad intended.
PREFIX=${PREFIX//\\!/!}
compset -P '*:'
_history_modifiers h
return
fi
# Completing in command position?
if [[ CURRENT -eq 1 ]]; then