lf: fix prompt at root
This commit is contained in:
parent
bf6c2a5562
commit
1fe17d2082
|
@ -72,8 +72,8 @@ cmd link &{{
|
|||
cmd bulkrename $vidir
|
||||
|
||||
cmd on-cd &{{
|
||||
lf -remote "send $id set promptfmt \"$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_PROMPT')\""
|
||||
printf "%b" "\033]0;$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_TITLE')\007" > /dev/tty
|
||||
lf -remote "send $id set promptfmt \"$(${HOME}/.local/libexec/lf_prompt)\""
|
||||
printf "%b" "\033]0;$(zsh -c 'print -P %n@%m [%3~] ')\007" > /dev/tty
|
||||
}}
|
||||
|
||||
cmd on-quit &printf "\033]0; $(echo $PWD | sed "s|$HOME|~|")\007" > /dev/tty
|
||||
|
|
|
@ -19,7 +19,7 @@ function lfwrap() {
|
|||
LF_DIRFILE="$(mktemp -u)"
|
||||
|
||||
env lfX -last-dir-path="$LF_DIRFILE" \
|
||||
-command "set promptfmt \"$(zsh -c 'source $ZDOTDIR/configs/prompt; source $ZDOTDIR/configs/hashes; print -P $LF_PROMPT')\""
|
||||
-command "set promptfmt \"$(${HOME}/.local/libexec/lf_prompt)\""
|
||||
|
||||
dir="$(cat "$LF_DIRFILE")"
|
||||
rm "$LF_DIRFILE" &>/dev/null
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/zsh
|
||||
|
||||
export PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b '
|
||||
export RPROMPT='%(?..%F{red}%?) $(venv_prompt)'
|
||||
|
||||
[ ! -f $XDG_DATA_HOME/zsh/history ] && mkdir -p $XDG_DATA_HOME/zsh && touch $XDG_DATA_HOME/zsh/history
|
||||
|
||||
fpath=($XDG_CONFIG_HOME/zsh/completions $fpath)
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
export PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~%F{magenta}] %(?.%F{green}.%F{red})»%f%b '
|
||||
export RPROMPT='%(?..%F{red}%?) $(venv_prompt)'
|
||||
|
||||
export LF_PROMPT='%B%F{blue}%n%F{cyan}@%F{blue}%m %F{magenta}[%F{white}%3~/%F{yellow}%%f%f%F{magenta}]'
|
||||
export LF_TITLE='%n@%m [%3~] '
|
Loading…
Reference in New Issue