case "$type" in
"bash") start_dir="$HOME";;
+ "remote") start_dir="$HOME";;
"puppet") start_dir="/etc/puppetlabs/code"
esac
if tmux has-session -t "$type" 2>/dev/null; then
tmux $m -t "$type"
else
- if [ -n "$start_dir" ]; then
+ if [ "$type" = "remote" ]; then
+ tmux new-session -d -c $start_dir -s "$type" mosh immae.eu \; \
+ $m -t "$type"
+ elif [ -n "$start_dir" ]; then
tmux new-session -d -c $start_dir -s "$type" \; \
$m -t "$type" \; \
new-window -c $start_dir
local cur="${COMP_WORDS[COMP_CWORD]}"
prefix="$HOME/workdir/"
local IFS=$'\n'
- local items=($(IFS=' ' compgen -W "bash puppet" -- $cur) $(compgen -d $prefix$cur))
+ local items=($(IFS=' ' compgen -W "bash remote puppet" -- $cur) $(compgen -d $prefix$cur))
for item in ${items[@]}; do
[[ $item == $prefix.* ]] && continue
COMPREPLY+=("${item#$prefix}")