Comments (5)
Yeah, I'm definitely interested in supporting something complementary at desk's layer. Thanks for the detailed write-up of your thoughts.
I've been drafting a behavior to facilitate easy sharing of project-specfic deskfiles that may dovetail with your flow. Imagine a convention where we had Deskfile
(or deskfile.sh
, either way) live at the root of a project's source tree. You check out the project, cd
into it, then run desk import .
. This would symlink the project Deskfile into your $DESK_DESKS_DIR
.
Question there is: some (maybe most) deskfiles start off with a cd ~/project/dir
... how do we handle that in an imported deskfile, where the path of the project's checkout is unknown?
One option would be to support some comment syntax for saying "this is a project deskfile; if it's symlinked, read the link and cd
to the basedir of the source." Something like
# /tmp/checkout/spectac_proj/Deskfile
#
# Description: my spectacular project
# Name: specproj
# Root: .
alias whatever='baz'
...
So then when you desk . specproj
, it reads the symlink and cd
s you into /tmp/checkout/spectac_proj
. I'm not wild about having to specify the name, so maybe we could think of a clever way to infer that.
What do you make of the above? Would it be useful for your wrapper?
I think your instinct is right with regard to the caveats you list: at some point I'd like to be able to optionally recognize git (and other vcs) if it's easy, but I definitely don't want to take on any dependencies in doing so. It requires some more thought, but I think there's potential there.
from desk.
I like this approach better for the general use-case. It doesn't really match what I'd be able to do immediately as I'm the only one evaluating desk at my company at the moment and it might be a hard sell to place another file at source root (to live with grunt, npm, composer, bower, etc). However, I could easily get my wrapper script to 'inject' the deskfile into the project after checkout and then follow the same flow you describe after that point.
I can't think of a way to infer things like the project directory or the name of the project that aren't fraught with special cases or magic. In any case, I'm not opposed to optionally specifying the name and root directory, but we'd just have to be careful to not require too much configuration right off the bat.
from desk.
I also think some sort of project specific setup would be really useful.
Why not just get desk to search for the deskfile in the current directory first, then if it doesn't exist look in $DESK_DESKS_DIR
?
That would resolve the cd ~/project/dir...
issue because you will already be there, just open the new shell at the current directory of the old one.
from desk.
@TristanBurnside: +1
from desk.
Sounds good -- I'll throw together an implementation for that pretty soon.
from desk.
Related Issues (20)
- Desk release v0.5.0 HOT 5
- #62 broke desk within tmux HOT 1
- not really an issue - HOT 1
- Prevent nested session HOT 3
- Ability to run a clean up script when exiting a desk session HOT 2
- desk installed from homebrew only lauches shell, doesn't execute deskfile HOT 6
- cmd_current which calls cmd_list doesn't print newline after showing desks. HOT 1
- desk doesn't seem to execute desk file at all HOT 1
- I ❤️ DESK! HOT 2
- autoreload desk on save.
- is there a way to start new terminal session with previous used desk session? HOT 2
- IntelliJ (phpstorm) error on desk open. HOT 1
- Having separate bash histories per desk? HOT 1
- Use of `sh -i` in desk run causes process suspension in pipelines HOT 2
- `get_running_shell` picks not-a-shell sometimes HOT 1
- `desk run` requires excessive escaping and silently discards additional arguments
- Description of aliases and functions are being duplicated
- Desk init does not work when using a custom location
- You can install desk with Awesome package manager
- desk fails to run when using warp terminal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desk.