summaryrefslogtreecommitdiff
path: root/home/xyz/.bashrc
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-07-04 18:28:51 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-07-04 18:28:51 -0700
commit812ff3a4feddde6de91f497c93516d5e8aee8db1 (patch)
tree48bcf17edff88f7eafdbddaa11307c2a356e435e /home/xyz/.bashrc
parentf59414155c2608ecd53d1c499678215aa22d8de4 (diff)
feat: pa bash complete known hostnames
Diffstat (limited to 'home/xyz/.bashrc')
-rw-r--r--home/xyz/.bashrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/home/xyz/.bashrc b/home/xyz/.bashrc
index 3d55d5f3..03f3df1b 100644
--- a/home/xyz/.bashrc
+++ b/home/xyz/.bashrc
@@ -201,6 +201,10 @@ bind -m vi-insert -x '"\C-o":zqi_key'
complete -c wh
# tldr-sh-client readme
complete -W "$(tldr 2>/dev/null -l -p all)" tldr
+# copy from `complete -p drill`
+# https://github.com/scop/bash-completion/blob/e209afb2d0c96ee6bfe83da8b2742a8f8e88d372/bash_completion#L2404-L2420
+# The url has the code of _comp_complete_known_hosts function, it says it is deprecated as a helper funtion and I should use _comp_compgen_known_hosts instead? Does my use count as helper function? I don't know how to use _comp_compgen_known_hosts. And _comp_complete_known_hosts works, so whatever.
+complete -F _comp_complete_known_hosts pa
# https://unix.stackexchange.com/questions/216748/how-to-re-use-existing-completion-with-recent-bash-completion
_completion_loader info
eval "$(complete -p info | sed 's/\(.*\)info$/\1vinfo/')"