X-Git-Url: https://fpunktk.de/gitweb/?p=travelrc.git;a=blobdiff_plain;f=README.md;fp=README.md;h=dde0adeff7ccaf43404f75ea7b0045a7e5de1599;hp=c19713b91377c59ee88b6ed3a6623087b60c698f;hb=4f744b67722ff8c038865bd4055f64c758789e68;hpb=05f2f273f32ddd30fc86d4b8f0c7fdf453fd3a3e diff --git a/README.md b/README.md index c19713b..dde0ade 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,12 @@ tssh() { # use -t to force the allocation of a terminal ssh -t "$@" "$(trccmd --xz)" } -complete -F _ssh tssh # this is the same as for ssh; function _ssh might not exist when this is called, but will be created automagically when requesting completion for ssh +_tssh_completion() { + # when completion is requested, it will be redefined to use _ssh and then load the completion function for ssh, see https://stackoverflow.com/questions/61539494/how-does-bash-do-ssh-autocompletion + complete -F _ssh tssh + __load_completion "ssh" && return 124 || complete -r tssh # if loading completion is successful then return, otherwise disable completion for tssh +} +complete -F _tssh_completion tssh # this just loads the correct completion function tdocker() { local dcmd="$1"