mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
change name of the function
This commit is contained in:
parent
8dfee7ff76
commit
37d91d0c29
15 changed files with 18 additions and 18 deletions
|
@ -18,5 +18,5 @@ function fish_fallback_prompt --description "A simple fallback prompt without to
|
|||
set suffix '>'
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
end
|
||||
|
|
|
@ -18,5 +18,5 @@ function fish_prompt --description "Write out the prompt"
|
|||
set suffix '>'
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@ if not set -q __fish_prompt_hostname
|
|||
set -g __fish_prompt_hostname (hostname | string split '.')[1]
|
||||
end
|
||||
|
||||
function fish_prompt_hostname
|
||||
function prompt_hostname
|
||||
echo $__fish_prompt_hostname
|
||||
end
|
|
@ -15,5 +15,5 @@ function fish_prompt --description "Write out the prompt"
|
|||
set suffix '>'
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
end
|
||||
|
|
|
@ -25,5 +25,5 @@ function fish_prompt --description "Write out the prompt"
|
|||
set suffix '>'
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
|
||||
end
|
||||
|
|
|
@ -63,5 +63,5 @@ function fish_prompt --description 'Write out the prompt'
|
|||
set prompt_status ' ' (set_color $fish_color_status) "[$last_status]" "$normal"
|
||||
end
|
||||
|
||||
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $fish_color_host) (fish_prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (__fish_vcs_prompt) $normal $prompt_status "> "
|
||||
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $fish_color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (__fish_vcs_prompt) $normal $prompt_status "> "
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@ function fish_prompt --description 'Write out the prompt, prepending the Debian
|
|||
end
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '# '
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '# '
|
||||
|
||||
case '*'
|
||||
|
||||
|
@ -43,7 +43,7 @@ function fish_prompt --description 'Write out the prompt, prepending the Debian
|
|||
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '> '
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" '> '
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,7 +32,7 @@ if not set -q __fish_prompt_cwd
|
|||
end
|
||||
end
|
||||
|
||||
printf '%s@%s %s%s%s# ' $USER (fish_prompt_hostname) "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal"
|
||||
printf '%s@%s %s%s%s# ' $USER (prompt_hostname) "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal"
|
||||
|
||||
case '*'
|
||||
|
||||
|
@ -40,7 +40,7 @@ if not set -q __fish_prompt_cwd
|
|||
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
||||
end
|
||||
|
||||
printf '[%s] %s%s@%s %s%s %s(%s)%s \f\r> ' (date "+%H:%M:%S") "$__fish_color_blue" $USER (fish_prompt_hostname) "$__fish_prompt_cwd" "$PWD" "$__fish_color_status" "$stat" "$__fish_prompt_normal"
|
||||
printf '[%s] %s%s@%s %s%s %s(%s)%s \f\r> ' (date "+%H:%M:%S") "$__fish_color_blue" $USER (prompt_hostname) "$__fish_prompt_cwd" "$PWD" "$__fish_color_status" "$stat" "$__fish_prompt_normal"
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,5 +10,5 @@ function fish_prompt --description 'Write out the prompt'
|
|||
set -g __fish_prompt_cwd (set_color $fish_color_cwd)
|
||||
end
|
||||
|
||||
echo -n -s "$USER" @ (fish_prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) (__fish_vcs_prompt) "$__fish_prompt_normal" '> '
|
||||
echo -n -s "$USER" @ (prompt_hostname) ' ' "$__fish_prompt_cwd" (prompt_pwd) (__fish_vcs_prompt) "$__fish_prompt_normal" '> '
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ function fish_prompt
|
|||
else
|
||||
set_color -o cyan
|
||||
end
|
||||
echo -n (fish_prompt_hostname)
|
||||
echo -n (prompt_hostname)
|
||||
set_color -o white
|
||||
#echo -n :(prompt_pwd)
|
||||
echo -n :(pwd|sed "s=$HOME=~=")
|
||||
|
|
|
@ -12,7 +12,7 @@ function fish_prompt
|
|||
printf ' at '
|
||||
|
||||
set_color magenta
|
||||
echo -n (fish_prompt_hostname)
|
||||
echo -n (prompt_hostname)
|
||||
set_color normal
|
||||
printf ' in '
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
# author: Matthias
|
||||
function fish_prompt -d "Write out the prompt"
|
||||
if test -z $WINDOW
|
||||
printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (fish_prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
else
|
||||
printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (fish_prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# author: Ivan Tham <ivanthamjunhoe@gmail.com>
|
||||
|
||||
function fish_prompt
|
||||
test $SSH_TTY; and printf (set_color red)(whoami)(set_color white)'@'(set_color yellow)(fish_prompt_hostname)' '
|
||||
test $SSH_TTY; and printf (set_color red)(whoami)(set_color white)'@'(set_color yellow)(prompt_hostname)' '
|
||||
|
||||
test $USER = 'root'; and echo (set_color red)"#"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ function fish_prompt --description 'Write out the prompt'
|
|||
|
||||
# Host
|
||||
set_color $fish_color_host
|
||||
echo -n (fish_prompt_hostname)
|
||||
echo -n (prompt_hostname)
|
||||
set_color normal
|
||||
|
||||
echo -n ':'
|
||||
|
|
|
@ -9,5 +9,5 @@ function fish_prompt -d "Write out the prompt"
|
|||
case root toor; set prompt_symbol '#'
|
||||
case '*'; set prompt_symbol '$'
|
||||
end
|
||||
printf "[%s@%s %s%s%s]%s " $USER (fish_prompt_hostname) (set_color $fish_color_cwd) $pwd (set_color normal) $prompt_symbol
|
||||
printf "[%s@%s %s%s%s]%s " $USER (prompt_hostname) (set_color $fish_color_cwd) $pwd (set_color normal) $prompt_symbol
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue