about summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/_command_names7
-rw-r--r--Completion/Base/_default9
-rw-r--r--Completion/Base/_parameter2
3 files changed, 16 insertions, 2 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
diff --git a/Completion/Base/_default b/Completion/Base/_default
index b49ca7115..03bbfd49f 100644
--- a/Completion/Base/_default
+++ b/Completion/Base/_default
@@ -11,4 +11,11 @@
 
 compcall || return 0
 
-_files
+_files && return
+
+# magicequalsubst allows arguments like <any-old-stuff>=~/foo to do
+# file name expansion after the =.  In that case, it's natural to
+# allow completion to handle file names after any equals sign.
+if [[ -o magicequalsubst ]] && compset -P 1 '*='; then
+  _files
+fi
diff --git a/Completion/Base/_parameter b/Completion/Base/_parameter
index 7200ae440..b235a5fee 100644
--- a/Completion/Base/_parameter
+++ b/Completion/Base/_parameter
@@ -1,3 +1,3 @@
 #compdef -parameter-
 
-compgen -v
+_parameters -S ' ' -r '['