3 ms·
Don't waste your time bookmarking directories, jump right to them ;) https://github.com/rupa/z https://github.com/rupa/z `z` tracks your most used directories.
by mtrn 16y ago
Don't waste your time bookmarking directories, jump right to them ;) https://github.com/rupa/z https://github.com/rupa/z
`z` tracks your most used directories. After a short learning phase, it will take you to the directory, based on its usage frequency and a hint you give it on the command line. Say I am often cd'ing into /var/www - then after a while I can just type `z ww`.
- stevelosh 16y agoz is great. I don't know how I lived without it. It's become so ingrained in my fingers that whenever I switch to a new shell it's the first thing I port over: https://github.com/sjl/z-zsh https://github.com/sjl/z-zsh https://github.com/sjl/z-fish https://github.com/sjl/z-fish
- SwellJoe 16y agoI love projects like this. They so elegantly show what using the right tool for the job can do for you, in terms of code simplicity and conciseness. Doing this in, say, Perl or Python or Ruby, would be entirely possible, and folks who code exclusively in those languages might assume it would be easier in a "more powerful" language...but Bash has so many nice little built-ins that make it really concise and portable. One file, no modules, and it does exactly what it's supposed to do. I think it's illustrative that the developer went through a Python-based version on the path to building z.
- dekz 16y agoI remember seeing this, but forgot entirely to use it. Have been spending a while looking for it again, or something equivalent. Thanks.
- mtrn 16y agoI forgot the url, too. But then I remembered the tagline "z is the new j" - which is enough for google to bring up the repo - even without quotes.
- webXL 16y agoI want to be able to preview the path or directory name that z will navigate to. Something like the way the webkit developer console autocompletes an object, method, or property in light gray color. Or it could be displayed in the terminal title bar. Is that possible?
- orlandu63 16y agoI've created an AUR package for this script, found here: http://aur.archlinux.org/packages.php?ID=46675 http://aur.archlinux.org/packages.php?ID=46675
- mtrn 16y agoOut of the box only with `z -l foo` # list all dirs matching foo (by frequency)