Comment

Comment by phforms

I really like the suggested command `<my editor> $(fzf)` to quickly open files in <my editor> relative to the directory I am in. However, when I abort the fuzzy find with esc, it still opens <my editor> without a file input, which is not what I want, so I wrote a little script for my shell config to prevent this:

  fuzz() {
    file=$(fzf)
    if [ ${#file} -gt 0 ]; then
      nvim "$file"  # or any editor you prefer
    else
      :
    fi
  }
parent phforms 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton