mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
Merge de1d393521 into 5464fe3e4a
This commit is contained in:
commit
586fb1834b
2 changed files with 22 additions and 1 deletions
19
plugins/geeknote/geeknote.plugin.zsh
Normal file
19
plugins/geeknote/geeknote.plugin.zsh
Normal 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 '"'"$@"'"'
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue