From 079540cc7859ad73c0ccfb6db8ad3aa138037925 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 20 Feb 2014 01:11:28 +0100 Subject: users/18485: add .. as an auto-removable suffix in git revision ranges --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 6827f5ec0..f9e7f1690 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-02-24 Oliver Kiddle + + * users/18485: Completion/Unix/Command/_git: add .. as an + auto-removable suffix in git revision ranges + 2014-02-24 Peter Stephenson * Sebastien Alaiwan: 32462: Completion/Unix/Command/_bzr: -- cgit 1.4.1 From 7c314132789aa2b7a571890eca06d3f1e22d0f0e Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 20 Feb 2014 14:54:58 +0100 Subject: users/18498: observe add-space style in _expand_alias so suffix can be disabled --- ChangeLog | 3 +++ Completion/Base/Completer/_expand_alias | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index f9e7f1690..27b5e9a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-02-24 Oliver Kiddle + * users/18498: Completion/Base/Completer/_expand_alias: observe + add-space style in _expand_alias so suffix can be disabled + * users/18485: Completion/Unix/Command/_git: add .. as an auto-removable suffix in git revision ranges diff --git a/Completion/Base/Completer/_expand_alias b/Completion/Base/Completer/_expand_alias index 8848e668d..8240e4162 100644 --- a/Completion/Base/Completer/_expand_alias +++ b/Completion/Base/Completer/_expand_alias @@ -1,7 +1,7 @@ #compdef -K _expand_alias complete-word \C-xa local word expl tmp pre sel what -local -a tmpa +local -a tmpa suf eval "$_comp_setup" @@ -58,7 +58,8 @@ if [[ -n $tmp ]]; then tmp="\\$tmp" fi fi - $pre _wanted aliases expl alias compadd -UQ -- ${tmp%%[[:blank:]]##} + zstyle -T ":completion:${curcontext}:" add-space || suf=( -S '' ) + $pre _wanted aliases expl alias compadd -UQ "$suf[@]" -- ${tmp%%[[:blank:]]##} elif (( $#pre )) && zstyle -t ":completion:${curcontext}:" complete; then $pre _aliases -s "$sel" -S '' else -- cgit 1.4.1 From 39717411aeb4f72b772d97eeff3f9c1ecf48aae6 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 25 Feb 2014 09:14:21 +0100 Subject: unposted: duplicate local statement was printing variable value --- ChangeLog | 3 +++ Completion/X/Command/_x_utils | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 27b5e9a80..5f73fdb57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-02-24 Oliver Kiddle + * unposted: Completion/X/Command/_x_utils: duplicate local + statement was printing variable value + * users/18498: Completion/Base/Completer/_expand_alias: observe add-space style in _expand_alias so suffix can be disabled diff --git a/Completion/X/Command/_x_utils b/Completion/X/Command/_x_utils index 0ff0cf268..9448fd3df 100644 --- a/Completion/X/Command/_x_utils +++ b/Completion/X/Command/_x_utils @@ -69,7 +69,7 @@ xev) '-rv' ;; xhost) - local expl type ret=1 tmp match + local type tmp match if compset -P '-'; then tmp=(${(f)"$(xhost)"}) -- cgit 1.4.1 From 4149d0ab3e770b4e28b447ecbe6a6b77cecf46dd Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 25 Feb 2014 09:17:26 +0100 Subject: unposted: fix typo in documentation --- ChangeLog | 2 ++ Doc/Zsh/compsys.yo | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5f73fdb57..18c866aa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-02-24 Oliver Kiddle + * unposted: Doc/Zsh/compsys.yo: fix typo + * unposted: Completion/X/Command/_x_utils: duplicate local statement was printing variable value diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index 6f1917d36..c304461e2 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -2344,7 +2344,7 @@ This is used by the tt(_history) completer and the tt(_history_complete_word) bindable command to decide which words should be completed. -If it is a singe number, only the last var(N) words from the history +If it is a single number, only the last var(N) words from the history will be completed. If it is a range of the form `var(max)tt(:)var(slice)', -- cgit 1.4.1 From 7d7242405a82332716b5fdba68f32ecabf6349be Mon Sep 17 00:00:00 2001 From: Jun T Date: Thu, 27 Feb 2014 01:32:32 +0900 Subject: 32435: improved quoting for ignore-line completion style --- ChangeLog | 6 ++++++ Completion/Base/Core/_description | 16 +++++++++------- Completion/Unix/Command/_rm | 10 +++------- 3 files changed, 18 insertions(+), 14 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 18c866aa2..e36b1b770 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-02-26 Peter Stephenson + + * Jun T: Completion/Base/Core/_description, + Completion/Unix/Command/_rm: improved quoting for ignore-line + style. + 2014-02-24 Oliver Kiddle * unposted: Doc/Zsh/compsys.yo: fix typo diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description index 3d993271c..304c747a6 100644 --- a/Completion/Base/Core/_description +++ b/Completion/Base/Core/_description @@ -47,17 +47,19 @@ if [[ -z "$_comp_no_ignore" ]]; then zstyle -a ":completion:${curcontext}:$1" ignored-patterns _comp_ignore || _comp_ignore=() - zstyle -s ":completion:${curcontext}:$1" ignore-line hidden && + if zstyle -s ":completion:${curcontext}:$1" ignore-line hidden; then + local -a qwords + qwords=( ${words//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} ) case "$hidden" in - true|yes|on|1) _comp_ignore=( "$_comp_ignore[@]" ${(q)"${words[@]}"} );; - current) _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );; + true|yes|on|1) _comp_ignore+=( $qwords );; + current) _comp_ignore+=( $qwords[CURRENT] );; current-shown) [[ "$compstate[old_list]" = *shown* ]] && - _comp_ignore=( "$_comp_ignore[@]" "${(q)words[CURRENT]}" );; - other) _comp_ignore=( "$_comp_ignore[@]" - "${(@q)words[1,CURRENT-1]}" - "${(@q)words[CURRENT+1,-1]}" );; + _comp_ignore+=( $qwords[CURRENT] );; + other) _comp_ignore+=( $qwords[1,CURRENT-1] + $qwords[CURRENT+1,-1] );; esac + fi # Ensure the ignore option is first so we can override it # for fake-always. diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 20f44afc5..1f156c481 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -32,13 +32,9 @@ _arguments -C $opts \ case $state in (file) - declare -a ignored - ignored=() - ((CURRENT > 1)) && - ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) - ((CURRENT < $#line)) && - ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH}) - _files -F ignored && ret=0 + line[CURRENT]=() + line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} ) + _files -F line && ret=0 ;; esac -- cgit 1.4.1