-
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
Items are added to history too early #2028
Comments
Whoa, meta. |
Nice find by the way. |
In order to make commands like |
+1 I've seen this as well, but didn't know it was a bug. I'll whip up a On Sat, 18 Apr 2015 05:54 ridiculousfish notifications@github.com wrote:
|
These are some fixes I've considered:
|
I noticed that a simple flag was sufficient. Tests added too. Thanks for reporting this! |
Nice fix! :D On Mon, 20 Apr 2015 11:04 ridiculousfish notifications@github.com wrote:
|
New commands are added to the history before the command itself is evaluated. This means that
$history[1]
expands to the current command, as doeshistory | head -n1
. I've been informed that Fish v2.1.2 does not do this (they expand to the previously-executed line instead), and it also seems rather surprising for a command to be considered "history" when it hasn't executed yet.I believe this was caused by aa1b065.
/cc @ridiculousfish
The text was updated successfully, but these errors were encountered: