File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,7 @@ _ulimit()
32
32
fi
33
33
fi
34
34
35
- [[ $prev == -[SH] ]] && return
36
-
37
- local args
38
- _count_args
39
- (( args == 1 )) &&
40
- COMPREPLY=($( compgen -W " soft hard unlimited" -- " $cur " ) )
35
+ [[ ${mode-} ]] && COMPREPLY=($( compgen -W " soft hard unlimited" -- " $cur " ) )
41
36
} &&
42
37
complete -F _ulimit ulimit
43
38
Original file line number Diff line number Diff line change 6
6
class TestUlimit :
7
7
@pytest .mark .complete ("ulimit " )
8
8
def test_1 (self , completion ):
9
- assert completion
9
+ assert not completion
10
10
11
11
@pytest .mark .complete ("ulimit -" , require_cmd = True )
12
12
def test_2 (self , completion ):
@@ -40,3 +40,8 @@ def test_7(self, completion):
40
40
def test_no_special_values_after_soft_or_hard (self , bash , flag ):
41
41
completion = assert_complete (bash , "ulimit %s " % flag )
42
42
assert not completion
43
+
44
+ @pytest .mark .complete ("ulimit -c 0 -n " )
45
+ def test_special_not_just_first (self , completion ):
46
+ """Test we offer limit values not only for the first option."""
47
+ assert completion
You can’t perform that action at this time.
0 commit comments