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

Load a desk without launching a new shell instance #36

Open
dead10ck opened this issue Nov 16, 2015 · 2 comments · May be fixed by #80
Open

Load a desk without launching a new shell instance #36

dead10ck opened this issue Nov 16, 2015 · 2 comments · May be fixed by #80

Comments

@dead10ck
Copy link

It would be nice if there was a desk load or some such subcommand which would load a desk's script without leaving the current shell instance. This would be useful for allowing one to share some common desk setup among other desks. For instance, say I want to have some script setup some environment variables that will be common to other desks as well. Currently, as far as I can tell, the only way to do this is with something like:

# load the common code
. $(dirname $0)/common.sh

# start setting up the subdesk

when it would be much nicer just to be able to do something like:

# load the common code
desk load common

# start setting up the subdesk
@jamesob
Copy link
Owner

jamesob commented Nov 17, 2015

Yeah, and there's certainly a usecase for desk reload (after you've desk edited something and want to incorporate the changes into a current shell session).

One snag here is that I'm unsure of how we'd inject environment variables into a parent process; i.e. when you call desk load common, that's going to spawn off a child process from your current shell session. Are you aware of a way communicate that sourced data in common.sh back up to the parent process?

@8191
Copy link

8191 commented Nov 21, 2015

Also this would not break screen titles... Currently each screen running a desk simply shows ''desk'' as its name instead of the currently running task (because desk is the currently running task).

@ryansch ryansch linked a pull request Mar 20, 2018 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants