diff --git a/misc/completion/fish/hpi.fish b/misc/completion/fish/hpi.fish index e8a8e561..23abca90 100644 --- a/misc/completion/fish/hpi.fish +++ b/misc/completion/fish/hpi.fish @@ -1,9 +1,5 @@ function _hpi_completion; - set -l response; - - for value in (env _HPI_COMPLETE=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) hpi); - set response $response $value; - end; + set -l response (env _HPI_COMPLETE=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) hpi); for completion in $response; set -l metadata (string split "," $completion); diff --git a/misc/completion/zsh/_hpi b/misc/completion/zsh/_hpi index 95190b00..805f564e 100644 --- a/misc/completion/zsh/_hpi +++ b/misc/completion/zsh/_hpi @@ -31,5 +31,11 @@ _hpi_completion() { fi } -compdef _hpi_completion hpi; +if [[ $zsh_eval_context[-1] == loadautofunc ]]; then + # autoload from fpath, call function directly + _hpi_completion "$@" +else + # eval/source/. command, register function for later + compdef _hpi_completion hpi +fi diff --git a/setup.py b/setup.py index 5a4f75b5..ee4c2f0a 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ 'appdirs', # very common, and makes it portable 'more-itertools', # it's just too useful and very common anyway 'decorator' , # less pain in writing correct decorators. very mature and stable, so worth keeping in core - 'click>=8.0' , # for the CLI, printing colors, decorator-based - may allow extensions to CLI + 'click>=8.1' , # for the CLI, printing colors, decorator-based - may allow extensions to CLI ]