Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Fish hangs on autocompletion because of Grep descend into sub-dirs #2245
There is not much information I can provide (yet) because the situation is a little bit ugly, when the fish shell hangs, well, everything on my laptop hangs.
It's related to grep. the most useful information I've been able to get so far is this, printed to terminal after I hit
cd .con... grep: .config/yyy/zz0: No such file or directory grep: .config/yyy/zz1: No such device or address grep: .config/yyy/zz2: No such file or directory grep: .cache/tilda/locks/lock_00000_0: Permission denied fig/fish
I had a chance to take a glance at the
D'oh! almost forgot! being a shell plugin junky I'm using
So, something is better than nothing on the issue queue, I guess. I'll come back when I have more information.
There's actually still an issue here - that re-defining "sgrep" causes issues in completions.
"sgrep" is a fish function that uses grep without GREP_OPTIONS, and it's used in 37 fish completion scripts or functions, among which
The simple solution here is to call
Well, that's a long-term solution to the grep-specific instance of the issue (and we could presumably already replace some grep usage with
Personally, I think the most intuitive thing is that user-defined functions/variables don't influence what happens in functions or scripts, but that'd be a huge behavioral change.
Edit: There are also at least 8 unqualified occurences of
fish (at least as I see it) isn't like an OS kernel. that presents a fixed interface and bulletproof abstractions. It's more like Smalltalk, with visible exposed wiring, and you can tweak or have a conversation with your environment. It gives users more power, but in turn must exercise some care. It's reasonable to expect that if you modify
So I'm opposed to an unqualified rule like "completions may only invoke commands or
But in some cases fish should be more mindful of possible replacements.
Thanks for doing this survey @faho!
I guess I can live with that. How about this very-much-qualified rule, then: