aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustine Smithies <justine@smithies.me.uk>2025-01-28 19:10:16 +0000
committerJustine Smithies <justine@smithies.me.uk>2025-01-28 19:10:16 +0000
commit00007bb8349dae0766a8529acfa1228728c83a11 (patch)
treed0ae257dc8789f43f4410c031004682845e0b318
parent14489d9c78637ac4e76975c9f2d55d43c8c53409 (diff)
Changed git completion to show all valid options
-rw-r--r--.kshrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/.kshrc b/.kshrc
index b226f4f..4af2c77 100644
--- a/.kshrc
+++ b/.kshrc
@@ -90,7 +90,10 @@ _SSH_HOSTS=$(awk '/^host/{ print $2 }' ~/.ssh/config)
set -A complete_ssh -- $_SSH_HOSTS
set -A complete_pkg -- autoremove clean install search update upgrade version
-set -A complete_git -- blame diff log main origin commit add pull push rebase status trunk
+# Git completion
+set -A complete_git -- \
+ $(git --list-cmds=main) \
+ $(git config --get-regexp ^alias\. | awk -F '[\. ]' '{ print $2 }')
set -A complete_config -- add commit diff push status
set -A complete_service -- onereload onerestart onestop restart start status stop
set -A complete_zfs -- clone create diff get jail list mount promote receive set send share snapshot upgrade