about summary refs log tree commit diff
path: root/Completion/Base/_command_names
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/_command_names')
-rw-r--r--Completion/Base/_command_names7
1 files changed, 7 insertions, 0 deletions
diff --git a/Completion/Base/_command_names b/Completion/Base/_command_names
index 8f75f1a77..61fea56dd 100644
--- a/Completion/Base/_command_names
+++ b/Completion/Base/_command_names
@@ -2,6 +2,13 @@
 
 local nm=$compstate[nmatches] ret=1
 
+
+# Complete jobs in implicit fg and bg
+if [[ "$PREFIX[1]" = "%" ]]; then
+  compgen -j -P '%'
+  [[ nm -ne compstate[nmatches] ]] && return
+fi
+
 compgen -c && ret=0
 
 if [[ nm -eq compstate[nmatches] ]]; then