mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-28 09:17:17 +00:00
Release 2.13.5
This commit is contained in:
parent
99ca0cb2fd
commit
9819ed761e
@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Evgeniy Alekseev
|
# Maintainer: Evgeniy Alekseev
|
||||||
|
|
||||||
pkgname='ahriman'
|
pkgname='ahriman'
|
||||||
pkgver=2.13.4
|
pkgver=2.13.5
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="ArcH linux ReposItory MANager"
|
pkgdesc="ArcH linux ReposItory MANager"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
@ -584,7 +584,7 @@ _set_new_action() {
|
|||||||
current_action_nargs=1
|
current_action_nargs=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
current_action_args_start_index=$(( $word_index + 1 ))
|
current_action_args_start_index=$(( $word_index + 1 - $pos_only ))
|
||||||
|
|
||||||
current_action_is_positional=$2
|
current_action_is_positional=$2
|
||||||
}
|
}
|
||||||
@ -611,6 +611,7 @@ _shtab_ahriman() {
|
|||||||
|
|
||||||
local prefix=_shtab_ahriman
|
local prefix=_shtab_ahriman
|
||||||
local word_index=0
|
local word_index=0
|
||||||
|
local pos_only=0 # "--" delimeter not encountered yet
|
||||||
_set_parser_defaults
|
_set_parser_defaults
|
||||||
word_index=1
|
word_index=1
|
||||||
|
|
||||||
@ -619,26 +620,30 @@ _shtab_ahriman() {
|
|||||||
while [ $word_index -ne $COMP_CWORD ]; do
|
while [ $word_index -ne $COMP_CWORD ]; do
|
||||||
local this_word="${COMP_WORDS[$word_index]}"
|
local this_word="${COMP_WORDS[$word_index]}"
|
||||||
|
|
||||||
if [[ -n $sub_parsers && " ${sub_parsers[@]} " == *" ${this_word} "* ]]; then
|
if [[ $pos_only = 1 || " $this_word " != " -- " ]]; then
|
||||||
# valid subcommand: add it to the prefix & reset the current action
|
if [[ -n $sub_parsers && " ${sub_parsers[@]} " == *" ${this_word} "* ]]; then
|
||||||
prefix="${prefix}_$(_shtab_replace_nonword $this_word)"
|
# valid subcommand: add it to the prefix & reset the current action
|
||||||
_set_parser_defaults
|
prefix="${prefix}_$(_shtab_replace_nonword $this_word)"
|
||||||
fi
|
_set_parser_defaults
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ " ${current_option_strings[@]} " == *" ${this_word} "* ]]; then
|
if [[ " ${current_option_strings[@]} " == *" ${this_word} "* ]]; then
|
||||||
# a new action should be acquired (due to recognised option string or
|
# a new action should be acquired (due to recognised option string or
|
||||||
# no more input expected from current action);
|
# no more input expected from current action);
|
||||||
# the next positional action can fill in here
|
# the next positional action can fill in here
|
||||||
_set_new_action $this_word false
|
_set_new_action $this_word false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$current_action_nargs" != "*" ]] && \
|
if [[ "$current_action_nargs" != "*" ]] && \
|
||||||
[[ "$current_action_nargs" != "+" ]] && \
|
[[ "$current_action_nargs" != "+" ]] && \
|
||||||
[[ "$current_action_nargs" != *"..." ]] && \
|
[[ "$current_action_nargs" != *"..." ]] && \
|
||||||
(( $word_index + 1 - $current_action_args_start_index >= \
|
(( $word_index + 1 - $current_action_args_start_index - $pos_only >= \
|
||||||
$current_action_nargs )); then
|
$current_action_nargs )); then
|
||||||
$current_action_is_positional && let "completed_positional_actions += 1"
|
$current_action_is_positional && let "completed_positional_actions += 1"
|
||||||
_set_new_action "pos_${completed_positional_actions}" true
|
_set_new_action "pos_${completed_positional_actions}" true
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pos_only=1 # "--" delimeter encountered
|
||||||
fi
|
fi
|
||||||
|
|
||||||
let "word_index+=1"
|
let "word_index+=1"
|
||||||
@ -646,7 +651,7 @@ _shtab_ahriman() {
|
|||||||
|
|
||||||
# Generate the completions
|
# Generate the completions
|
||||||
|
|
||||||
if [[ "${completing_word}" == -* ]]; then
|
if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
|
||||||
# optional argument started: use option strings
|
# optional argument started: use option strings
|
||||||
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
|
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
|
||||||
else
|
else
|
||||||
|
@ -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
|
.SH NAME
|
||||||
ahriman
|
ahriman
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -736,4 +736,12 @@ _shtab_ahriman() {
|
|||||||
|
|
||||||
|
|
||||||
typeset -A opt_args
|
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
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
__version__ = "2.13.4"
|
__version__ = "2.13.5"
|
||||||
|
Loading…
Reference in New Issue
Block a user