-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
'commandline -f' interprets functions in reverse #1567
Comments
I think this dates back to fish 1.x. I would call it a bug - commands ought to be a queue, not a stack. |
Well, once it's clear that the functions are called in a stack-like fashion it's NBD. A hint in the docs would've been great... would have saved me some swearing:-) |
I want to try to fix this before the compatibility concerns mean we can't. |
It also seems like you cannot execute any other operation after function __execute_and_keep_line
set -l pos (commandline -C)
set -l cmd (commandline -b)
commandline -f execute
commandline -r "$cmd"
commandline -C $pos
end
bind \e\n __execute_and_keep_line No matter which order you run it, it always stops at execute and don't run other stuff after. |
Using builtin `commandline -f`, one would expect to have commands executed in the order that they were given. This motivates the change to a queue. Unfortunately, fish internals still need lookahead_list to act as a stack. Add and rename functions to support both cases and have lookahead_list as a std::deque internally. This code is delicate, and we should probably dog-food this in nightly for a while before the next-minor release. Fixes fish-shell#1567
Using builtin `commandline -f`, one would expect to have commands executed in the order that they were given. This motivates the change to a queue. Unfortunately, fish internals still need lookahead_list to act as a stack. Add and rename functions to support both cases and have lookahead_list as a std::deque internally. This code is delicate, and we should probably dog-food this in nightly for a while before the next-minor release. Fixes fish-shell#1567
Using builtin `commandline -f`, one would expect to have commands executed in the order that they were given. This motivates the change to a queue. Unfortunately, fish internals still need lookahead_list to act as a stack. Add and rename functions to support both cases and have lookahead_list as a std::deque internally. This code is delicate, and we should probably dog-food this in nightly for a while before the next-minor release. Fixes fish-shell#1567
This doesn't work correctly, since it only performs the execute call:
bind \em 'commandline -f accept-autosuggestion; commandline -f execute'
Reversing the order of the calls does work:
bind \em 'commandline -f execute; commandline -f accept-autosuggestion'
bind \em 'commandline -f execute accept-autosuggestion'
Strange... is that a bug or a feature?
The text was updated successfully, but these errors were encountered: