1
0
Fork 0

change tab name to working directory on cd and exit in lf

This commit is contained in:
Luca Bilke 2022-08-01 14:30:07 +02:00
parent 9677e3b148
commit 758ad758f4

View file

@ -1,6 +1,5 @@
set ratios 1:2:4
# Basic vars
set ratios 1:2:4
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
@ -135,7 +134,11 @@ cmd git_branch ${{
lf -remote "send $id cd \"$pwd_shell\""
}}
cmd on-cd &{{
DIR=$(echo $PWD | sed "s|$HOME|~|")
printf "\033]0;  $DIR\007" > /dev/tty
# display git repository status in your prompt
source /usr/share/git/completion/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=auto
@ -147,6 +150,13 @@ cmd on-cd &{{
fmt="\033[32;1m%u@%h\033[0m:\033[34;1m%w\033[0m\033[33;1m$git\033[0m"
lf -remote "send $id set promptfmt \"$fmt\""
}}
# run at startup
on-cd
cmd on-quit ${{
DIR=$(echo $PWD | sed "s|$HOME|~|")
printf "\033]0; $DIR\007" > /dev/tty
}}
cmd paste &{{
set -- $(cat ~/.local/share/lf/files)