diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Linux/Command/_opkg | 14 | ||||
-rw-r--r-- | Completion/Unix/Type/_path_files | 5 | ||||
-rw-r--r-- | Completion/Zsh/Context/_brace_parameter | 1 |
3 files changed, 16 insertions, 4 deletions
diff --git a/Completion/Linux/Command/_opkg b/Completion/Linux/Command/_opkg index d64567681..ddaefe1eb 100644 --- a/Completion/Linux/Command/_opkg +++ b/Completion/Linux/Command/_opkg @@ -35,6 +35,10 @@ # % zstyle ':completion:*:opkg:*' conf-paths <pattern> ... # Set to one or more paths or glob patterns to override the defaults used when # searching opkg configuration data. +# +# Elevated privileges may be necessary to complete package names, etc.; consider +# setting the gain-privileges style as follows: +# zstyle ':completion:*:(ipkg|opkg)/*' gain-privileges yes ## # Check cache validity. @@ -105,7 +109,7 @@ _opkg_arch_prio() { } # Already configured arches - tmp=( ${(f)"$( _call_program architectures $svc print-architecture )"} ) + tmp=( ${(f)"$( _call_program -p architectures $svc print-architecture )"} ) tmp=( ${${tmp##arch[ ]##}%% *} ) tmp+=( @@ -182,7 +186,9 @@ _opkg_pkg_all() { { (( ! $#_opkg_cache_pkg_all )) || _cache_invalid opkg-pkg-all } && ! _retrieve_cache opkg-pkg-all && { - _opkg_cache_pkg_all=( ${(f)"$( _call_program pkg-all ${svc:-opkg} list )"} ) + _opkg_cache_pkg_all=( ${(f)"$( + _call_program -p pkg-all ${svc:-opkg} list )"} + ) _opkg_cache_pkg_all=( ${(@)_opkg_cache_pkg_all##[[:space:]]*} ) _opkg_cache_pkg_all=( ${(@)_opkg_cache_pkg_all%%[[:space:]]*} ) _store_cache opkg-pkg-all _opkg_cache_pkg_all @@ -207,7 +213,7 @@ _opkg_pkg_inst() { { (( ! $#_opkg_cache_pkg_inst )) || _cache_invalid opkg-pkg-inst } && ! _retrieve_cache opkg-pkg-inst && { _opkg_cache_pkg_inst=( ${(f)"$( - _call_program pkg-inst ${svc:-opkg} list-installed + _call_program -p pkg-inst ${svc:-opkg} list-installed )"} ) _opkg_cache_pkg_inst=( ${(@)_opkg_cache_pkg_inst##[[:space:]]*} ) _opkg_cache_pkg_inst=( ${(@)_opkg_cache_pkg_inst%%[[:space:]]*} ) @@ -257,7 +263,7 @@ _opkg_pkg_upgr() { { (( ! $#_opkg_cache_pkg_upgr )) || _cache_invalid opkg-pkg-upgr } && ! _retrieve_cache opkg-pkg-upgr && { _opkg_cache_pkg_upgr=( ${(f)"$( - _call_program pkg-upgr ${svc:-opkg} list-upgradable + _call_program -p pkg-upgr ${svc:-opkg} list-upgradable )"} ) _opkg_cache_pkg_upgr=( ${(@)_opkg_cache_pkg_upgr##[[:space:]]*} ) _opkg_cache_pkg_upgr=( ${(@)_opkg_cache_pkg_upgr%%[[:space:]]*} ) diff --git a/Completion/Unix/Type/_path_files b/Completion/Unix/Type/_path_files index 9fa6ae9fc..1021c34e6 100644 --- a/Completion/Unix/Type/_path_files +++ b/Completion/Unix/Type/_path_files @@ -2,6 +2,11 @@ local -a match mbegin mend +local splitchars +if zstyle -s ":completion:${curcontext}:" file-split-chars splitchars; then + compset -P "*[${(q)splitchars}]" +fi + # Look for glob qualifiers. Do this first: if we're really # in a glob qualifier, we don't actually want to expand # the earlier part of the path. We can't expand inside diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter index 5b70ab0ca..a9ab44efd 100644 --- a/Completion/Zsh/Context/_brace_parameter +++ b/Completion/Zsh/Context/_brace_parameter @@ -119,6 +119,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then flags+=( "q:quote with single quotes" "-:quote minimally for readability" + "+:quote like q-, plus \$'...' for unprintable characters" ) ;; |