Archived
1
0
This commit is contained in:
2025-08-22 03:22:22 +02:00
parent 58e086416b
commit 2d30be9cf9
2 changed files with 67 additions and 54 deletions

View File

@@ -8,7 +8,7 @@ _ssh-proxy() {
local -r cmdargs="start stop"
local -r cnfargs="--help"
local profiledir=~/.config/ssh-proxy
#local tempdir="/tmp/ssh-proxy-${USER}"
local tempdir="/tmp/ssh-proxy-${USER}"
if [[ ${COMP_WORDS[*]} == *"--help"* ]]; then
return
@@ -30,12 +30,18 @@ _ssh-proxy() {
--help)
return
;;
start | stop)
start)
local -r PROFILELIST=$(\ls ${profiledir})
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "${PROFILELIST}" -- "${COMP_WORDS[COMP_CWORD]}"))
return
;;
stop)
local -r PROFILELIST=$(\ls ${tempdir})
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "${PROFILELIST}" -- "${COMP_WORDS[COMP_CWORD]}"))
return
;;
*)
# shellcheck disable=SC2207
COMPREPLY=($(compgen -W "${args}" -- "${COMP_WORDS[COMP_CWORD]}"))