diff --git a/install.zsh b/install.zsh index 121ac8f..eabfabd 100755 --- a/install.zsh +++ b/install.zsh @@ -31,7 +31,8 @@ for plugin in $plugins; do error $plugin_directory contains unstaged changes fi pull=`git -C $plugin_directory pull` - if [ "$pull" != "Already up-to-date." ]; then + if [ "$pull" != "Already up to date." ] && \ + [ "$pull" != "Already up-to-date." ]; then echo changed pulled $plugin_directory fi else @@ -53,7 +54,7 @@ symlinks=( ~/.config/zsh/zshenv ~/.zshenv ~/.config/zsh/zshrc ~/.zshrc ~/.config/zsh/prompt_fresh_setup - ~/.local/share/zsh/site-functions/prompt_fresh_setup + ~/.local/share/zsh/site-functions/prompt_fresh_setup ~/.config/zsh/cmake-uninstall ~/.local/bin/cmake-uninstall ~/.config/zsh/$ ~/.local/bin/$ ~/.config/zsh/url/url ~/.local/bin/url diff --git a/session/_session b/session/_session new file mode 100644 index 0000000..c1603f9 --- /dev/null +++ b/session/_session @@ -0,0 +1,32 @@ +#compdef session + +__session_sessions() { + list() { + for item in $HOME/.local/share/tmux/layouts/session-*; do + item=${item#$HOME/.local/share/tmux/layouts/} + echo ${item#session-} + done + } + local -a sessions + sessions=(${(fo)"$(list)"}) + _describe 'session' sessions +} + +__session_hosts() { + list() { + declare -A hosts + if [ -f ~/.config/session ]; then + source ~/.config/session + for key val in "${(@kv)hosts}"; do + echo $key + done + fi + } + local -a hosts + hosts=(${(fo)"$(list)"}) + _describe 'host' hosts +} + +_arguments \ + ':session:__session_sessions' \ + ':host:__session_hosts'