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
@@ -23,8 +23,8 @@ Configures Codespace to authenticate with Azure Artifact feeds
23
23
| yarnAlias | Create alias for yarn | boolean | true |
24
24
| npxAlias | Create alias for npx | boolean | true |
25
25
| rushAlias | Create alias for rush | boolean | true |
26
+
| targetFiles | Comma separated list of files to write to. Default is '/etc/bash.bashrc,/etc/zsh/zshrc' for root and '~/.bashrc,~/.zshrc' for non-root | string | DEFAULT |
| targetFiles | Comma-separated list of files to write aliases to | string | DEFAULT (`/etc/bash.bashrc,/etc/zsh/zshrc` for `root`, otherwise `~/.bashrc,~/.zshrc`) |
28
28
29
29
## Customizations
30
30
@@ -76,6 +76,29 @@ to download the package.
76
76
77
77
This feature is tested to work on Debian/Ubuntu and Mariner CBL 2.0
78
78
79
+
## Changing where functions are configured
80
+
81
+
By default, the functions are defined in `/etc/bash.bashrc` and `/etc/zsh/zshrc` if the container user is `root`, otherwise `~/.bashrc` and `~/.zshrc`.
82
+
This default configuration ensures that the functions are always available for any interactive shells.
83
+
84
+
In some cases it can be useful to have the functions written to a non-default location. For example:
85
+
- the configuration file of a shell other than `bash` and `zsh`
86
+
- a custom file which is not a shell configuration script (so that it can be `source`d in non-interactive shells and scripts)
87
+
88
+
To do this, set the `targetFiles` option to the path script path where the functions should be written. Note that the default paths WILL NOT be used
89
+
if the `targetFiles` option is provided, so you may want to include them in the overridden value, or add `source` the custom script in those configurations:
0 commit comments