You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user sets the env variable `BUILDWITH_SHOW_PROMPT`,
the shell prompt is prefixed by the currently activated mozconfig:
```sh
cd ~/gecko
buildwith release
(release) ./mach build
```
This prefix is only shown if the shell is inside a gecko repository.
Copy file name to clipboardExpand all lines: README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,22 @@ For example, if you put this in your ~/.bashrc file (or equivalent):
72
72
buildwith will also set the MOZCONFIG environment variable in launchctl (useful when running Android Studio).
73
73
All occurences of ``#1`` will be replaced by the path to the mozconfig file.
74
74
75
+
#### prompt prefix
76
+
77
+
Similar to Python virtualenvs, you can display the active mozconfig name as a prefix in your shell prompt.
78
+
This prefix only appears when you are inside a gecko repository. To enable this feature, add to your ~/.bashrc file (or equivalent):
79
+
80
+
export BUILDWITH_SHOW_PROMPT=1
81
+
82
+
The default format is `(mozconfig_name) ` but you can customize it with:
83
+
84
+
export BUILDWITH_PROMPT_FORMAT="[%s] "
85
+
86
+
The `%s` will be replaced with the mozconfig name. For example, if you activate a config named "debug" while inside a gecko repository, your prompt will show `(debug) ` or `[debug] ` depending on your format setting.
87
+
88
+
The prompt automatically appears when you `cd` into a gecko repository and disappears when you leave it.
89
+
Gecko repositories are detected by the presence of `mach` or `moz.configure` files.
90
+
75
91
#### mozconfig template
76
92
77
93
When you make a new mozconfig, it will be populated with some basic build commands and the name of the mozconfig
0 commit comments