CLI: improved (command line tools)

I just tried fzf (mentioned in the top post) and it’s great. :exploding_head:

It completes with fuzzy search.

Examples:

$ vim <ctrl-t>
$ kill -9 <tab>

It also takes over ctrl-r.

There is a demo here:

I also just tried bat and it’s good.

Edit: I copied the fzf config that was in the video. I added the --exclude build --exclude dist part and changed pbcopy to xclip -selection clipboard, because I’m using Linux and not Mac.

FD_OPTIONS="--follow --exclude .git --exclude node_modules --exclude build --exclude dist"
export FZF_DEFAULT_OPTS="--no-mouse --height 50% -1 --reverse --multi --inline-info --preview='[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || (bat --style=numbers --color=always {} || cat {}) 2> /dev/null | head -300' --preview-window='right:hidden:wrap' --bind='f3:execute(bat --style=numbers {} || less -f {}),f2:toggle-preview,ctrl-d:half-page-down,ctrl-u:half-page-up,ctrl-a:select-all+accept,ctrl-y:execute-silent(echo {+} | xclip -selection clipboard)'"
# Use git-ls-files inside git repo, otherwise fd
export FZF_DEFAULT_COMMAND="git ls-files --cached --others --exclude-standard | fd --type f --type 1 $FD_OPTIONS"
export FZF_CTRL_T_COMMAND="fd $FD_OPTIONS"
export FZF_ALT_C_COMMAND="fd --type d $FD_OPTIONS"
export BAT_PAGER="less -R"