Ignore commands that start with a space
See original GitHub issueIn Bash, If one starts a command with a space it doesn’t get saved to the ~/.bash_history
file. While I’m aware of bashhub off
and bashhub on
, it’s an extra step that I may easily forget.
Is there a way to get the bashhub client to ignore all commands that start with a space?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Why is bash not storing commands that start with spaces?
If the list of values includes ignorespace , lines which begin with a space character are not saved in the history list.
Read more >How do I prevent commands from showing up in Bash history?
Then just begin any command you want to ignore with one space. $ ls # goes in history $ ls # does not....
Read more >How to prevent saving bash commands *with* space in front
HISTCONTROL=ignoreboth. Now if yo open a new terminal, it should ignore saving commands to history when they start with an space. man bash....
Read more >Skipping bash history for command-lines starting with space
If it is set to ignorespace then commands entered with a leading-space will not be stored in the history.
Read more >How to prevent a command in the zshell from being saved into ...
Use the HIST_IGNORE_SPACE option. setopt HIST_IGNORE_SPACE. man zshoptions. HIST_IGNORE_SPACE. Remove command lines from the history list ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
closing. Feel free to reopen if needed.
@sbrl I actually just put in config support for filtering (https://github.com/rcaloras/bashhub-client/commit/0bcc223d11f363f22b8ac1aef9e399428660dd41). Meant to do this a while ago. If you
bashhub update
to2.1.1
you can configure your filter in your ~/.bashhub/config too.