Comments (6)
I agree that controlling the prompt customization with an env var is the best bet. We could...
- Check if
DEVBOX_NO_PROMPT
is set. If it is, don't changePS1
in the post-init hook. - Introduce a
DEVBOX_PROMPT
env var.- If left unset, we default to the current behavior of updating the prompt.
- If set to empty, we leave the prompt alone.
- If set to anything else, we change the prompt to its value.
I'm not sure if DEVBOX_PROMPT
would be more convenient than having users add if [ -n "$DEVBOX_SHELL_ENABLED" ]; then export PS1=foo; fi
to their shell rc.
from devbox.
Just wanted to give an update here on how we're planning to fix this for the next release.
Now that devbox supports setting shell hooks in devbox.json
, we're going to remove the builtin logic that sets the prompt entirely. Instead, devbox init
will generate a devbox.json
that sets a prompt by default with something like:
{
"shell": {
"init_hook": "export PS1='(devbox)$ '"
}
}
That way the prompt can be disabled by simply removing or changing the hook.
from devbox.
Yep! DEVBOX_SHELL_ENABLED
will still be there.
from devbox.
Thanks for the feedback. Some ideas to address this:
-
Make it an option during installation ("Do you want Jetpack to add an indicator to your prompt?")
-
Provide users with a snippet that they can add to their shell profile
-
Add an Env variable that toggles off the default indicator (so developers can configure their own using the environment variable).
from devbox.
Personally, the third option seems best. If folks are running custom themes, chances are they're comfortable with environment tweaking (and perhaps the theme itself) to address toggling the behavior.
If you did the first option, would folks have to re-install to change the behavior? Across workstations? That could get tiring.
And the second option works but I think environment vars are more accessible and portable across shells and OS'es.
My 2 cents anyhow :) Thanks for considering this!
from devbox.
Sounds reasonable to me! Are you still planning to export DEVBOX_SHELL_ENABLED
?
from devbox.
Related Issues (20)
- Generated Dockerfile fails build because of mkdir /code HOT 2
- Mariadb example unable to connect to server through socket
- devbox rm <package> not working on Ubuntu 22.04 HOT 1
- Cleaning up unused packages from nix store fails HOT 2
- nodejs reference hashes are not unique HOT 1
- Node.js hook errors with direnv HOT 5
- Allow a way to use buildLayeredImage HOT 1
- azbrowse
- Default initial Dockerfile unable to build HOT 3
- Need a general or simple way to. override shell_history
- Prefixed version of gnused? HOT 3
- Add plandex - command line AI tool HOT 2
- Pass options to process-compose
- Exec format error HOT 2
- Getting "Error: accepts at most 0 arg(s), received 1" on every install package attempt HOT 2
- Unable to activate a shell because of a network error. I am unable to work. HOT 4
- Corepack symlink problem with pnpm on Dockerfile HOT 4
- `{{ .DevboxDirRoot }}` doesn't point to the project root directory
- Proper dark/light mode themes for devbox services
- The order of appearance of scripts in generated readme should have same order as defined in devbox.json HOT 1
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 devbox.