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
|
root=$1
|
||||||
shift 1
|
shift 1
|
||||||
if [ -n "$*" ]
|
if [ -n "$*" ]
|
||||||
then find $root -type d -name .git | xargs -L 1 dirname | fzf -1 -q "$*"
|
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 -1
|
else find $root -type d -name .git | xargs -L 1 dirname | fzf --reverse -1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -21,6 +21,6 @@ do
|
||||||
type=$(echo $line | cut -b -3)
|
type=$(echo $line | cut -b -3)
|
||||||
/bin/echo -e "$type\x00$(basename $path)\x00$path"
|
/bin/echo -e "$type\x00$(basename $path)\x00$path"
|
||||||
done \
|
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' \
|
--preview='if [ ${1} = "??" ]; then /bin/echo -e "\x1b[32m"; cat {3}; else git diff --color {3}; fi' \
|
||||||
| cut -d "$null" -f 3-
|
| cut -d "$null" -f 3-
|
||||||
|
|
Loading…
Reference in a new issue