question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore commands that start with a space

See original GitHub issue

In 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:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rcalorascommented, Oct 7, 2020

closing. Feel free to reopen if needed.

1reaction
rcalorascommented, Oct 2, 2020

@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 to 2.1.1 you can configure your filter in your ~/.bashhub/config too.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found