jamesob / desk

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

Assume desk name from current directory #42

Open 8191 opened 8 years ago

8191 commented 8 years ago

It would be nice if desk would assume the name of the desk to load from the cwd if no desk name was given, e.g:

$ cd ~/myproject
$ desk .
$ desk

myproject
desk of my project
...
jamesob commented 8 years ago

Definitely thinking about how to best enable something like this. Expect something in the next few days.

cmbankester commented 8 years ago

I think this is a cool idea, but assuming the desk to load might be somewhat limiting, and possibly a bit error-prone. What if we simply add a way to tie a directory to a specific desk? It seems we could either do so from within the directory itself (i.e. with a .desk file containing the name of the desk) or from within the deskfile (which I do not recommend).

I think using a .desk file within the directory would be the simplest to implement, and seems more logical. This also opens us up to adding a set subcommand, something like desk set [deskname] [directory] (e.g. desk set foobar . to tie the current directory to the foobar desk).

8191 commented 8 years ago

Sounds like a plan... Do you think of a specific content of the .desk file (e.g. the desk to load) or just the presence of the file implies that desk is loading the desk with the same name of the directory?

I guess first option is not really intuitive and also - as mentioned by you - limiting...