jamesob / desk

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

Accept args in desks (at least in bash and zsh) #58

Closed benwr closed 8 years ago

benwr commented 8 years ago

I'd really like to be able to pass arguments to desks.

Currently, $@ after three shifts is passed directly into the shell executable, meaning that if you do desk go mydesk some_option, your shell of choice (as long as you're a reasonable person and not a fish-user) will try and (probably?) fail to run some_option as a script. bash and zsh make it easy to change this behavior; I'm not sure about fish but it seems harder in that case (I've tried to sidestep that issue here by leaving the fish executable unchanged).

At least on my machine, this works okay and lets me access shell args in desks.

benwr commented 8 years ago

Actually, I can just use a function rather than an alias, and always pass -s. If you'd prefer to keep awful hacks out of the codebase, feel free to close this.

jamesob commented 8 years ago

Closing for function over alias. Thanks, @benwr!