Comment

Comment by mattweinberg

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.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton