summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-11-09 18:36:08 +0200
committerVille Skyttä <ville.skytta@iki.fi>2011-11-09 18:36:08 +0200
commitd54db3507dc79624ea5db1a031fac677d4c0dabe (patch)
tree486ef5ae8a05a54fad8a85e7c39cab9097888de2
parent0202ac4e2a5dcd8ccfa2cf38e89c79112dbef6b8 (diff)
downloadbash-completion-d54db3507dc79624ea5db1a031fac677d4c0dabe.tar.gz
make: Add -j/--jobs completion.
-rw-r--r--completions/make4
-rw-r--r--test/lib/completions/make.exp6
2 files changed, 10 insertions, 0 deletions
diff --git a/completions/make b/completions/make
index d56e1962..2c9a2c5a 100644
--- a/completions/make
+++ b/completions/make
@@ -24,6 +24,10 @@ _make()
--eval|-D|-V|-x)
return 0
;;
+ --jobs|-j)
+ COMPREPLY=( $( compgen -W "{1..$(_ncpus)}" -- "$cur" ) )
+ return 0
+ ;;
esac
$split && return 0
diff --git a/test/lib/completions/make.exp b/test/lib/completions/make.exp
index f20ace19..977485d2 100644
--- a/test/lib/completions/make.exp
+++ b/test/lib/completions/make.exp
@@ -36,4 +36,10 @@ assert_complete_dir "" "make " $dir $test
sync_after_int
+assert_complete_any "make -j "
+
+
+sync_after_int
+
+
teardown