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

Feature Request: Add option to specify patterns to be ignored #1942

Open
oyarsa opened this issue Apr 11, 2024 · 2 comments
Open

Feature Request: Add option to specify patterns to be ignored #1942

oyarsa opened this issue Apr 11, 2024 · 2 comments

Comments

@oyarsa
Copy link

oyarsa commented Apr 11, 2024

I don't really want commands like ls, cd, git status and so on to appear when searching the history. It would be good to be able to specify some patterns (globs, regexes, whatever) to filter those out. However, it could be nice to show these if required, so the filtering would be in the UI, not in recording the commands.

This would go along nicely with #1912.

Also, I'd be open to working on this as a PR if I can get some guidance on how to start.

@ellie
Copy link
Member

ellie commented Apr 12, 2024

However, it could be nice to show these if required

Have you got an example use case for when you'd want a command like ls to be recorded, but not visible in search without toggling a setting?

I'm a bit unclear on the use here, unless it's for stats?

@oyarsa
Copy link
Author

oyarsa commented Apr 13, 2024

cd would be the motivating example. Most of the time, I don't want it shown in history. But sometimes, when I'm in a complex directory structure with weird names, I'd like to get the latest cd commands I used to go back to where I was previously, especially when filtering only commands from the current directory.

To be fair, I can still get this from history | fzf, and it might not used frequently enough to warrant a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants