2 ms·
I'm a constant user of `fzf` and autojump (`j`) so combined them into this shell alias I use regularly: alias jf="cd \$(sort -nr ~/Library/autojump/autojump.
by mattweinberg 4y ago
I'm a constant user of `fzf` and autojump (`j`) so combined them into this shell alias I use regularly:
alias jf="cd \$(sort -nr ~/Library/autojump/autojump.txt | awk 'BEGIN {FS = \"\\t\"} {print \$2}' | fzf)"
or without the escaping:
cd $(sort -nr ~/Library/autojump/autojump.txt | awk 'BEGIN {FS = "\t"} {print $2}' | fzf)
It gets my autojump history, sorts it by most used on top, extracts just the directory names, pipes the list to `fzf` and `cd`s into the selection. It's great because my most-used directories will be right on top of the `fzf` list.