mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 13:01:21 -03:00
Fix completion for builtins (with subcommands)
Presently the completion engine ignores builtins that are part of the fish syntax. This can be a problem when completing a string that was based on the output of `commandline -p`. This changes completions to treat these builtins like any other command. This also disables generic (filename) completion inside comments and after strings that do not tokenize. Additionally, comments are stripped off the output of `commandline -p`. Fixes #5415 Fixes #2705
This commit is contained in:
@@ -55,10 +55,11 @@ void parse_util_cmdsubst_extent(const wchar_t *buff, size_t cursor_pos, const wc
|
||||
///
|
||||
/// \param buff the string to search for subshells
|
||||
/// \param cursor_pos the position of the cursor
|
||||
/// \param a the start of the searched string
|
||||
/// \param b the end of the searched string
|
||||
/// \param a the start of the process
|
||||
/// \param b the end of the process
|
||||
/// \param tokens the tokens in the process
|
||||
void parse_util_process_extent(const wchar_t *buff, size_t cursor_pos, const wchar_t **a,
|
||||
const wchar_t **b);
|
||||
const wchar_t **b, std::vector<tok_t> *tokens);
|
||||
|
||||
/// Find the beginning and end of the job definition under the cursor
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user