mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
26744: completion of history modifiers in normal command line arguments
This commit is contained in:
parent
14e7096982
commit
b0fde52d53
2 changed files with 19 additions and 1 deletions
|
@ -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>
|
2009-03-15 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* users/13937, users/13939: configure.ac, Src/jobs.c: check for
|
* 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
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.4619 $
|
* $Revision: 1.4620 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -9,6 +9,19 @@ else
|
||||||
_compskip=''
|
_compskip=''
|
||||||
fi
|
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?
|
# Completing in command position?
|
||||||
|
|
||||||
if [[ CURRENT -eq 1 ]]; then
|
if [[ CURRENT -eq 1 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue