Skip to content

Instantly share code, notes, and snippets.

@fujitayy
Last active February 3, 2019 14:36
Show Gist options
  • Save fujitayy/dc56e8f23bf4da0d0025d1bc73b20b9c to your computer and use it in GitHub Desktop.
Save fujitayy/dc56e8f23bf4da0d0025d1bc73b20b9c to your computer and use it in GitHub Desktop.
fbin
function fbino
echo $PATH | perl -nle 'for (split /\s|:/) { print $_ . "/" if -d }' | grep -v '/usr\|^/s\?bin' | xargs -n 1 -I'{}' find '{}' -type f | sort | uniq | xargs -n 1 file | column -s: -t | fzf | perl -pe 's/\s+.+$//; chomp if eof'
end
function fbin
fbino | read -lz result; commandline -- $result; commandline -f repaint
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment