cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.98k stars 178 forks source link

How can I ignore some commands. #86

Open goddade opened 4 years ago

goddade commented 4 years ago

How can I ignore some commands such as exit and ls

cantino commented 4 years ago

Hey @goddade! That's a great feature suggestion.

For bash, it should use HISTIGNORE (details), and for zsh, it'd be nice if it used HISTORY_IGNORE (details). Are you interested in working on this?

goddade commented 4 years ago

Add the command to HISTIGNORE, and then delete it in McFly It works for me

Learn Rust is still in my todo list, so I can't contribute to it yet

Thanks for your excellent works!

nkoehring commented 4 years ago

There's also a (common?) thing to ignore entries with one or more leading spaces.

nmay231 commented 1 week ago

I might be able to do this eventually (I don't want to commit just yet since I'm working on other projects atm), but I wanted to mention that we might also want to support a separate env var as well as those two. HISTIGNORE seems to remove that entry from up-arrow search which is not necessarily what the user wants.