mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-30 05:46:31 -04:00
Disallow any additional arguments after "shear"
Former-commit-id: 9e523edde7e05634020536cec6e6a3100e298c42 [formerly 2f795b4d03]
Former-commit-id: 847c509f7977ef8aad1582c06be056d1347aee2a
This commit is contained in:
@@ -18,7 +18,9 @@ _sshyp_completions() {
|
||||
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
|
||||
local compline="${compwords[*]}"
|
||||
|
||||
if [ "${#COMP_WORDS[@]}" -gt "3" ] && (! echo "${COMP_WORDS[@]}" | grep -q '/' || echo "${COMP_WORDS[@]}" | grep -q 'shear'); then
|
||||
if [ "${#COMP_WORDS[@]}" -gt "2" ] && echo "${COMP_WORDS[@]}" | grep -q 'shear'; then
|
||||
return
|
||||
elif [ "${#COMP_WORDS[@]}" -gt "3" ] && (! echo "${COMP_WORDS[@]}" | grep -q '/' || echo "${COMP_WORDS[@]}" | grep -q 'shear'); then
|
||||
return
|
||||
elif [ "${#COMP_WORDS[@]}" -gt "4" ]; then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user