Hacker News new | ask | show | jobs
by jejones3141 4782 days ago
The site1 site2 substitution slide is at best disingenuous; I believe in bash you could type

^site1^site2

and get the same result.

1 comments

Not at all. ^site1^site2 would only work if it was your last command.

The idea, I believe, is when your browsing around multiple versions of the same directory structure. The 'cd site1 site2' allows you to jump directly to the equivalent directory in the other structure.

The equivalent in bash would be something like: cd `pwd | sed 's/tmp1/tmp2/'`

In bash: cd ${PWD/foo/bar}