Skip to content
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

Merged
merged 1 commit into from
Feb 14, 2016
Merged

Add support for .desk file #53

merged 1 commit into from
Feb 14, 2016

Conversation

ianberinger
Copy link
Contributor

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 :)

@jamesob
Copy link
Owner

jamesob commented Feb 6, 2016

Very cool, @ianberinger, and good start. Going to be taking a detailed look at this today or tomorrow.

@rnewton
Copy link
Contributor

rnewton commented Feb 8, 2016

+1

@mblarsen
Copy link

mblarsen commented Feb 9, 2016

+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"
Copy link
Owner

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.).

@jamesob
Copy link
Owner

jamesob commented Feb 10, 2016

Awesome. I'm +1 on this aside from a minor change in naming.

@ianberinger
Copy link
Contributor Author

Thanks for reviewing. I renamed .desk to DESKFILE and fixed the merge conflict.

@rnewton
Copy link
Contributor

rnewton commented Feb 13, 2016

I'm fine with .desk or Deskfile. DESKFILE is really loud.

@ianberinger
Copy link
Contributor Author

Sorry, my bad. Don't know how I got to the all caps version. Fixed now.

@wricardo
Copy link

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.
Copy link
Owner

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

@jamesob
Copy link
Owner

jamesob commented Feb 14, 2016

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!

jamesob added a commit that referenced this pull request Feb 14, 2016
Add support for .desk file
@jamesob jamesob merged commit 5d19a10 into jamesob:master Feb 14, 2016
@jamesob
Copy link
Owner

jamesob commented Feb 14, 2016

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.

@ianberinger
Copy link
Contributor Author

@jamesob, I didn't account for comments in the Deskfile. I fixed that now:
ianberinger@e54c77e ; line 97
Should I open another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants