3 ms·
One thing I like about zsh that doesn't seem to get that much attention (and seems to be overlooked here) is path expansion. If you're typing a path (let's say
by alialkhatib 12y ago
One thing I like about zsh that doesn't seem to get that much attention (and seems to be overlooked here) is path expansion.
If you're typing a path (let's say to ~/Dropbox/Public/...) you can say "cd ~/d/p" and hit tab to fill in even the intermediate parts. Given that the only path that matches "~/d./p." is ~/Dropbox/Public/, zsh will fill that in. If it hits an ambiguity down the proverbial road, it'll expand until it hits the ambiguity and list potential matches.
It's really convenient knowing that I can say something like "cd ~/d/c/s/c" and it'll fill in the rest.
edit: I tried to indicate a basic regex pattern but I think HN is reading it as trying to italicize "/p." instead. I later tried escaping it with backslash, but no luck. Sorry if that's really confusing.
- gumby 12y agobash has had this feature too since its first public release. bfox copied from twenex, which may have gotten it someplace else. Twenex had a great JSYS (system call) that did full command argument completion that was the inspiration for the readline library