echo "{$FRETLINK_ENV} "
fi
}
+
+function tmux_dev() {
+ type="${1:-bash}"
+ if [ -n "$TMUX" ]; then
+ m=switch-client
+ else
+ m=attach-session
+ fi
+
+ if tmux has-session -t "$type" 2>/dev/null; then
+ tmux $m -t "$type"
+ else
+ if [ "$type" = "bash" ]; then
+ tmux new-session -d -s "$type"
+ tmux $m -t "$type"
+ else
+ tmux new-session -d -c "$HOME/workdir/$type" -s "$type" \; \
+ $m -t "$type" \; \
+ send-keys "../start" C-m \; \
+ rename-window "running" \; \
+ new-window -c "$HOME/workdir/$type"
+ fi
+ fi
+}
+
+_tmux_dev() {
+ COMPREPLY=()
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ prefix="$HOME/workdir/"
+ local IFS=$'\n'
+ local items=($(compgen -W "bash" -- $cur) $(compgen -d $prefix$cur))
+ for item in ${items[@]}; do
+ [[ $item == $prefix.* ]] && continue
+ COMPREPLY+=("${item#$prefix}")
+ done
+}
+complete -o filenames -F _tmux_dev tmux_dev
##### /Fretlink
{% endif %}
set -g default-terminal screen-256color
set -g mouse on
-
-{% if role.get(profile) == "fretlink" %}
-new-session -A -c "$HOME/workdir/admin-root" -s admin-root
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/carrier-directory" -s carrier-directory
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/notifier" -s notifier
-send-keys "../start" C-m
-rename-window "running"
-new-window
-new-session -A -c "$HOME/workdir/geodata" -s geodata
-new-session -A -c "$HOME/workdir/app" -s app
-send-keys "../start" C-m
-rename-window "running"
-new-window
-select-window -t 1
-{% endif %}