Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
FZF usages

Interactively kills a process

ps aux | fzf | tr -s ' ' | cut -d ' ' -f 2 | xargs kill

List pending pull-requests, select one, and opens the browser

lab mr list | fzf | cut -d ' ' -f 1 | tr -d '#' | xargs lab mr browse

Reads a file containing scripts, selects one, and outputs it on my command line so that I can hit enter and its runs (and it is saved to history).

set script (cat package.json | jq -r '.scripts | keys[]' | fzf)
commandline -t "yarn run "
commandline -it -- (string escape $script)

Select a commit in the last 20 commits and commits current staging area as a fixup of this commits.

git ll -n 20 | fzf | cut -f 1 | xargs git commit --no-verify --fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.