mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Don't complete variables when single quoted. Fixes #1023
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user