lf: change fzf scheme, tiebreak
This commit is contained in:
parent
0b1c26a020
commit
5bcd3a93ac
1 changed files with 2 additions and 6 deletions
|
@ -114,7 +114,6 @@ cmd dupe &{{
|
|||
|
||||
cmd fzf ${{
|
||||
name="$1" input="$2" delimiter="$3" field="$4" path_field="$5" width="$6" query="${7:-}"
|
||||
histfile="$XDG_DATA_HOME/lf/$(echo $name | tr '[:upper:]' '[:lower:]')_history"
|
||||
|
||||
clear
|
||||
file="$(eval "$input" | fzf \
|
||||
|
@ -125,8 +124,7 @@ cmd fzf ${{
|
|||
--with-nth="$field" \
|
||||
--preview-window="right,$width" \
|
||||
--bind="space:accept,focus:transform-preview-label(echo {} | cut -d '$delimiter' -f '$path_field')" \
|
||||
--scheme='history' \
|
||||
--history="$histfile" \
|
||||
--tiebreak="begin" \
|
||||
--header="$name" \
|
||||
--preview='
|
||||
file=$(echo {} | cut -d '$delimiter' -f '$path_field')
|
||||
|
@ -183,15 +181,13 @@ return 0
|
|||
|
||||
cmd find_project ${{
|
||||
dirs=$(echo $XDG_DOCUMENTS_DIR/dev/*/*)
|
||||
histfile="$XDG_DATA_HOME/lf/project_history"
|
||||
|
||||
clear
|
||||
project="$(echo $dirs | xargs -n1 basename | fzf \
|
||||
--preview-window="right,50%" \
|
||||
--bind="space:accept,focus:transform-preview-label(echo {})" \
|
||||
--scheme='history' \
|
||||
--history="$histfile" \
|
||||
--header="Projects" \
|
||||
--tiebreak="begin" \
|
||||
--preview='
|
||||
f={}
|
||||
dir=$(echo $XDG_DOCUMENTS_DIR/dev/*/* | xargs -n1 | sed -n "/\/$f$/p")
|
||||
|
|
Loading…
Add table
Reference in a new issue