Live data from Hacker News

Fixing macOS Zsh Terminal History Settings

blog.akatz.org

61–66 of 66 posts

Re: Fixing macOS Zsh Terminal History Settings

#61

This is zsh specific, but here's something I've been burned by enough times that I specifically wanted to mention it: save your history in a file other than the default one. Why? Because if you increase the history limit, and your profile isn't sourced for any reason, the shell will read your history file and use the default history size, clobbering everything that's there. If you use a non-default history file this…

Zsh doesn’t actually have a default history-file location:⁰

HISTFILE The file to save the history in when an interactive shell exits. If unset, the history is not saved.

0. https://web.archive.org/web/20221012011928id_/zsh.sourceforg...

Re: Fixing macOS Zsh Terminal History Settings

#62
post #49
post #9

Does someone knows of some config to make zsh behave similar to bash for interactive use?

Many things are similar. What differences bother a particular user will vary. In many cases, zsh's approach is better so the value of crippling it is questionable. A common example is not splitting variables at spaces which is much better if you might have filenames with spaces in but it helps if you bother to learn to use arrays. Another example is the behaviour when wildcards don't match any files. Bash leaves the…

Yeah need to look more into how to configure zsh, I'm accustomed to the way bash does things by default. Quickly of the top of my head are getting a pager with multiple columns of output when listing the files of dirs with many files and the readline behavior of deleting directories instead of whole paths when pressing M-backspace.

Re: Fixing macOS Zsh Terminal History Settings

#63
post #9

Does someone knows of some config to make zsh behave similar to bash for interactive use?

I guess you'll have to elaborate on "similar". What are the differences that you want to resolve? I followed Apple's migration to Zsh and configured it to be Bash-like, at least enough for me to not notice the difference.

My google is failing, have a link to this migration document?

Re: Fixing macOS Zsh Terminal History Settings

#66
post #9

Does someone knows of some config to make zsh behave similar to bash for interactive use?

I guess you'll have to elaborate on "similar". What are the differences that you want to resolve? I followed Apple's migration to Zsh and configured it to be Bash-like, at least enough for me to not notice the difference.

Git: completion of branch names
Post reply on HN