starship -> custom PROMPT
This commit is contained in:
parent
11f8f44e52
commit
e01d8f45c5
1 changed files with 12 additions and 11 deletions
|
|
@ -22,15 +22,15 @@ setopt HIST_IGNORE_DUPS
|
||||||
setopt HIST_REDUCE_BLANKS
|
setopt HIST_REDUCE_BLANKS
|
||||||
setopt HIST_FIND_NO_DUPS
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
|
||||||
function fzf-history-widget() {
|
# options
|
||||||
local selected_command=$(history -rn 1 | fzf --preview 'echo {}' --preview-window=down:3:wrap)
|
setopt auto_param_slash
|
||||||
if [[ -n $selected_command ]]; then
|
setopt interactive_comments
|
||||||
LBUFFER="$selected_command"
|
|
||||||
fi
|
# disable C-s
|
||||||
zle reset-prompt
|
stty stop undef
|
||||||
}
|
|
||||||
zle -N fzf-history-widget
|
# fzf
|
||||||
bindkey '^R' fzf-history-widget
|
source <(fzf --zsh)
|
||||||
|
|
||||||
# Enable command completion
|
# Enable command completion
|
||||||
autoload -Uz compinit && compinit
|
autoload -Uz compinit && compinit
|
||||||
|
|
@ -48,6 +48,7 @@ source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
|
|
||||||
# prompt
|
# prompt
|
||||||
eval "$(starship init zsh)"
|
# eval "$(starship init zsh)"
|
||||||
|
|
||||||
[ -f "/home/wball/.local/share/ghcup/env" ] && . "/home/wball/.local/share/ghcup/env" # ghcup-env
|
PROMPT="[%F{#89b4fa}%n %F{#f5c2e7}%~%f] %F{#a6e3a1}λ%f "
|
||||||
|
RPROMPT="[%F{#fab387}%?%f]"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue