X-Git-Url: https://fpunktk.de/gitweb/?p=travelrc.git;a=blobdiff_plain;f=README.md;fp=README.md;h=992ad74dda5059b941e8043b5d92d538e3bec17a;hp=dde0adeff7ccaf43404f75ea7b0045a7e5de1599;hb=e56de3b0fd460a76b34b2b76f7499302acbd0cdf;hpb=4f744b67722ff8c038865bd4055f64c758789e68 diff --git a/README.md b/README.md index dde0ade..992ad74 100644 --- a/README.md +++ b/README.md @@ -101,9 +101,14 @@ tssh() { ssh -t "$@" "$(trccmd --xz)" } _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 + # when completion is requested, load completion for ssh and use it for tssh, otherwise disable completion for tssh + # see https://stackoverflow.com/questions/61539494/how-does-bash-do-ssh-autocompletion + if __load_completion "ssh"; then + complete -F _ssh tssh + return 124 + else + complete -r tssh + fi } complete -F _tssh_completion tssh # this just loads the correct completion function