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

Implement Deskfile recognition #55

Merged
merged 2 commits into from
Feb 24, 2016
Merged

Implement Deskfile recognition #55

merged 2 commits into from
Feb 24, 2016

Conversation

jamesob
Copy link
Owner

@jamesob jamesob commented Feb 15, 2016

@rnewton @ianberinger @cmbankester @mblarsen @wricardo

(continuation of the ideas proposed in #53)

Add robust support for the Deskfile convention. Check the README changes for detailed information.

@ianberinger
Copy link
Contributor

Code LGTM, this is a nice addition, but doesn't quite support my usecase: I just wanted a way to reference a desk in ~/.desk/desks/, as discussed in #42.

@jamesob
Copy link
Owner Author

jamesob commented Feb 16, 2016

@ianberinger to meet that use, you can just symlink ~/.desk/desks/whatever.sh to ./Deskfile.

@ianberinger
Copy link
Contributor

Sure, but symlinking assumes that the desk is always stored in the same place. This isn't always the case across multiple systems and users. And for users using $DESK_DIR or $DESK_DESKS_DIR changing either of those would require renewing all symlinks.

Granted, this isn't a problem for me currently, as I have all my desks in the standard location on every system, but might be one for others.

@jamesob
Copy link
Owner Author

jamesob commented Feb 16, 2016

@ianberinger I'm not aware of multiple users making use of the same desk configurations, though. While maybe at some point there will be a good distribution mechanism for that, I'm not aware of one that exists. So as things stand now a path or symlink vs. a name shouldn't make a difference to most people (correct me if I'm wrong here).

Moreover, a Deskfile consisting of just a name doesn't do a project much good if they want to standardize somehow (a la Makefile) -- you'll have to distribute the desk configuration somehow too.

That said, if for some reason you really want the functionality you proposed in the original ticket, you can just have each Deskfile consist of something like

source $DESK_DESKS_DIR/my_desk.sh

Make sense?

Anyone else want to weigh in here?

@cmbankester
Copy link
Contributor

Could we get some before/after images or gifs? I'm at work so I don't have a lot of time to try out the changes/review the code, but I'd certainly weigh in if I could see it in action.

@ianberinger
Copy link
Contributor

@jamesob That's actually a great idea, thanks!

As I already said, this isn't currently an issue for me. I do believe that most users want to distribute a project-specific desk with the project itself (myself included) and think that this is the better solution for project-specific files. I just wanted to address this edge case :)

@jamesob
Copy link
Owner Author

jamesob commented Feb 18, 2016

@rnewton @mblarsen any thoughts here? Does this changeset meet your usecases?

@jamesob
Copy link
Owner Author

jamesob commented Feb 18, 2016

@ianberinger one snag with the source approach is that we'd have to modify desk to descend into whatever has been sourced for the basic static analysis we do to put together the index of aliases and commands. So maybe a .desk containing just the name could be done in addition to this notion of a Deskfile. Or maybe we start thinking about a comment directive that desk could use for extension... e.g.

# Extends: some_desk_name
...

@jamesob
Copy link
Owner Author

jamesob commented Feb 18, 2016

@cmbankester not much to show in a .gif; this just adds the ability to specify a directory-specific Deskfile.

@mblarsen
Copy link

@jamesob sorry for the late response. These are the Deskfiles I'm looking for 👍
Any outstanding issues on this PR?

@jamesob
Copy link
Owner Author

jamesob commented Feb 24, 2016

@mblarsen thanks for getting back. Let's ship it!

jamesob added a commit that referenced this pull request Feb 24, 2016
Implement Deskfile recognition
@jamesob jamesob merged commit 1dcdd81 into master Feb 24, 2016
@jamesob jamesob deleted the deskfile branch February 24, 2016 18:31
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.

4 participants