Johannes Altmanninger
Johannes Altmanninger
Interesting.. I'd have implemented this as part of fish itself. But this is using tree-sitter, which seems to work great for most cases. I think it's important that this one...
I think it's fine to enable it by default (the user did install it after all) as long as we deal with these issues (first)
On Wed, Jan 22, 2025 at 10:23:41PM -0800, Ross Goldberg wrote: > `commandline` includes redirects without their ``, regardless of `--tokens-raw ` or any other tokenization scheme. e.g., for: Right....
> --tokens-raw is useful. Please do not remove it. > > I will use it for Swift Argument Parser to allow Swift code to provide completions to the shell. The...
try this. Please share what you're building. I expect there will be issues because of the differences to other shells. ```diff diff --git a/src/builtins/commandline.rs b/src/builtins/commandline.rs index 5c6c007acc..eaec8e3350 100644 --- a/src/builtins/commandline.rs...
> Will --tokens-raw still be in 4.0 given its problems? Will it have been modified in any way since 4.0b1? > > Will redirect symbols (e.g., , etc.) be included...
I pushed my changes to the `raw-tokens` branch. > Consistent tokenization added a fix for the spurious redirections > getting each token verbatim Ok. For now I'd recommend using commandline...
does `complete -c com -rfa '(string join \n $vals)'` work for you? Double escaping sounds like a fine solution too -- we have `string escape` for that. > Please let...
> Maybe an empty string is a valid value for the argument that is being completed. yes that's possible and currently the completion engine doesn't support that - but I...
No. The "completions" you give to fish must be full tokens. Then fish takes care of only showing the suffix, which may well be empty.