From 891146d27ba6fbc41f14219257a2cbdbaba97678 Mon Sep 17 00:00:00 2001 From: Christian Busch Date: Sat, 16 Apr 2016 21:05:07 +0200 Subject: [PATCH] Fixed a bug with unwanted spaces in prompt --- .tmux.conf | 2 +- .zsh/lib/misc.zsh | 3 ++- .zsh/lib/prompt.zsh | 14 +++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index dfc6e32..73a27bf 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -121,4 +121,4 @@ set -g message-attr bold set -g message-fg colour232 set -g message-bg colour166 -# } \ No newline at end of file +# } diff --git a/.zsh/lib/misc.zsh b/.zsh/lib/misc.zsh index 1d95446..6d59219 100644 --- a/.zsh/lib/misc.zsh +++ b/.zsh/lib/misc.zsh @@ -10,4 +10,5 @@ setopt long_list_jobs ## pager export PAGER=less -export LC_CTYPE=$LANG \ No newline at end of file +export LC_CTYPE=$LANG +export LC_ALL=de_DE.UTF-8 diff --git a/.zsh/lib/prompt.zsh b/.zsh/lib/prompt.zsh index 439e206..be8c900 100644 --- a/.zsh/lib/prompt.zsh +++ b/.zsh/lib/prompt.zsh @@ -4,18 +4,18 @@ promptinit # Change user name color to red if logged in as root if [[ $UID == 0 || $EUID == 0 ]]; then - PROMPT='$fg[red]%n@%m ' + PROMPT='%F{red}%n@%m%f ' else - PROMPT='$fg[blue]%n@%m ' + PROMPT='%F{blue}%n@%m%f ' fi -PROMPT+='$fg[yellow]%~ ' +PROMPT+='%F{yellow}%~%f ' -# Change green arrows (⇣⇡) if cnnection is via ssh +# Change green arrows (⇣⇡) if connection is via ssh if [[ "${SSH_TTY}" ]]; then - PROMPT+="$fg[green]⇣⇡ $fg[white]〉"; + PROMPT+="%F{green}⇣⇡%f %F{white}〉%f"; else - PROMPT+="$fg[white]〉"; + PROMPT+="%F{white}〉%f"; fi; -PROMPT+='%{$reset_color%}' \ No newline at end of file +PROMPT+='%{$reset_color%}'