-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
any ssh or scp TAB leads to "complete: maximum recursion depth reached" infloop #7389
Comments
See also #6899 |
That's why I checked if removing the alias function makes a difference -- it did not. |
Please remove it in a new shell |
As in start a shell that never has it. Remove it from the config. |
That works, indeed, thank you! And now I have two Q.s :)
If this is doc.d, I would appreciate pointers! |
Alias defines completions. In this case it tells fish to complete your alias like the command it calls - env. Only the env completions say to complete like the subcommand, ssh. Which is also the name of your alias. Which results in an infinite loop. The completions remain defined even if the function is erased. What you can do is either -make it an actual function directly function ssh
TERM=screen command ssh $argv
end (no need for the env in fish 3.1) or to call it something else. |
I did not consider that, but it makes a lot of sense. Thanks for the explanation. |
Reopening this one because it shouldn't fail like that. |
These aliases seem to be common, see #7389 and others. This prevents recursion on that example, so `alias ssh "env TERM=screen ssh"` will just have the same completions as ssh. Checking the last token is a heuristic which hopefully works for most cases. Users are encouraged to use functions instead of aliases.
Okay, the completion repeated ad infinitum because the
A shell gotcha: |
Thanks, realized that when writing a temporary workaround function. Thanks for your help and for the fix! |
Please tell us which fish version you are using by executing the following:
fish, version 3.1.2
Please tell us which operating system and terminal you are using. The output of
uname -a
andecho $TERM
may be helpful in this regard although other commands might be relevant in your specific situation.Linux t430il 5.8.0-2-amd64 #1 SMP Debian 5.8.10-1 (2020-09-19) x86_64 GNU/Linux
st-256color
The issue does not occur in the no-customizations setup, where I do not get any TAB completions at all. I have an
but removing it (functions -e ssh) does not change the situation. I also tried to mv my ssh config out of the way, also without any effect. That's when I was a bit stumped --- what could go wrong here?
The text was updated successfully, but these errors were encountered: