Zach Whitten
2e54ba2dfb
installer: restore previous default shell with uninstall
...
Co-authored-by: Antonio QUINTAVALLE <antonio.quintavalle@amadeus.com>
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
7 years ago
Marc Cornellà
66d6d08841
installer: improve message formatting and color
7 years ago
Marc Cornellà
b931d6a9db
installer: change to --unattended argument and add docs
7 years ago
Marc Cornellà
065844fdc0
installer: comment changes
7 years ago
Marc Cornellà
1cf42a506f
installer: add option to not run zsh at the end
...
Co-authored-by: Liquidsoul <liquidsoul@liquidsoul.fr>
Co-authored-by: Alexander Polynomdivision <digitalmail555@googlemail.com>
Co-authored-by: loket <loket@cruftlab.io>
Co-authored-by: Connor Demille <subtlepseudonym@gmail.com>
7 years ago
Marc Cornellà
a40d93295f
installer: don't run zsh at the end
...
Co-authored-by: Joel Kuzmarski <leoj3n@gmail.com>
7 years ago
Marc Cornellà
794ff4a62d
installer: add ability to skip the default shell change
...
Co-authored-by: Marshall Ford <inbox@marshallford.me>
Co-authored-by: Joel Kuzmarski <leoj3n@gmail.com>
7 years ago
Andrew Janke
43b3126b5c
installer: use timestamped backups to preserve all old zshrcs
7 years ago
Marc Cornellà
153f5e11ed
installer: use default color sequences on missing tput
...
Supposed to be POSIX-compatible. Proved to work in dash, yash and whatever
alpine uses. See https://unix.stackexchange.com/a/371873
7 years ago
Marc Cornellà
220d69b2ce
installer: allow configuration of remote URL to clone from
7 years ago
Andrew Janke
aa27430e10
installer: add ability to install from forked & branched repos
...
This facilitates testing of changes to the core installation code: you'll be
able to do a roundtrip test of install and uninstall using the working code on
your branch.
Controlled by passing $REPO and $BRANCH environment variables to install.sh.
7 years ago
Marc Cornellà
a6a093ba2a
installer: improve zsh binary path search in setup_shell
...
This changes the behavior to default to the binary found first in $PATH,
then checking it's actually in the shells file (/etc/shells).
If that fails go back to the previous behavior, but actually check that
the path obtained exists in the filesystem.
Co-authored-by: Joel Kuzmarski <leoj3n@gmail.com>
7 years ago
Fran
9d2b3ce79f
installer: fix for Solus OS and systems with no /etc/shells
...
Co-authored-by: Fredrik Fornwall <fredrik@fornwall.net>
7 years ago
Marc Cornellà
62216aaa8f
installer: use guard clauses in setup_shell for better readability
...
Guard clauses are if constructs that return early if there is an error
that prevents continuing. This way there isn't a big nesting of if
expressions.
7 years ago
Raf Czlonka
8e10ac4d73
installer: make sure shell in /etc/shells is not commented
...
Otherwise we risk a situation where a full path to `zsh` is commented, i.e.:
#/usr/local/bin/zsh
7 years ago
Luca S
73f29087f9
installer: replace the current shell with the new ZSH instance
...
This replaces the currently running process with the new one using `exec`
instead of creating a new process. This way, when the user `exit`s out of
the new shell it will not pop them back into the shell from which ohmyzsh
was installed from.
7 years ago
Marc Cornellà
1fdd5351fb
installer: abstract error messages
7 years ago
Marc Cornellà
576499a5ad
installer: fix for failed chsh quitting the installation
7 years ago
Marc Cornellà
a7bd1f99ae
installer: extract most code into functions
7 years ago
Marc Cornellà
f94443925d
installer: reorganise and add comments
7 years ago
Marc Cornellà
73ef051aae
installer: use tabs to allow future heredocs
...
This will allow us to use tab stripping heredocs with `<<-'.
See http://www.tldp.org/LDP/abs/html/here-docs.html#EX71A
Add editorconfig file to enforce this style.
See http://editorconfig.org for more information.
7 years ago
Marc Cornellà
9a832cccef
installer: use exit-on-error from the beginning
7 years ago
Guillermo Azurdia
9b2410fbcf
Remove dots from installer URLs ( #7780 )
7 years ago
Marc Cornellà
c23ab00990
upgrade: fix lock-out on first upgrade check
...
This early return made it so the lock wasn't removed, therefore locking out
the upgrade script from ever entering the upgrade routine.
Fixes #6138
Note: the logic needs some rework.
7 years ago
Robby Russell
f319aa845d
Updating Oh My Zsh shop URLs ( #7619 )
...
* Updating Oh My Zsh shop URLs
Linking directly to the Oh My Zsh inventory vs the top-level store with non-OMZ items.
* Updating link to Oh My Zsh products in the install script
* Updating link to Oh My Zsh shop products in the upgrade script
* Getting rid of 't-' in shirts for now
7 years ago
Jackson Delahunt
026e4e499e
installer: make TEST_CURRENT_SHELL use basename ( #7514 )
...
Fixes #7492
8 years ago
Janosch Schwalm
19b925e741
use https everywhere ( #6574 )
...
* use https everywhere
* use https links on the files that are left
Also, removed some broken links and updated redirections.
8 years ago
Joel Kuzmarski
8f95637e67
Login shell after install ( #5314 )
...
Otherwise these files are not sourced:
1. /etc/zprofile
2. ~/.zprofile
3. /etc/zlogin
4. ~/.zlogin
5. ~/.zlogout
6. /etc/zlogout
8 years ago
Chao Du
de8299d6c4
Fixed Issue #4550 : Move ~/.zsh-update file to $ZSH_CACHE_DIR
8 years ago
Dan Wallis
fec0089cdd
Quote $ZSH where necessary in install script ( #6587 )
...
Quote $ZSH where necessary in install script
8 years ago
Gert de Pagter
2b7a41b0d2
Update the update prompt ( #6825 )
...
`[Oh My Zsh] Would you like to check for updates? [Y/n]: ` does not make sense,
since answering yes will download/apply the new updates instead of checking for them.
8 years ago
ningwei1993
8f0ff4bb63
fix bug for check zsh ( #6798 )
8 years ago
Marc Cornellà
c4981bae0a
installer: check if zsh in path instead of /etc/shells
...
Fixes #4955
Closes #5931
Closes #6398
Co-authored-by: Void <vst4rbot@gmail.com>
Co-authored-by: Kaleb Elwert <belak@coded.io>
8 years ago
Marc Cornellà
4fec0a46e7
[installer] use `command -v` to check for git
...
Quick fix to the script not finding git due to hash.
Solves #6697 .
8 years ago
Doug Yun
2526d71c56
Use HTTPS for Planet Argon links ( #6326 )
9 years ago
Fabian Wolff
1f64fa92f5
Convert "if then" statements to "if; then" one-liners
10 years ago
Fabian Wolff
4fa6be0230
Use rmdir instead of rm -r
10 years ago
Fabian Wolff
40bfe5a412
Implement a locking mechanism to avoid multiple update prompts ( fixes #3766 )
10 years ago
Fredrik Fornwall
9772f8e10d
Replace /bin/sh with sh for portability ( #5291 )
...
This makes things work even on system lacking /bin/sh, such as on
non-rooted Android systems.
10 years ago
Felipe Vargas
551abfcbb4
Remove undesirable hardcoding of PATH into zshrc ( #4925 )
...
See robbyrussell@b67961d
10 years ago
Andrew Janke
483f1208a5
installer: fix ordering of cygwin msys git check ( #4557 )
10 years ago
Robin Hallabro
18ca953f12
Use consistent wording when updating
...
When the user is asked to update oh-my-zsh it says "[Oh My Zsh] Would
you like to check for updates? [Y/n]:". When the user agreed to update
the next text would say "Upgrading Oh My Zsh" which is inconsistent
with the question.
11 years ago
LE Manh Cuong
c25002a13f
Removing `source` command
11 years ago
LE Manh Cuong
53a63355be
Change coding style
11 years ago
LE Manh Cuong
45cd2df31f
Update uninstall.sh
...
- Need dot `.` for POSIX compliant instead of `source`
- Use modern syntax for command substitution
- Fix missing double quotes
11 years ago
Marc Cornellà
d06f4d0893
Fix backwards logic in uninstaller once and for all
...
Really this time :P
Fixes #4533
11 years ago
Marc Cornellà
4e42e1f7e1
Fix conditional in uninstall prompt
11 years ago
Marc Cornellà
b2010a0ae6
Fix syntax error in confirmation prompt of uninstall.sh
...
We need to use POSIX syntax. This file is no longer executed with zsh.
Fixes #4483 .
11 years ago
Marc Cornellà
ca5632bce1
Fix syntax error in #4515 on certain shells
...
Drops the `function` keyword and uses only `func(){}` syntax as per the
POSIX specification:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_05
Related: #4531
11 years ago
Marc Cornellà
78dc858396
Revert "Make install script safer"
...
This reverts commit c9d93757e8 , which
makes it fail with a syntax error:
sh: 1: Syntax error: "(" unexpected
11 years ago