diff options
author | 2014-02-09 15:27:04 -0800 | |
---|---|---|
committer | 2014-02-09 15:27:04 -0800 | |
commit | 5ea7f52df237963a594138f96f5159dc9e317e26 (patch) | |
tree | 2f6a340e5442f7692e6eaa06c19b8dfec2e45f6d /fish_tests.cpp | |
parent | 414530c9c2ec9f128c6a7c601a5d83a48e287a3c (diff) |
Don't complete variables when single quoted. Fixes #1023
Diffstat (limited to 'fish_tests.cpp')
-rw-r--r-- | fish_tests.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fish_tests.cpp b/fish_tests.cpp index 13e9d2fa..984c740b 100644 --- a/fish_tests.cpp +++ b/fish_tests.cpp @@ -1535,7 +1535,14 @@ static void test_complete(void) complete(L"foobarbaz ", completions, COMPLETION_REQUEST_DEFAULT); do_test(completions.size() == 1); do_test(completions.at(0).completion == L"qux"); - + + /* Don't complete variable names in single quotes (#1023) */ + completions.clear(); + complete(L"echo '$Foo", completions, COMPLETION_REQUEST_DEFAULT); + do_test(completions.empty()); + completions.clear(); + complete(L"echo \\$Foo", completions, COMPLETION_REQUEST_DEFAULT); + do_test(completions.empty()); complete_set_variable_names(NULL); } |