From 37d91d0c293ded842c2e14c854dbc544df605f8b Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Sun, 23 Oct 2016 15:02:14 -0700 Subject: [PATCH] change name of the function --- share/functions/fish_fallback_prompt.fish | 2 +- share/functions/fish_prompt.fish | 2 +- .../{fish_prompt_hostname.fish => prompt_hostname.fish} | 2 +- share/tools/web_config/sample_prompts/classic.fish | 2 +- share/tools/web_config/sample_prompts/classic_status.fish | 2 +- share/tools/web_config/sample_prompts/classic_vcs.fish | 2 +- share/tools/web_config/sample_prompts/debian_chroot.fish | 4 ++-- share/tools/web_config/sample_prompts/informative.fish | 4 ++-- share/tools/web_config/sample_prompts/lonetwin.fish | 2 +- share/tools/web_config/sample_prompts/nim.fish | 2 +- share/tools/web_config/sample_prompts/pythonista.fish | 2 +- share/tools/web_config/sample_prompts/screen_savvy.fish | 4 ++-- share/tools/web_config/sample_prompts/sorin.fish | 2 +- share/tools/web_config/sample_prompts/terlar.fish | 2 +- share/tools/web_config/sample_prompts/user_host_path.fish | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) rename share/functions/{fish_prompt_hostname.fish => prompt_hostname.fish} (92%) diff --git a/share/functions/fish_fallback_prompt.fish b/share/functions/fish_fallback_prompt.fish index ec5bfb7d5..1910eeaea 100644 --- a/share/functions/fish_fallback_prompt.fish +++ b/share/functions/fish_fallback_prompt.fish @@ -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 diff --git a/share/functions/fish_prompt.fish b/share/functions/fish_prompt.fish index 5a0e6243a..7f8581971 100644 --- a/share/functions/fish_prompt.fish +++ b/share/functions/fish_prompt.fish @@ -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 diff --git a/share/functions/fish_prompt_hostname.fish b/share/functions/prompt_hostname.fish similarity index 92% rename from share/functions/fish_prompt_hostname.fish rename to share/functions/prompt_hostname.fish index be9fba9dc..4348bce21 100644 --- a/share/functions/fish_prompt_hostname.fish +++ b/share/functions/prompt_hostname.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/classic.fish b/share/tools/web_config/sample_prompts/classic.fish index 0be38222b..4310d9594 100644 --- a/share/tools/web_config/sample_prompts/classic.fish +++ b/share/tools/web_config/sample_prompts/classic.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/classic_status.fish b/share/tools/web_config/sample_prompts/classic_status.fish index a004d6073..d180a4d74 100644 --- a/share/tools/web_config/sample_prompts/classic_status.fish +++ b/share/tools/web_config/sample_prompts/classic_status.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/classic_vcs.fish b/share/tools/web_config/sample_prompts/classic_vcs.fish index 92513ef10..683e91778 100644 --- a/share/tools/web_config/sample_prompts/classic_vcs.fish +++ b/share/tools/web_config/sample_prompts/classic_vcs.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/debian_chroot.fish b/share/tools/web_config/sample_prompts/debian_chroot.fish index 1f6fffe7f..a1666ea97 100644 --- a/share/tools/web_config/sample_prompts/debian_chroot.fish +++ b/share/tools/web_config/sample_prompts/debian_chroot.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/informative.fish b/share/tools/web_config/sample_prompts/informative.fish index 40df49e7e..41468b39e 100644 --- a/share/tools/web_config/sample_prompts/informative.fish +++ b/share/tools/web_config/sample_prompts/informative.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/lonetwin.fish b/share/tools/web_config/sample_prompts/lonetwin.fish index 4b448d313..cd4abfdc8 100644 --- a/share/tools/web_config/sample_prompts/lonetwin.fish +++ b/share/tools/web_config/sample_prompts/lonetwin.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/nim.fish b/share/tools/web_config/sample_prompts/nim.fish index e9392e13f..ef3de3242 100644 --- a/share/tools/web_config/sample_prompts/nim.fish +++ b/share/tools/web_config/sample_prompts/nim.fish @@ -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=~=") diff --git a/share/tools/web_config/sample_prompts/pythonista.fish b/share/tools/web_config/sample_prompts/pythonista.fish index d4597a25d..6607e5b87 100644 --- a/share/tools/web_config/sample_prompts/pythonista.fish +++ b/share/tools/web_config/sample_prompts/pythonista.fish @@ -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 ' diff --git a/share/tools/web_config/sample_prompts/screen_savvy.fish b/share/tools/web_config/sample_prompts/screen_savvy.fish index c75b81466..3d72178ec 100644 --- a/share/tools/web_config/sample_prompts/screen_savvy.fish +++ b/share/tools/web_config/sample_prompts/screen_savvy.fish @@ -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 diff --git a/share/tools/web_config/sample_prompts/sorin.fish b/share/tools/web_config/sample_prompts/sorin.fish index ad0c89b9d..0608047f2 100644 --- a/share/tools/web_config/sample_prompts/sorin.fish +++ b/share/tools/web_config/sample_prompts/sorin.fish @@ -2,7 +2,7 @@ # author: Ivan Tham 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)"#" diff --git a/share/tools/web_config/sample_prompts/terlar.fish b/share/tools/web_config/sample_prompts/terlar.fish index 612d50ac5..c8dfefc39 100644 --- a/share/tools/web_config/sample_prompts/terlar.fish +++ b/share/tools/web_config/sample_prompts/terlar.fish @@ -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 ':' diff --git a/share/tools/web_config/sample_prompts/user_host_path.fish b/share/tools/web_config/sample_prompts/user_host_path.fish index b4a1be6a1..c7483b6a0 100644 --- a/share/tools/web_config/sample_prompts/user_host_path.fish +++ b/share/tools/web_config/sample_prompts/user_host_path.fish @@ -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