This commit is contained in:
georg 2016-01-21 14:25:23 +00:00
commit 586fb1834b
2 changed files with 22 additions and 1 deletions

View file

@ -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 '"'"$@"'"'
}

View file

@ -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
}