Last active
June 12, 2019 10:43
-
-
Save ktnyt/36d3ab81b0cf97abf51850a38887e89b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define-command -params 1 -shell-script-candidates %{ | |
if [ -d .git ]; then | |
alias list='git ls-files --exclude-standard -co' | |
{ list | xargs -n1 dirname | sort | uniq | perl -ple '$_.="/"'; list | sort; } | fzy -e "$1" | |
else | |
find . -type f -or -type d | fzy -e "$1" | |
fi | |
} fzy-edit %{ | |
edit %arg{1} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment