5 ms·
Path replacement is also possible in bash, as in: cd site1 site2 if you just add this line to your ~/.bashrc: function cd() { if [ $# -eq 2 ]; then b
by shared4you 13y ago
Path replacement is also possible in bash, as in:
cd site1 site2
if you just add this line to your ~/.bashrc:
function cd() { if [ $# -eq 2 ]; then builtin cd ${PWD/$1/$2}; else builtin cd $1; fi }
- msoad 13y agothat way all zsh functionality is "possible" if you write those functions.
- ibrahima 13y agoThere's no equivalent for the nifty tab completion where you can navigate around though. That's one of the few things I envy from zsh as a bash user.
- NoodleIncident 13y agoA cleaner version: ^site1^site2
- DannyBee 13y agoThis will only work if cd is your last command, whereas the zsh version always works.