3 ms·
here's a tip for people that I stole from PLAN9: If your shell is ZSH and you have `setopt autocd` in your .zshrc (though I think this setting is on by default
by dijit 3y ago
here's a tip for people that I stole from PLAN9:
If your shell is ZSH and you have `setopt autocd` in your .zshrc (though I think this setting is on by default):
export PS1="%~; "
this will result in the prompt: `~; ` where the ~ will change to a path relative to home.
Why do this? Well; it means you can select and paste any line in your history: your prompt becomes part of setting the proper context and is part of the command. Just select the entire line. :D
- sweetgiorni 3y agozsh-histdb achieves something similar. Combined with zsh-autosuggestions it's quite nice. https://github.com/larkery/zsh-histdb https://github.com/larkery/zsh-histdb