diff --git a/tests/complete.in b/tests/complete.in index 857cc9deb..647e4b3f1 100644 --- a/tests/complete.in +++ b/tests/complete.in @@ -18,4 +18,10 @@ alias myalias2='complete_test_alpha1 arg2' myalias1 call1 myalias2 call2 complete -C'myalias1 call3 ' -complete -C'myalias2 call3 ' \ No newline at end of file +complete -C'myalias2 call3 ' + +# Ensure that commands can't wrap themselves - if this did, +# the completion would be executed a bunch of times. +function t --wraps t; echo t; end +complete -c t -fa '(t)' +complete -C't ' diff --git a/tests/complete.out b/tests/complete.out index 419d0d3ac..d813b436e 100644 --- a/tests/complete.out +++ b/tests/complete.out @@ -11,3 +11,4 @@ arg1 call1 arg2 call2 complete_test_alpha1 arg1 call3 complete_test_alpha1 arg2 call3 +t