Skip to content
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

space infront of command leads to missing in history #6805

Closed
danielb2 opened this issue Mar 25, 2020 · 3 comments
Closed

space infront of command leads to missing in history #6805

danielb2 opened this issue Mar 25, 2020 · 3 comments
Labels

Comments

@danielb2
Copy link
Contributor

fish, version 3.1.0
Darwin zoro.local 18.2.0 Darwin Kernel Version 18.2.0 (Mojave)
iTerm2
tmux
TERM: screen-256color

Steps to reproduce:

  1. type any command after putting a space infront, and hit enter

expected:
the command should run and it should appear in history

result:
The command runs, but hitting up arrow and it's missing, and it's missing from history

See:
Screen Shot 2020-03-24 at 17 20 54

@zanchey zanchey changed the title [BUG]: space infront of command leads to missing in history space infront of command leads to missing in history Mar 25, 2020
@zanchey
Copy link
Member

zanchey commented Mar 25, 2020

It's not a bug, it's a feature!

From https://fishshell.com/docs/current/#history-search:

Prefixing the commandline with a space will prevent the entire line from being stored in the history.

See also #615. We do get a lot of questions about this, it might be worth adding to the FAQ.

@danielb2
Copy link
Contributor Author

danielb2 commented Mar 25, 2020

funny, I even read that part of the docs and I missed it.I thought I had read it being a feature before. I checked other shells, and then I thought it's unintuitive because it's not expected. I had put a space in by accident.

@zanchey
Copy link
Member

zanchey commented Mar 25, 2020

Yeah. I think it would be fair to describe it as polarising. Since #4327 got merged it's been harder to trip over, though.

@zanchey zanchey closed this as completed May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants