1
0
Fork 0

lf: change fzf scheme, tiebreak

This commit is contained in:
Luca Bilke 2024-08-06 15:56:03 +02:00
parent dff6ce0860
commit ec34931d4a
Signed by: luca
GPG Key ID: F6E11C9BAA7C82F5
1 changed files with 2 additions and 6 deletions

View File

@ -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")