Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fish_prompt is a function with definition
- function fish_prompt --description 'Write out the prompt'
- set last_ret $status
- # Just calculate these once, to save a few cycles when displaying the prompt
- if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
- end
- if not set -q __fish_prompt_normal
- set -g __fish_prompt_normal (set_color normal)
- end
- if not set -q __fish_prompt_cwd
- set -g __fish_prompt_cwd (set_color $fish_color_cwd)
- end
- if not set -q __fish_prompt_colors
- set -g __fish_prompt_color_red (set_color -o red)
- set -g __fish_prompt_color_yellow (set_color -o yellow)
- set -g __fish_prompt_color_green (set_color -o green)
- end
- printf '%s[%s%s%s] %s%s@%s %s%s%s%s%s> ' "$__fish_prompt_color_red" "$__fish_prompt_color_yellow" $last_ret "$__fish_prompt_color_red" "$__fish_prompt_color_green" $USER $__fish_prompt_hostname "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_color_yellow" (__fish_git_branch_prompt) "$__fish_prompt_normal"
- end
Add Comment
Please, Sign In to add comment