aboutsummaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc18
1 files changed, 13 insertions, 5 deletions
diff --git a/.zshrc b/.zshrc
index a89cc6d..64b6e01 100644
--- a/.zshrc
+++ b/.zshrc
@@ -5,7 +5,15 @@ autoload -U colors && colors
export GIT_PS1_SHOWUPSTREAM="verbose"
-PS1="%B%{$fg[yellow]%}%n% %{$fg[blue]%}%~ %{$fg[green]%}$%{$reset_color%}%b "
+function sshi() {
+ if [[ -n $SSH_CLIENT || -n $SSH_TTY ]]; then
+ echo "%{$fg[cyan]%}@%m%f "
+ fi
+}
+
+#PS1="%B%{$fg[yellow]%}%n %{$fg[blue]%}%~ %{$fg[green]%}$%{$reset_color%}%b "
+PS1="%B%{$fg[yellow]%}%n$(sshi) %{$fg[blue]%}%~ %{$fg[green]%}v%{$reset_color%}%b "
+#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " # Luke Conf
source /usr/lib/git-core/git-sh-prompt
@@ -17,7 +25,6 @@ set_git_prompt() {
autoload -Uz add-zsh-hook
add-zsh-hook precmd set_git_prompt
-#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " # Luke Conf
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
@@ -54,14 +61,15 @@ bindkey -v '^?' backward-delete-char
function zle-line-init zle-keymap-select {
if [[ ${KEYMAP} == vicmd ]] ||
[[ $1 = 'block' ]]; then
- PS1="%B%{$fg[yellow]%}%n% %{$fg[blue]%}%~ %{$fg[green]%}<%{$reset_color%}%b "
+ #PS1="%B%{$fg[yellow]%}%n% %{$fg[blue]%}%~ %{$fg[green]%}<%{$reset_color%}%b "
+ PS1="%B%{$fg[yellow]%}%n$(sshi) %{$fg[blue]%}%~ %{$fg[green]%}<%{$reset_color%}%b "
elif [[ ${KEYMAP} == main ]] ||
[[ ${KEYMAP} == viins ]] ||
[[ ${KEYMAP} = '' ]] ||
[[ $1 = 'beam' ]]; then
- PS1="%B%{$fg[yellow]%}%n% %{$fg[blue]%}%~ %{$fg[green]%}>%{$reset_color%}%b "
+ PS1="%B%{$fg[yellow]%}%n$(sshi) %{$fg[blue]%}%~ %{$fg[green]%}>%{$reset_color%}%b "
else
- PS1="%B%{$fg[yellow]%}%n% %{$fg[blue]%}%~ %{$fg[green]%}v%{$reset_color%}%b "
+ PS1="%B%{$fg[yellow]%}%n$(sshi) %{$fg[blue]%}%~ %{$fg[green]%}v%{$reset_color%}%b "
fi
zle reset-prompt
}