diff --git a/docs/ahriman-architecture.svg b/docs/ahriman-architecture.svg index 97cd7de8..9f397395 100644 --- a/docs/ahriman-architecture.svg +++ b/docs/ahriman-architecture.svg @@ -1,7 +1,7 @@ - = \ - $current_action_nargs )); then - $current_action_is_positional && let "completed_positional_actions += 1" - _set_new_action "pos_${completed_positional_actions}" true + if [[ "$current_action_nargs" != "*" ]] && \ + [[ "$current_action_nargs" != "+" ]] && \ + [[ "$current_action_nargs" != *"..." ]] && \ + (( $word_index + 1 - $current_action_args_start_index - $pos_only >= \ + $current_action_nargs )); then + $current_action_is_positional && let "completed_positional_actions += 1" + _set_new_action "pos_${completed_positional_actions}" true + fi + else + pos_only=1 # "--" delimeter encountered fi let "word_index+=1" @@ -646,7 +651,7 @@ _shtab_ahriman() { # Generate the completions - if [[ "${completing_word}" == -* ]]; then + if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then # optional argument started: use option strings COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") ) else diff --git a/package/share/man/man1/ahriman.1 b/package/share/man/man1/ahriman.1 index 0d028ac1..2c6b821b 100644 --- a/package/share/man/man1/ahriman.1 +++ b/package/share/man/man1/ahriman.1 @@ -1,4 +1,4 @@ -.TH AHRIMAN "1" "2024\-02\-09" "ahriman" "Generated Python Manual" +.TH AHRIMAN "1" "2024\-04\-04" "ahriman" "Generated Python Manual" .SH NAME ahriman .SH SYNOPSIS diff --git a/package/share/zsh/site-functions/_ahriman b/package/share/zsh/site-functions/_ahriman index 5ebe47c9..eb2efb80 100644 --- a/package/share/zsh/site-functions/_ahriman +++ b/package/share/zsh/site-functions/_ahriman @@ -736,4 +736,12 @@ _shtab_ahriman() { typeset -A opt_args -_shtab_ahriman "$@" + +if [[ $zsh_eval_context[-1] == eval ]]; then + # eval/source/. command, register function for later + compdef _shtab_ahriman -N ahriman +else + # autoload from fpath, call function directly + _shtab_ahriman "$@" +fi + diff --git a/src/ahriman/__init__.py b/src/ahriman/__init__.py index 57434536..82b3e8fb 100644 --- a/src/ahriman/__init__.py +++ b/src/ahriman/__init__.py @@ -17,4 +17,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -__version__ = "2.13.4" +__version__ = "2.13.5"