mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
installer: change to --unattended argument and add docs
This commit is contained in:
parent
065844fdc0
commit
b931d6a9db
1 changed files with 10 additions and 1 deletions
|
@ -12,15 +12,23 @@
|
|||
# You can tweak the install behavior by setting variables when running the script. For
|
||||
# example, to change the path to the Oh My Zsh repository:
|
||||
# ZSH=~/.zsh sh install.sh
|
||||
#
|
||||
# Respects the following environment variables:
|
||||
# ZSH - path to the Oh My Zsh repository folder (default: $HOME/.oh-my-zsh)
|
||||
# REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh)
|
||||
# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS)
|
||||
# BRANCH - branch to check out immediately after install (default: master)
|
||||
#
|
||||
# Other options:
|
||||
# CHSH - 'no' means the installer will not change the default shell (default: yes)
|
||||
# RUNZSH - 'no' means the installer will not run zsh after the install (default: yes)
|
||||
#
|
||||
# You can also pass some arguments to the install script to set some these options:
|
||||
# --skip-chsh: has the same behavior as setting CHSH to 'no'
|
||||
# --unattended: sets both CHSH and RUNZSH to 'no'
|
||||
# For example:
|
||||
# sh install.sh --unattended
|
||||
#
|
||||
set -e
|
||||
|
||||
# Default settings
|
||||
|
@ -178,6 +186,7 @@ setup_shell() {
|
|||
}
|
||||
|
||||
main() {
|
||||
# Run as unattended if stdin is closed
|
||||
if [ ! -t 0 ]; then
|
||||
RUNZSH=no
|
||||
CHSH=no
|
||||
|
@ -186,7 +195,7 @@ main() {
|
|||
# Parse arguments
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--silent|--batch) RUNZSH=no; CHSH=no ;;
|
||||
--unattended) RUNZSH=no; CHSH=no ;;
|
||||
--skip-chsh) CHSH=no ;;
|
||||
esac
|
||||
shift
|
||||
|
|
Loading…
Reference in a new issue