jamesob / desk

A lightweight workspace manager for the shell
MIT License
2.54k stars 111 forks source link

Prevent nested session #68

Open aratno opened 8 years ago

aratno commented 8 years ago

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.

cmbankester commented 7 years ago

@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?

tzhouhc commented 7 years ago

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.

afterthought commented 7 years ago

What about a "desk switch" command. I'm used to doing that with homebrew to switch package versions.