From 93d542f67ce02fb1389e0b03ee27bdfbb21b7db5 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sat, 5 Jan 2019 22:58:46 -0500 Subject: [PATCH] Added ip alias and tmuxinator function --- .local/dotfiles/environment/ip.zsh | 1 + .local/dotfiles/environment/tmuxinator.zsh | 31 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .local/dotfiles/environment/ip.zsh create mode 100644 .local/dotfiles/environment/tmuxinator.zsh diff --git a/.local/dotfiles/environment/ip.zsh b/.local/dotfiles/environment/ip.zsh new file mode 100644 index 0000000..ba2473d --- /dev/null +++ b/.local/dotfiles/environment/ip.zsh @@ -0,0 +1 @@ +alias ip="ip --color" diff --git a/.local/dotfiles/environment/tmuxinator.zsh b/.local/dotfiles/environment/tmuxinator.zsh new file mode 100644 index 0000000..f53d3bc --- /dev/null +++ b/.local/dotfiles/environment/tmuxinator.zsh @@ -0,0 +1,31 @@ +_tmuxinator() { + local commands projects + commands=(${(f)"$(tmuxinator commands zsh)"}) + projects=(${(f)"$(tmuxinator completions start)"}) + + if (( CURRENT == 2 )); then + _alternative \ + 'commands:: _describe -t commands "tmuxinator subcommands" commands' \ + 'projects:: _describe -t projects "tmuxinator projects" projects' + elif (( CURRENT == 3)); then + case $words[2] in + copy|debug|delete|open|start) + _arguments '*:projects:($projects)' + ;; + esac + fi + + return +} + +compdef _tmuxinator tmuxinator mux +alias mux="tmuxinator" + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 2 +# indent-tabs-mode: nil +# sh-basic-offset: 2 +# End: +# vim: ft=zsh sw=2 ts=2 et +