[projects/pld-ftp-admin] bash-completion: complete packages after -f and -nb
arekm
arekm at pld-linux.org
Sat Oct 24 11:46:09 CEST 2026
commit d7f90d1ff43587659116712d10fa38d9bc3b791a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Oct 20 15:42:05 2026 +0200
bash-completion: complete packages after -f and -nb
shell/bash-completion.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/shell/bash-completion.sh b/shell/bash-completion.sh
index bf6e60a..cc76d60 100644
--- a/shell/bash-completion.sh
+++ b/shell/bash-completion.sh
@@ -81,7 +81,7 @@ complete -F _pfa-lintpkg pfa-lintpkg
have pfa-signpkg &&
_pfa-signpkg()
{
- local cur
+ local cur arg
COMPREPLY=()
_get_comp_words_by_ref cur
@@ -92,7 +92,8 @@ _pfa-signpkg()
if [[ $args == 1 ]]; then
_pfa_tree "$cur"
else
- _pfa_tree_files "${COMP_WORDS[1]}" "$cur"
+ _get_first_arg
+ _pfa_tree_files "$arg" "$cur"
fi
} &&
complete -F _pfa-signpkg pfa-signpkg pfa-rmpkg
@@ -100,7 +101,7 @@ complete -F _pfa-signpkg pfa-signpkg pfa-rmpkg
have pfa-mvpkg &&
_pfa-mvpkg()
{
- local cur
+ local cur arg
COMPREPLY=()
_get_comp_words_by_ref cur
@@ -111,7 +112,8 @@ _pfa-mvpkg()
if [[ $args == 1 ]] || [[ $args == 2 ]]; then
_pfa_tree "$cur"
else
- _pfa_tree_files "${COMP_WORDS[1]}" "$cur"
+ _get_first_arg
+ _pfa_tree_files "$arg" "$cur"
fi
} &&
complete -F _pfa-mvpkg pfa-mvpkg pfa-testmvpkg
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/e14cb7d4d74f8bdd9368d9645ecaf49593cf6335
More information about the pld-cvs-commit
mailing list