mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
zsh-completion: strip out u'' unicode __repr__ of function names
The elements in the array returned by sys.list_{,runners_}functions recently started to be enclosed by u'' so when the completer parses salt-call --local --out txt sys.$func, the incorrect module is presented.
This commit is contained in:
parent
4555497583
commit
10eb4fb343
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ _modules(){
|
|||
fi
|
||||
|
||||
if _cache_invalid salt/modules || ! _retrieve_cache salt/modules; then
|
||||
_funcs=( ${${(Q)${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_functions)"}%%[],]##}#\[}:#local:} )
|
||||
_funcs=( ${${(Q)${${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_functions)"}%%[],]##}#\[#u}#\[}:#local:} )
|
||||
_store_cache salt/modules _funcs
|
||||
fi
|
||||
|
||||
|
@ -40,7 +40,7 @@ _runners(){
|
|||
fi
|
||||
|
||||
if _cache_invalid salt/runners || ! _retrieve_cache salt/runners; then
|
||||
_runs=( ${${(Q)${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_runner_functions)"}%%[],]##}#\[}:#local:} )
|
||||
_runs=( ${${(Q)${${${(s. .)"$(_call_program salt-call-cmd salt-call --local --log-level error --out txt sys.list_runner_functions)"}%%[],]##}#\[#u}#\[}:#local:} )
|
||||
_store_cache salt/runners _runs
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue