From 6431a6d543dadc81af76bae8b2c0abcd76eef3d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rn=20=C3=85ne?= Date: Mon, 25 Jul 2016 11:25:34 +0200 Subject: [PATCH] Make prompts show whole hostname. --- dot.bashrc | 2 +- dot.config/fish/config.fish | 16 ++++------------ dot.tcshrc | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/dot.bashrc b/dot.bashrc index c402b1f..9ae5d0b 100644 --- a/dot.bashrc +++ b/dot.bashrc @@ -41,4 +41,4 @@ if [ "$PS1" ]; then b_prompt='$ ' fi fi -PS1="\n${c_reset}${c_user}\u${c_reset}@${c_host}\h${c_reset}:${c_path}\w${c_reset}\n${b_prompt}" +PS1="\n${c_reset}${c_user}\u${c_reset}@${c_host}\H${c_reset}:${c_path}\w${c_reset}\n${b_prompt}" diff --git a/dot.config/fish/config.fish b/dot.config/fish/config.fish index d2acc95..0c68159 100644 --- a/dot.config/fish/config.fish +++ b/dot.config/fish/config.fish @@ -1,17 +1,9 @@ -function fish_prompt - echo - set_color normal - set_color --bold - echo -ns "$USER" - set_color normal - echo -ns '@' (hostname -f) ':' - set_color --bold --background blue white - echo -ns (pwd) - set_color normal - echo - echo -ns "> " +function fish_prompt -d "Write out the prompt" + printf '\n%s%s%s%s@%s:%s%s%s\n> ' (set_color normal) (set_color --bold) (whoami) (set_color normal) (hostname) (set_color --bold --background blue white) (prompt_pwd) (set_color normal) end +export LC_ALL=C + set fish_color_param normal set fish_color_error normal set fish_color_command normal\x1e\x2d\x2dbold diff --git a/dot.tcshrc b/dot.tcshrc index 29f2a80..cadda7c 100644 --- a/dot.tcshrc +++ b/dot.tcshrc @@ -49,5 +49,5 @@ if ($?prompt) then set c_path="37;44" set b_prompt='%% ' endif - set prompt="\n%B%n%b@%m:%B%{\033[${c_path}m%}%~%b\n${b_prompt}" + set prompt="\n%B%n%b@%M:%B%{\033[${c_path}m%}%~%b\n${b_prompt}" endif -- GitLab