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

Code formatting ignores HIST_IGNORE_SPACE #6

Closed
Gerrit-K opened this issue Jan 4, 2021 · 3 comments
Closed

Code formatting ignores HIST_IGNORE_SPACE #6

Gerrit-K opened this issue Jan 4, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Gerrit-K
Copy link

Gerrit-K commented Jan 4, 2021

I have the (arguably bad?) habit of prefixing commands I don't want to have in my history (e.g. because of temporary, specific parameters or sensitive arguments) with a space. For that I have setopt hist_ignore_space in my .zshrc.

Unfortunately the new code formatting feature (which sounds great, btw) doesn't respect that option. I tried with and without HIST_REDUCE_BLANKS but the results are the same: the leading whitespace is removed and thus the command is saved in history.

It would be great if the formatting would respect that setting (e.g. by keeping leading whitespace?) or (as a workaround) if the formatting could be disabled.

@marlonrichert
Copy link
Owner

marlonrichert commented Jan 4, 2021

Sure, I can make it respect that setting. Thanks for bringing it up.

marlonrichert added a commit that referenced this issue Jan 4, 2021
@marlonrichert
Copy link
Owner

Fixed.

@Gerrit-K
Copy link
Author

Gerrit-K commented Jan 4, 2021

Awesome! Thanks for the quick fix 🚀

@marlonrichert marlonrichert added the bug Something isn't working label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants