Allow for completion of aliases

Turns out that removing the quotes from the associate array
'aliashash' is still required, but because it is needed for
completion of alias commands.  For example
  helm dep <TAB>
does not complete as expected (as if it was 'helm dependency')
if the quotes are not removed.

This is because although bash ignores quotes when using
associative arrays, zsh does not.  So when looking for an alias
  aliashash[dep]
will not match the entry
  aliashash["dep"]
in zsh but will for bash.  Therefore, removing the quotes fixes
things.

Signed-off-by: Marc Khouzam <marc.khouzam@ville.montreal.qc.ca>
pull/5680/head
Marc Khouzam 6 years ago
parent 0239cc4457
commit 48f0e3101d

@ -205,6 +205,7 @@ __helm_convert_bash_to_zsh() {
-e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \ -e "s/${LWORD}compopt${RWORD}/__helm_compopt/g" \
-e "s/${LWORD}declare${RWORD}/builtin declare/g" \ -e "s/${LWORD}declare${RWORD}/builtin declare/g" \
-e "s/\\\$(type${RWORD}/\$(__helm_type/g" \ -e "s/\\\$(type${RWORD}/\$(__helm_type/g" \
-e 's/aliashash\["\(.\{1,\}\)"\]/aliashash[\1]/g' \
-e 's/FUNCNAME/funcstack/g' \ -e 's/FUNCNAME/funcstack/g' \
<<'BASH_COMPLETION_EOF' <<'BASH_COMPLETION_EOF'
` `

Loading…
Cancel
Save