configure fish prompt
This commit is contained in:
parent
6a49608745
commit
b12ac895c2
4 changed files with 59 additions and 46 deletions
|
|
@ -2,42 +2,43 @@
|
||||||
# VERSION: 3.0
|
# VERSION: 3.0
|
||||||
SETUVAR --export EDITOR:nvim
|
SETUVAR --export EDITOR:nvim
|
||||||
SETUVAR __fish_initialized:3800
|
SETUVAR __fish_initialized:3800
|
||||||
SETUVAR fish_color_autosuggestion:586e75
|
SETUVAR fish_color_autosuggestion:brblack
|
||||||
SETUVAR fish_color_cancel:\x2d\x2dreverse
|
SETUVAR fish_color_cancel:\x2d\x2dreverse
|
||||||
SETUVAR fish_color_command:93a1a1
|
SETUVAR fish_color_command:normal
|
||||||
SETUVAR fish_color_comment:586e75
|
SETUVAR fish_color_comment:red
|
||||||
SETUVAR fish_color_cwd:green
|
SETUVAR fish_color_cwd:green
|
||||||
SETUVAR fish_color_cwd_root:red
|
SETUVAR fish_color_cwd_root:red
|
||||||
SETUVAR fish_color_end:268bd2
|
SETUVAR fish_color_end:green
|
||||||
SETUVAR fish_color_error:dc322f
|
SETUVAR fish_color_error:brred
|
||||||
SETUVAR fish_color_escape:00a6b2
|
SETUVAR fish_color_escape:brcyan
|
||||||
SETUVAR fish_color_history_current:\x2d\x2dbold
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
SETUVAR fish_color_host:normal
|
SETUVAR fish_color_host:normal
|
||||||
SETUVAR fish_color_host_remote:yellow
|
SETUVAR fish_color_host_remote:yellow
|
||||||
SETUVAR fish_color_keyword:93a1a1
|
SETUVAR fish_color_keyword:normal
|
||||||
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
SETUVAR fish_color_normal:normal
|
SETUVAR fish_color_normal:normal
|
||||||
SETUVAR fish_color_operator:00a6b2
|
SETUVAR fish_color_operator:brcyan
|
||||||
SETUVAR fish_color_option:839496
|
SETUVAR fish_color_option:cyan
|
||||||
SETUVAR fish_color_param:839496
|
SETUVAR fish_color_param:cyan
|
||||||
SETUVAR fish_color_quote:657b83
|
SETUVAR fish_color_quote:yellow
|
||||||
SETUVAR fish_color_redirection:6c71c4
|
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
|
||||||
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dblack
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
SETUVAR fish_color_status:red
|
SETUVAR fish_color_status:red
|
||||||
SETUVAR fish_color_user:brgreen
|
SETUVAR fish_color_user:brgreen
|
||||||
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_greeting:\x1d
|
||||||
SETUVAR fish_key_bindings:fish_default_key_bindings
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
SETUVAR fish_pager_color_background:\x1d
|
SETUVAR fish_pager_color_background:\x1d
|
||||||
SETUVAR fish_pager_color_completion:B3A06D
|
SETUVAR fish_pager_color_completion:normal
|
||||||
SETUVAR fish_pager_color_description:B3A06D
|
SETUVAR fish_pager_color_description:yellow\x1e\x2d\x2ditalics
|
||||||
SETUVAR fish_pager_color_prefix:cyan\x1e\x2d\x2dunderline
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
SETUVAR fish_pager_color_secondary_background:\x1d
|
SETUVAR fish_pager_color_secondary_background:\x1d
|
||||||
SETUVAR fish_pager_color_secondary_completion:\x1d
|
SETUVAR fish_pager_color_secondary_completion:\x1d
|
||||||
SETUVAR fish_pager_color_secondary_description:\x1d
|
SETUVAR fish_pager_color_secondary_description:\x1d
|
||||||
SETUVAR fish_pager_color_secondary_prefix:\x1d
|
SETUVAR fish_pager_color_secondary_prefix:\x1d
|
||||||
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
|
SETUVAR fish_pager_color_selected_background:\x2d\x2dreverse
|
||||||
SETUVAR fish_pager_color_selected_completion:\x1d
|
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||||
SETUVAR fish_pager_color_selected_description:\x1d
|
SETUVAR fish_pager_color_selected_description:\x1d
|
||||||
SETUVAR fish_pager_color_selected_prefix:\x1d
|
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,28 @@
|
||||||
function fish_prompt --description 'Write out the prompt'
|
function fish_prompt
|
||||||
set -l last_status $status
|
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
||||||
set -l normal (set_color normal)
|
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
||||||
set -l status_color (set_color brgreen)
|
end
|
||||||
set -l cwd_color (set_color $fish_color_cwd)
|
# set_color yellow
|
||||||
set -l vcs_color (set_color brpurple)
|
# printf '%s' $USER
|
||||||
set -l prompt_status ""
|
# set_color normal
|
||||||
|
# printf ' at '
|
||||||
# Since we display the prompt on a new line allow the directory names to be longer.
|
# set_color magenta
|
||||||
set -q fish_prompt_pwd_dir_length
|
# echo -n (prompt_hostname)
|
||||||
or set -lx fish_prompt_pwd_dir_length 0
|
# set_color normal
|
||||||
|
# printf ' in '
|
||||||
# Color the prompt differently when we're root
|
set -U fish_greeting
|
||||||
set -l suffix '❯'
|
set_color $fish_color_cwd
|
||||||
if functions -q fish_is_root_user; and fish_is_root_user
|
printf '%s' (pwd)
|
||||||
if set -q fish_color_cwd_root
|
|
||||||
set cwd_color (set_color $fish_color_cwd_root)
|
set_color magenta
|
||||||
end
|
set -g __fish_git_prompt_show_informative_status true
|
||||||
set suffix '#'
|
printf '%s' (fish_vcs_prompt)
|
||||||
end
|
set_color normal
|
||||||
|
# Line 2
|
||||||
# Color the prompt in red on error
|
echo
|
||||||
if test $last_status -ne 0
|
if test -n "$VIRTUAL_ENV"
|
||||||
set status_color (set_color $fish_color_error)
|
printf "(%s) " (set_color blue)(path basename $VIRTUAL_ENV)(set_color normal)
|
||||||
set prompt_status $status_color "[" $last_status "]" $normal
|
end
|
||||||
end
|
printf '↪ '
|
||||||
|
set_color normal
|
||||||
echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status
|
|
||||||
echo -n -s $status_color $suffix ' ' $normal
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
9
.config/fish/functions/fish_right_prompt.fish
Normal file
9
.config/fish/functions/fish_right_prompt.fish
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
function fish_right_prompt -d "Write out the right prompt"
|
||||||
|
if not set -q VIRTUAL_ENV_DISABLE_PROMPT
|
||||||
|
set -g VIRTUAL_ENV_DISABLE_PROMPT true
|
||||||
|
end
|
||||||
|
|
||||||
|
set_color brblack
|
||||||
|
date '+%H:%M:%S'
|
||||||
|
end
|
||||||
|
|
||||||
5
test
Normal file
5
test
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
dsad
|
||||||
|
dsadsa
|
||||||
|
dsa
|
||||||
|
dsadsad
|
||||||
|
ds
|
||||||
Loading…
Add table
Add a link
Reference in a new issue