-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for .desk file #53
Conversation
Very cool, @ianberinger, and good start. Going to be taking a detailed look at this today or tomorrow. |
+1 |
+1 Just what I need |
@@ -91,6 +92,11 @@ cmd_init() { | |||
|
|||
cmd_go() { | |||
local TODESK="$1" | |||
if [ -z "$TODESK" -a -f "${PWD}/.desk" ]; then | |||
# if no desk is specified try the .desk file in the current directory | |||
read TODESK < "${PWD}/.desk" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer we go with Deskfile
here (resembles Makefile
, Dockerfile
, etc.).
Awesome. I'm +1 on this aside from a minor change in naming. |
Thanks for reviewing. I renamed .desk to DESKFILE and fixed the merge conflict. |
I'm fine with .desk or Deskfile. DESKFILE is really loud. |
Sorry, my bad. Don't know how I got to the all caps version. Fixed now. |
Really looking forward to this. |
@@ -27,6 +27,7 @@ Usage: | |||
List all desks along with a description. | |||
$PROGRAM (.|go) <desk-name> [shell-args...] | |||
Activate a desk. Extra arguments are passed onto shell. | |||
Without a name specified, it tries activating the desk specified in the ./.desk file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of date .desk
reference
Feel bad blocking on small comments... I'm ready to merge this thing and iterate, though. I'll hold off on cutting a release after merge because I want to add tests and spruce up the documentation. This is close, folks! Thanks for all the work @ianberinger @rnewton! |
Unfortunately this doesn't actually work for me and I've had to revert: (venv) [Sat 13 18:41] job/code/desk master* ±
$ ls Deskfile
Deskfile
(venv) [Sat 13 18:42] job/code/desk master* ±
$ desk .
Desk # Description: the desk I use to work on desk :) (# Description: the desk I use to work on desk :).sh) not found in /Users/job/.desk/desks I'll revisit this feature tomorrow when I have some time to code. |
@jamesob, I didn't account for comments in the Deskfile. I fixed that now: |
Thanks for sharing your project!
This PR adds support for activating a desk based on the content of a
.desk
file in the current directory (issue #42).I updated the documentation accordingly.
Feel free to close if you feel this doesn't fit the spirit of the project :)