features/src/common-utils
Levin Winter fbdc4556d5
[common-utils] Fix nonempty .bashrc being restored (#421)
* [common-utils] Fix nonempty .bashrc being restored
The user's dotfiles shall only be restored to their defaults if they do
not exist or are empty. A missing negation caused the files to be
overwritten even when they were nonempty.

* [common-utils] Bump patch version after fix
Go from 2.0.7 to 2.0.8 because of backwards-compatible fix.
2023-01-25 15:57:31 -08:00
..
bin feat(common-utils): Support the new path of meta.env file and the new field for saving source revisions (#359) 2022-12-27 08:25:33 -05:00
scripts Fix /etc/bash.bashrc generated by common-utils (#342) 2022-12-19 11:23:05 -05:00
devcontainer-feature.json Republish all Features to add repo tags (#422) 2023-01-25 10:24:25 -08:00
install.sh Multi-distro support for common script, refactor, fixes (#326) 2022-12-16 09:47:21 -08:00
main.sh [common-utils] Fix nonempty .bashrc being restored (#421) 2023-01-25 15:57:31 -08:00
NOTES.md OS support in Feature NOTES.md (#366) 2022-12-27 12:27:57 -05:00
README.md Automated documentation update (#394) 2023-01-10 13:59:07 -08:00

Common Utilities (common-utils)

Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.

Example Usage

"features": {
    "ghcr.io/devcontainers/features/common-utils:2": {}
}

Options

Options Id Description Type Default Value
installZsh Install ZSH? boolean true
configureZshAsDefaultShell Change default shell to ZSH? boolean false
installOhMyZsh Install Oh My Zsh!? boolean true
upgradePackages Upgrade OS packages? boolean true
username Enter name of a non-root user to configure or none to skip string automatic
userUid Enter UID for non-root user string automatic
userGid Enter GID for non-root user string automatic
nonFreePackages Add packages from non-free Debian repository? (Debian only) boolean false

OS Support

This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise Linux, Fedora, RockyLinux, and Alpine Linux.

Customizing the command prompt

By default, this script provides a custom command prompt that includes information about the git repository for the current folder. However, with certain large repositories, this can result in a slow command prompt due to the performance of needed git operations.

For performance reasons, a "dirty" indicator that tells you whether or not there are uncommitted changes is disabled by default. You can opt to turn this on for smaller repositories by entering the following in a terminal or adding it to your postCreateCommand:

git config devcontainers-theme.show-dirty 1

To completely disable the git portion of the prompt for the current folder's repository, you can use this configuration setting instead:

git config devcontainers-theme.hide-status 1

For zsh, the default theme is a standard Oh My Zsh! theme. You may pick a different one by modifying the ZSH_THEME variable in ~/.zshrc.


Note: This file was auto-generated from the devcontainer-feature.json. Add additional notes to a NOTES.md.