Enhance backtunnel-share with improved desktop integration, port collision checks, and pre-flight validations
This commit is contained in:
@@ -32,6 +32,20 @@ _backtunnel_complete() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
# backtunnel-share: after positionals, propose flags incl. invite
|
||||
if [[ ${COMP_WORDS[0]} == backtunnel-share && ${COMP_CWORD} -ge 5 ]]; then
|
||||
local opts="-p --tunnel-port -l --local-ssh-port -i --invite --invite-mount --invite-file --qr -h --help"
|
||||
mapfile -t COMPREPLY < <(compgen -W "${opts}" -- "${cur}")
|
||||
return 0
|
||||
fi
|
||||
|
||||
# backtunnel-access: after positionals, propose its flags
|
||||
if [[ ${COMP_WORDS[0]} == backtunnel-access && ${COMP_CWORD} -ge 3 ]]; then
|
||||
local opts="-p --port -m --mount-point -h --help"
|
||||
mapfile -t COMPREPLY < <(compgen -W "${opts}" -- "${cur}")
|
||||
return 0
|
||||
fi
|
||||
|
||||
COMPREPLY=()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user