---
** [tickets:#157] has-session is misleading**
**Status:** open
**Created:** Wed Sep 17, 2014 06:48 AM UTC by eydaimon
**Last Updated:** Wed Sep 17, 2014 06:48 AM UTC
**Owner:** nobody
If I do:
tmux new -s hobbit
tmux has-sessinon -t hobbit will return 0
and that's ok
but
tmux new -s hobbit-bilbo
tmux has-session -t hobbit will also return 0
That's not OK since there's not a session called hobbit.
My own real use-case is that I end up using sessions based on directory names;
a session per project, and projects are in directories. Because my homedir is
the root, my homedir already thinks it has a session for itself
Function for fishshell
~~~~~
function tt
set name (pwd)
set name (ruby -e 'puts ARGV[0].gsub("\.","-")' $name)
tmux has -t $name
if test $status -eq 0
tmux attach -t $name
else
tmux new -s $name
end
end
~~~~~
---
Sent from sourceforge.net because tmux-users@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/tmux/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/tmux/admin/tickets/options. Or, if this is a mailing
list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users