mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-26 19:39:39 -08:00
fix: escape path with spaces for config file
This commit is contained in:
parent
609a534d73
commit
f64a8fa51a
|
@ -22,7 +22,7 @@ function _omp_hook() {
|
|||
omp_elapsed=$((omp_now-omp_start_time))
|
||||
rm -f "$TIMER_START"
|
||||
fi
|
||||
PS1="$(::OMP:: --config $POSH_THEME --shell bash --error $ret --execution-time $omp_elapsed --stack-count $omp_stack_count)"
|
||||
PS1="$(::OMP:: --config="$POSH_THEME" --shell=bash --error="$ret" --execution-time="$omp_elapsed" --stack-count="$omp_stack_count")"
|
||||
|
||||
return $ret
|
||||
}
|
||||
|
@ -43,5 +43,5 @@ function export_poshconfig() {
|
|||
if [ -z "$format" ]; then
|
||||
format="json"
|
||||
fi
|
||||
::OMP:: --config $POSH_THEME --print-config --config-format $format > $1
|
||||
::OMP:: --config="$POSH_THEME" --print-config --config-format="$format" > $1
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ function _omp-precmd() {
|
|||
omp_now=$(::OMP:: --millis)
|
||||
omp_elapsed=$(($omp_now-$omp_start_time))
|
||||
fi
|
||||
eval "$(::OMP:: --config $POSH_THEME --error $omp_last_error --execution-time $omp_elapsed --stack-count $omp_stack_count --eval --shell zsh)"
|
||||
eval "$(::OMP:: --config="$POSH_THEME" --error="$omp_last_error" --execution-time="$omp_elapsed" --stack-count="$omp_stack_count" --eval --shell=zsh)"
|
||||
unset omp_start_time
|
||||
unset omp_now
|
||||
unset omp_elapsed
|
||||
|
@ -48,7 +48,7 @@ function export_poshconfig() {
|
|||
if [ -z "$format" ]; then
|
||||
format="json"
|
||||
fi
|
||||
::OMP:: --config $POSH_THEME --print-config --config-format $format > $1
|
||||
::OMP:: --config="$POSH_THEME" --print-config --config-format="$format" > $1
|
||||
}
|
||||
|
||||
function self-insert() {
|
||||
|
@ -57,7 +57,7 @@ function self-insert() {
|
|||
zle .self-insert
|
||||
return
|
||||
fi
|
||||
tooltip=$(::OMP:: --config $POSH_THEME --shell zsh --command $BUFFER)
|
||||
tooltip=$(::OMP:: --config="$POSH_THEME" --shell=zsh --command="$BUFFER")
|
||||
# ignore an empty tooltip
|
||||
if [[ ! -z "$tooltip" ]]; then
|
||||
RPROMPT=$tooltip
|
||||
|
@ -79,7 +79,7 @@ _posh-zle-line-init() {
|
|||
local -i ret=$?
|
||||
(( $+zle_bracketed_paste )) && print -r -n - $zle_bracketed_paste[2]
|
||||
|
||||
eval "$(::OMP:: --config $POSH_THEME --print-transient --eval --shell zsh)"
|
||||
eval "$(::OMP:: --config="$POSH_THEME" --print-transient --eval --shell=zsh)"
|
||||
zle .reset-prompt
|
||||
|
||||
# If we received EOT, we exit the shell
|
||||
|
|
Loading…
Reference in a new issue