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)
- Mariadb service not starting on macOS HOT 1
- Override configuration
- Add powerpipe.io as a package
- PYTHONPATH ordering breakage when installing packages via plugin
- Errors like "Too many requests" must be ignored if the package is already installed
- Broken package `localstack` rolled back on nixpkgs but still available on nixhub
- Devbox shell ignores `.zshenv`
- Python package requests for neuroimaging
- Devbox shell breaks with multiple Python based packages HOT 2
- devbox shell fails
- Nixhub.io: broken link to Nix installation page in "Tips" section on package page HOT 2
- Prompt (starship) looks broken in zsh and in fish
- Expose `process-compose attach`
- Error: libuuid.so.1: cannot open shared object file: No such file or directory HOT 2
- pkg-config is broken HOT 2
- Privately hosted Devbox Plugins on non-Github Git Servers HOT 2
- Warning: Failed to upgrade ../ReadRealTimeWriteCSV/ using `nix profile upgrade`: ../ReadRealTimeWriteCSV/: package not found HOT 2
- devbox help --> description for devbox list ist wrong
- the nixPkgs.commit property of devbox.json is not documented HOT 2
- Support for FHS Environments 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.