[zsh] Update shell init: profile
This commit is contained in:
parent
c30b46a88b
commit
2d896e1555
3 changed files with 25 additions and 31 deletions
16
zsh/func/list_tmux_sessions
Normal file
16
zsh/func/list_tmux_sessions
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
function list_tmux_session
|
||||
{
|
||||
local tmux_out=`tmux list-sessions 2>/dev/null`
|
||||
[[ -z "$tmux_out" || -n "$TMUX" ]] && return
|
||||
|
||||
echo "You have the following active tmux sessions:"
|
||||
for session in ${(f)tmux_out}; do
|
||||
echo " $session"
|
||||
done
|
||||
echo
|
||||
}
|
||||
|
||||
list_tmux_session "$@"
|
Loading…
Add table
Add a link
Reference in a new issue