Reverse fzf in git pickers
This commit is contained in:
parent
696701e420
commit
9df7d07b95
2 changed files with 3 additions and 3 deletions
|
@ -3,6 +3,6 @@
|
|||
root=$1
|
||||
shift 1
|
||||
if [ -n "$*" ]
|
||||
then find $root -type d -name .git | xargs -L 1 dirname | fzf -1 -q "$*"
|
||||
else find $root -type d -name .git | xargs -L 1 dirname | fzf -1
|
||||
then find $root -type d -name .git | xargs -L 1 dirname | fzf --reverse -1 -q "$*"
|
||||
else find $root -type d -name .git | xargs -L 1 dirname | fzf --reverse -1
|
||||
fi
|
||||
|
|
|
@ -21,6 +21,6 @@ do
|
|||
type=$(echo $line | cut -b -3)
|
||||
/bin/echo -e "$type\x00$(basename $path)\x00$path"
|
||||
done \
|
||||
| fzf --multi --with-nth=2 -d '\0' -q "$*" --history=$history \
|
||||
| fzf --reverse --multi --with-nth=2 -d '\0' -q "$*" --history=$history \
|
||||
--preview='if [ ${1} = "??" ]; then /bin/echo -e "\x1b[32m"; cat {3}; else git diff --color {3}; fi' \
|
||||
| cut -d "$null" -f 3-
|
||||
|
|
Loading…
Reference in a new issue