I'm mildly skeptical of any shortcuts that are based on "learning habits". I've already gotten enough of user interfaces that move items based on use all the time (The spotify playlist list is the worst offender - playlists move up and down in rank after every use, so there is never any spatial memory, startled every time).
Behold z, the unsung jewel that rethinks shell navigation
21–30 of 71 posts
Re: Behold z, the unsung jewel that rethinks shell navigation
#22I use zoxide - a modern z written in Rust. https://github.com/ajeetdsouza/zoxide
Re: Behold z, the unsung jewel that rethinks shell navigation
#23 $ export CDPATH=~/Workspace/src/github.com # in .bashrc
$ cd brigad/opsRe: Behold z, the unsung jewel that rethinks shell navigation
#24bash source:
cz-index () { sudo find -L ~/work -type d -name '.git' | sed 's;/.git$;;' | sort > ~/git-dirs.txt }
cz () { cd "$(cat ~/git-dirs.txt | fzf --tiebreak=begin --exact -i -q $1)" }
Re: Behold z, the unsung jewel that rethinks shell navigation
#25I'm constantly amazed at what Windows dev people can get done without a programmable command line. I've seen several thousand line long cmd/bat files to do relatively simple things. They work, which is good. They are a lot of work to maintain though.
I find z absolutely wonderful to take away that first hurdle of remembering folders. I can't imagine how Windows devs who don't know Unix can get around easily. They seem to though. Much must be memorised and some tools help. Powershell is getting better, but I think lacks (at least for the moment) the amount of existing code/books/links that shell solutions have.
I sometimes hum my version of that old Sting favourite,
Oh, I'm an alien, I'm a legal alien
I'm a Linux dev in Windows 10....
I'd be interested to hear if there are better/equivalent searching tools easily available on Windows, but z works wonderfully for me.Re: Behold z, the unsung jewel that rethinks shell navigation
#26I use zoxide - a modern z written in Rust. https://github.com/ajeetdsouza/zoxide
Re: Behold z, the unsung jewel that rethinks shell navigation
#27Directory history is the 3rd demo on the homepage: https://elv.sh/
Re: Behold z, the unsung jewel that rethinks shell navigation
#28Earlier quoted context omitted.
Besides z being much faster (looking through a sorted list of directories visited instead of recursively walking from the current directory) your snippet looks from the cwd
This is a fair point. I usually only "jump" from directories that have at most 500k files, and the median is way closer to ~500 files. Even in the worst cases, at least with my i7 NUC and using fd instead of find, it's less than 500ms to load the entire list into fzf.
Re: Behold z, the unsung jewel that rethinks shell navigation
#29don't forget about CDPATH $ export CDPATH=~/Workspace/src/github.com # in .bashrc $ cd brigad/ops