From 6e5cf8619812f375589019bde330aad1f73d00b0 Mon Sep 17 00:00:00 2001 From: Georg Ogris Date: Fri, 18 Dec 2015 11:50:50 +0100 Subject: [PATCH 1/3] when in a ssh session and in case of default user only display where instead of who@where --- themes/agnoster.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 103041eef..a165a6d03 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -79,8 +79,10 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { - if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then + if [[ "$USER" != "$DEFAULT_USER" ]]; then prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" + elif [[ "$USER" == "$DEFAULT_USER" && -n "$SSH_CLIENT" ]]; then + prompt_segment black default "%(!.%{%F{yellow}%}.)%m" fi } From 80ca3c058e595b7961bd37b6bc500eeba80bc20d Mon Sep 17 00:00:00 2001 From: Georg Ogris Date: Tue, 5 Jan 2016 22:47:18 +0100 Subject: [PATCH 2/3] fixed broken indent in previous commit --- themes/agnoster.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index a165a6d03..422af7535 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -79,7 +79,7 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { - if [[ "$USER" != "$DEFAULT_USER" ]]; then + if [[ "$USER" != "$DEFAULT_USER" ]]; then prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" elif [[ "$USER" == "$DEFAULT_USER" && -n "$SSH_CLIENT" ]]; then prompt_segment black default "%(!.%{%F{yellow}%}.)%m" From 9fbdd76ea1621d0fd194a7a667d9e2639b454b23 Mon Sep 17 00:00:00 2001 From: Georg Ogris Date: Thu, 21 Jan 2016 15:24:13 +0100 Subject: [PATCH 3/3] added geeknote plugin initial version --- plugins/geeknote/geeknote.plugin.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/geeknote/geeknote.plugin.zsh diff --git a/plugins/geeknote/geeknote.plugin.zsh b/plugins/geeknote/geeknote.plugin.zsh new file mode 100644 index 000000000..75e529a00 --- /dev/null +++ b/plugins/geeknote/geeknote.plugin.zsh @@ -0,0 +1,19 @@ +# ------------------------------------------------------------------------------ +# FILE: geeknote.plugin.zsh +# DESCRIPTION: oh-my-zsh plugin file. +# AUTHOR: Georg Ogris (georg.ogris@gmail.com) +# VERSION: 0.0.1 +# ------------------------------------------------------------------------------ + + +# add to a new bookmark to Bookmarks +function gnb() { + local link=$1 + shift 1 + + geeknote create --title '"'"$link"'"' \ + --content '"'"$link"'"' \ + --notebook '"Bookmarks"' \ + --tags '"readings"' + #--tags '"'"$@"'"' +}