desk
desk copied to clipboard
Prevent nested session
I mentioned this in a comment on #67, but I think nested sessions should be prevented. For example, if I run desk . project-one
then try to run desk . project-two
, desk should ask if I want to leave the first session to enter the next or prevent me from nesting at all.
@aratno Why do you want it to prevent nesting, exactly? I actually find the current nesting functionality convenient. E.g., when jumping into a desk to do something quick / transient, it's convenient to be able to exit back into my previous, longer-term desk.
Could you expand on your use case a bit?
Speaking of this... Maybe a environmental variable called DESK_STACK could be nice.
e.g. first desk 'work', DESK_STACK is 'work'; from work I start desk 'reddit', then DESK_STACK becomes 'work:reddit'. This way if I do start a stack of desks, I will have the means to keep track of them with prompt or whatever.
What about a "desk switch" command. I'm used to doing that with homebrew to switch package versions.