From 40bfe5a4124be7b5983756cc81b54a4a4d5846e6 Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Mon, 26 Sep 2016 21:41:42 +0200 Subject: Implement a locking mechanism to avoid multiple update prompts (fixes #3766) --- tools/check_for_upgrade.sh | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index bd9aba8be..d1b174c6d 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -29,31 +29,36 @@ fi # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 -if [ -f ~/.zsh-update ] +if mkdir "$ZSH/log/update.lock" 2>/dev/null then - . ~/.zsh-update + if [ -f ~/.zsh-update ] + then + . ~/.zsh-update - if [[ -z "$LAST_EPOCH" ]]; then - _update_zsh_update && return 0; - fi + if [[ -z "$LAST_EPOCH" ]]; then + _update_zsh_update && return 0; + fi - epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt $epoch_target ] - then - if [ "$DISABLE_UPDATE_PROMPT" = "true" ] + epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) + if [ $epoch_diff -gt $epoch_target ] then - _upgrade_zsh - else - echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" - read line - if [[ "$line" == Y* ]] || [[ "$line" == y* ]] || [ -z "$line" ]; then + if [ "$DISABLE_UPDATE_PROMPT" = "true" ] + then _upgrade_zsh else - _update_zsh_update + echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" + read line + if [[ "$line" == Y* ]] || [[ "$line" == y* ]] || [ -z "$line" ]; then + _upgrade_zsh + else + _update_zsh_update + fi fi fi + else + # create the zsh file + _update_zsh_update fi -else - # create the zsh file - _update_zsh_update + + rm -r $ZSH/log/update.lock fi -- cgit v1.2.3-70-g09d2 From 4fa6be02300ff1bbf3772be0c8f7993a46c3769e Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Mon, 3 Oct 2016 11:52:25 +0200 Subject: Use rmdir instead of rm -r --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index d1b174c6d..3c9a4e4ca 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -60,5 +60,5 @@ then _update_zsh_update fi - rm -r $ZSH/log/update.lock + rmdir $ZSH/log/update.lock fi -- cgit v1.2.3-70-g09d2 From 1f64fa92f524d47a87320a4baf9d9883fd23ab5e Mon Sep 17 00:00:00 2001 From: Fabian Wolff Date: Mon, 3 Oct 2016 11:58:15 +0200 Subject: Convert "if then" statements to "if; then" one-liners --- tools/check_for_upgrade.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 3c9a4e4ca..a57f6da0f 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -29,10 +29,8 @@ fi # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 -if mkdir "$ZSH/log/update.lock" 2>/dev/null -then - if [ -f ~/.zsh-update ] - then +if mkdir "$ZSH/log/update.lock" 2>/dev/null; then + if [ -f ~/.zsh-update ]; then . ~/.zsh-update if [[ -z "$LAST_EPOCH" ]]; then @@ -40,10 +38,8 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt $epoch_target ] - then - if [ "$DISABLE_UPDATE_PROMPT" = "true" ] - then + if [ $epoch_diff -gt $epoch_target ]; then + if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then _upgrade_zsh else echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" -- cgit v1.2.3-70-g09d2 From 2526d71c56efe821caec6e2f03f0e5d695db3ecb Mon Sep 17 00:00:00 2001 From: Doug Yun Date: Wed, 1 Nov 2017 06:21:07 -0700 Subject: Use HTTPS for Planet Argon links (#6326) --- README.md | 4 ++-- tools/install.sh | 2 +- tools/upgrade.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/README.md b/README.md index 4531f7b7b..0771a0361 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ We're on the social media. ## Merchandise -We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town! +We have [stickers](https://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town! ## License @@ -234,6 +234,6 @@ Oh My Zsh is released under the [MIT license](LICENSE.txt). ## About Planet Argon -![Planet Argon](http://pa-github-assets.s3.amazonaws.com/PARGON_logo_digital_COL-small.jpg) +![Planet Argon](https://pa-github-assets.s3.amazonaws.com/PARGON_logo_digital_COL-small.jpg) Oh My Zsh was started by the team at [Planet Argon](https://www.planetargon.com/?utm_source=github), a [Ruby on Rails development agency](https://www.planetargon.com/skills/ruby-on-rails-development?utm_source=github). diff --git a/tools/install.sh b/tools/install.sh index 3f4de8681..187c828f5 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -107,7 +107,7 @@ main() { echo '' echo 'p.s. Follow us at https://twitter.com/ohmyzsh.' echo '' - echo 'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.' + echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.' echo '' printf "${NORMAL}" env zsh diff --git a/tools/upgrade.sh b/tools/upgrade.sh index d5e7e8ba8..25b2de27a 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -33,7 +33,7 @@ then printf '%s\n' ' /____/ ' printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh" - printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: http://shop.planetargon.com/" + printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/" else printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' fi -- cgit v1.2.3-70-g09d2 From 4fec0a46e73479cf3b9e7f953750af5ed5df87ac Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 17 Apr 2018 22:14:23 +0200 Subject: [installer] use `command -v` to check for git Quick fix to the script not finding git due to hash. Solves #6697. --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 187c828f5..840a0d7d8 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -49,7 +49,7 @@ main() { umask g-w,o-w printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" - hash git >/dev/null 2>&1 || { + command -v git >/dev/null 2>&1 || { echo "Error: git is not installed" exit 1 } -- cgit v1.2.3-70-g09d2 From c4981bae0a91ce6d4b0717558342584cc6491199 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 5 May 2018 21:27:48 +0200 Subject: installer: check if zsh in path instead of /etc/shells Fixes #4955 Closes #5931 Closes #6398 Co-authored-by: Void Co-authored-by: Kaleb Elwert --- tools/install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 840a0d7d8..1a0a8e6db 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,12 +24,10 @@ main() { # which may fail on systems lacking tput or terminfo set -e - CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l) - if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then + if command -v zsh >/dev/null 2>&1; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" exit fi - unset CHECK_ZSH_INSTALLED if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh -- cgit v1.2.3-70-g09d2 From 8f0ff4bb63a8fd26741128a851c224af323eb772 Mon Sep 17 00:00:00 2001 From: ningwei1993 Date: Mon, 7 May 2018 06:39:28 +0800 Subject: fix bug for check zsh (#6798) --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 1a0a8e6db..ad47df785 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -24,7 +24,7 @@ main() { # which may fail on systems lacking tput or terminfo set -e - if command -v zsh >/dev/null 2>&1; then + if ! command -v zsh >/dev/null 2>&1; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" exit fi -- cgit v1.2.3-70-g09d2 From 2b7a41b0d2e6a67ad14f94f7cc00293491f2c3f8 Mon Sep 17 00:00:00 2001 From: Gert de Pagter Date: Tue, 15 May 2018 11:26:59 +0200 Subject: 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. --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index a57f6da0f..b42b87750 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -42,7 +42,7 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then if [ "$DISABLE_UPDATE_PROMPT" = "true" ]; then _upgrade_zsh else - echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" + echo "[Oh My Zsh] Would you like to update? [Y/n]: \c" read line if [[ "$line" == Y* ]] || [[ "$line" == y* ]] || [ -z "$line" ]; then _upgrade_zsh -- cgit v1.2.3-70-g09d2 From fec0089cddf4eb6677d90561079f7a6cb0971197 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Wed, 13 Jun 2018 01:02:48 +0100 Subject: Quote $ZSH where necessary in install script (#6587) Quote $ZSH where necessary in install script --- tools/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index ad47df785..b815a9c81 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -59,7 +59,7 @@ main() { exit 1 fi fi - env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { + env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { printf "Error: git clone of oh-my-zsh repo failed\n" exit 1 } @@ -72,9 +72,9 @@ main() { fi printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" - cp $ZSH/templates/zshrc.zsh-template ~/.zshrc + cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc sed "/^export ZSH=/ c\\ - export ZSH=$ZSH + export ZSH=\"$ZSH\" " ~/.zshrc > ~/.zshrc-omztemp mv -f ~/.zshrc-omztemp ~/.zshrc -- cgit v1.2.3-70-g09d2 From de8299d6c4f50bc40286a05cd7e802b6bffe41f0 Mon Sep 17 00:00:00 2001 From: Chao Du Date: Mon, 2 Nov 2015 14:29:37 +0800 Subject: Fixed Issue #4550: Move ~/.zsh-update file to $ZSH_CACHE_DIR --- oh-my-zsh.sh | 14 +++++++------- tools/check_for_upgrade.sh | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 72527362f..ca505d1ba 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,6 +1,12 @@ +# Set ZSH_CACHE_DIR to the path where cache files should be created +# or else we will use the default cache/ +if [[ -z "$ZSH_CACHE_DIR" ]]; then + ZSH_CACHE_DIR="$ZSH/cache" +fi + # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then - env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh + env ZSH=$ZSH ZSH_CACHE_DIR=$ZSH_CACHE_DIR DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh fi # Initializes Oh My Zsh @@ -17,12 +23,6 @@ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi -# Set ZSH_CACHE_DIR to the path where cache files should be created -# or else we will use the default cache/ -if [[ -z "$ZSH_CACHE_DIR" ]]; then - ZSH_CACHE_DIR="$ZSH/cache" -fi - # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index b42b87750..05b31e8d4 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -7,7 +7,7 @@ function _current_epoch() { } function _update_zsh_update() { - echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update + echo "LAST_EPOCH=$(_current_epoch)" >! ${ZSH_CACHE_DIR}/.zsh-update } function _upgrade_zsh() { @@ -30,11 +30,11 @@ fi whence git >/dev/null || return 0 if mkdir "$ZSH/log/update.lock" 2>/dev/null; then - if [ -f ~/.zsh-update ]; then - . ~/.zsh-update + if [ -f ${ZSH_CACHE_DIR}/.zsh-update ]; then + . ${ZSH_CACHE_DIR}/.zsh-update if [[ -z "$LAST_EPOCH" ]]; then - _update_zsh_update && return 0; + _update_zsh_update && return 0 fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) -- cgit v1.2.3-70-g09d2 From 8f95637e6772a1156a29d9c6a9c21ea8d7316a12 Mon Sep 17 00:00:00 2001 From: Joel Kuzmarski Date: Sun, 1 Jul 2018 11:39:30 -0500 Subject: 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 --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index b815a9c81..0cc020053 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -108,7 +108,7 @@ main() { echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.' echo '' printf "${NORMAL}" - env zsh + env zsh -l } main -- cgit v1.2.3-70-g09d2 From 19b925e741fa46d2222210469a4dffc34a634ebd Mon Sep 17 00:00:00 2001 From: Janosch Schwalm Date: Tue, 7 Aug 2018 20:42:02 +0200 Subject: use https everywhere (#6574) * use https everywhere * use https links on the files that are left Also, removed some broken links and updated redirections. --- lib/spectrum.zsh | 2 +- lib/termsupport.zsh | 2 +- plugins/bbedit/README.md | 6 +++--- plugins/bgnotify/README.md | 2 +- plugins/bwana/bwana.plugin.zsh | 4 ++-- plugins/catimg/catimg.plugin.zsh | 2 +- plugins/catimg/catimg.sh | 2 +- plugins/coffee/_coffee | 4 ++-- .../command-not-found/command-not-found.plugin.zsh | 2 +- plugins/debian/debian.plugin.zsh | 2 +- plugins/docker/_docker | 2 +- plugins/dotenv/README.md | 2 +- plugins/droplr/README.md | 2 +- plugins/ember-cli/README.md | 4 ++-- plugins/ember-cli/ember-cli.plugin.zsh | 2 +- plugins/emoji/README.md | 6 +++--- plugins/emoji/emoji-data.txt | 4 ++-- plugins/emoji/update_emoji.pl | 12 +++++------ plugins/forklift/README.md | 2 +- plugins/frontend-search/README.md | 12 +++++------ plugins/frontend-search/frontend-search.plugin.zsh | 10 ++++----- plugins/geeknote/README.md | 2 +- plugins/git-extras/README.md | 2 +- plugins/git-extras/git-extras.plugin.zsh | 6 +++--- plugins/git-flow-avh/git-flow-avh.plugin.zsh | 4 ++-- plugins/git-hubflow/git-hubflow.plugin.zsh | 2 +- plugins/git-prompt/git-prompt.plugin.zsh | 2 +- plugins/github/README.md | 6 +++--- plugins/github/github.plugin.zsh | 4 ++-- plugins/globalias/README.md | 2 +- plugins/hanami/README.md | 4 ++-- plugins/history-substring-search/README.md | 6 +++--- plugins/httpie/README.md | 4 ++-- plugins/jake-node/jake-node.plugin.zsh | 4 ++-- plugins/kitchen/_kitchen | 4 ++-- plugins/kube-ps1/kube-ps1.plugin.zsh | 2 +- plugins/lighthouse/lighthouse.plugin.zsh | 2 +- plugins/lol/lol.plugin.zsh | 4 ++-- plugins/mix-fast/README.md | 4 ++-- plugins/osx/osx.plugin.zsh | 2 +- plugins/osx/spotify | 2 +- plugins/pass/_pass | 2 +- plugins/per-directory-history/README.md | 24 +++++++++++----------- .../per-directory-history.zsh | 2 +- plugins/percol/README.md | 3 --- plugins/perl/perl.plugin.zsh | 2 +- plugins/pod/_pod | 2 +- plugins/pow/pow.plugin.zsh | 2 +- plugins/rake-fast/README.md | 2 +- plugins/repo/README.md | 2 +- plugins/safe-paste/safe-paste.plugin.zsh | 4 ++-- plugins/scala/_scala | 4 ++-- plugins/scd/README.md | 4 ++-- plugins/scw/_scw | 2 +- plugins/shrink-path/README.md | 6 +++--- plugins/shrink-path/shrink-path.plugin.zsh | 6 +++--- plugins/spring/README.md | 10 ++++----- plugins/sprunge/sprunge.plugin.zsh | 22 ++++++++++---------- plugins/ssh-agent/README.md | 2 +- plugins/sublime/README.md | 2 +- plugins/svn/README.md | 2 +- plugins/systemadmin/systemadmin.plugin.zsh | 1 - plugins/taskwarrior/README.md | 2 +- plugins/taskwarrior/_task | 2 +- plugins/textastic/README.md | 4 ++-- plugins/ubuntu/ubuntu.plugin.zsh | 2 +- plugins/urltools/urltools.plugin.zsh | 2 +- plugins/vault/README.md | 8 ++++---- plugins/wp-cli/README.md | 6 +++--- plugins/wp-cli/wp-cli.plugin.zsh | 2 +- plugins/xcode/xcode.plugin.zsh | 2 +- plugins/zsh-navigation-tools/LICENSE | 8 ++++---- themes/adben.zsh-theme | 6 +++--- themes/agnoster.zsh-theme | 2 +- themes/arrow.zsh-theme | 2 +- themes/avit.zsh-theme | 2 +- themes/bira.zsh-theme | 2 +- themes/clean.zsh-theme | 2 +- themes/duellj.zsh-theme | 2 +- themes/funky.zsh-theme | 4 ++-- themes/gnzh.zsh-theme | 1 - themes/half-life.zsh-theme | 4 ++-- themes/itchy.zsh-theme | 2 -- themes/jreese.zsh-theme | 2 -- themes/lambda.zsh-theme | 2 -- themes/lukerandall.zsh-theme | 2 +- themes/macovsky-ruby.zsh-theme | 2 +- themes/macovsky.zsh-theme | 2 +- themes/mh.zsh-theme | 4 ++-- themes/michelebologna.zsh-theme | 10 ++++----- themes/mikeh.zsh-theme | 4 ++-- themes/philips.zsh-theme | 2 +- themes/pmcgee.zsh-theme | 2 +- themes/rkj.zsh-theme | 2 +- themes/sorin.zsh-theme | 8 ++++---- themes/sporty_256.zsh-theme | 2 +- themes/steeef.zsh-theme | 4 ++-- themes/sunaku.zsh-theme | 1 - themes/tonotdo.zsh-theme | 4 ++-- themes/xiong-chiamiov-plus.zsh-theme | 2 +- themes/xiong-chiamiov.zsh-theme | 2 +- tools/theme_chooser.sh | 2 +- 102 files changed, 187 insertions(+), 199 deletions(-) (limited to 'tools') diff --git a/lib/spectrum.zsh b/lib/spectrum.zsh index 87092d8ae..312ab2248 100644 --- a/lib/spectrum.zsh +++ b/lib/spectrum.zsh @@ -1,7 +1,7 @@ #! /bin/zsh # A script to make using 256 colors in zsh less painful. # P.C. Shyamshankar -# Copied from http://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ +# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ typeset -AHg FX FG BG diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 871ab28df..87d55ee89 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -80,7 +80,7 @@ preexec_functions+=(omz_termsupport_preexec) # Keep Apple Terminal.app's current working directory updated -# Based on this answer: http://superuser.com/a/315029 +# Based on this answer: https://superuser.com/a/315029 # With extra fixes to handle multibyte chars and non-UTF-8 locales if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then diff --git a/plugins/bbedit/README.md b/plugins/bbedit/README.md index ec2b743d6..263c54c47 100644 --- a/plugins/bbedit/README.md +++ b/plugins/bbedit/README.md @@ -1,11 +1,11 @@ ## bbedit -Plugin for BBEdit, an HTML and text editor for Mac OS X +Plugin for BBEdit, an HTML and text editor for Mac OS X ### Requirements - * [BBEdit](http://www.barebones.com/products/bbedit/) - * [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html) + * [BBEdit](https://www.barebones.com/products/bbedit/) + * [BBEdit Command-Line Tools](https://www.barebones.com/support/bbedit/cmd-line-tools.html) ### Usage diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md index fad299159..1d8fac54d 100644 --- a/plugins/bgnotify/README.md +++ b/plugins/bgnotify/README.md @@ -13,7 +13,7 @@ Just add bgnotify to your plugins list in your `.zshrc` - On OS X you'll need [terminal-notifier](https://github.com/alloy/terminal-notifier) * `brew install terminal-notifier` (or `gem install terminal-notifier`) - On ubuntu you're already all set! -- On windows you can use [notifu](http://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package +- On windows you can use [notifu](https://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package ## Screenshots diff --git a/plugins/bwana/bwana.plugin.zsh b/plugins/bwana/bwana.plugin.zsh index 455da8621..b9a04793f 100644 --- a/plugins/bwana/bwana.plugin.zsh +++ b/plugins/bwana/bwana.plugin.zsh @@ -1,5 +1,5 @@ # -# Requires http://www.bruji.com/bwana/ +# Requires https://www.bruji.com/bwana/ # if [[ -e /Applications/Bwana.app ]] || ( system_profiler -detailLevel mini SPApplicationsDataType | grep -q Bwana ) @@ -9,5 +9,5 @@ then } else echo "Bwana lets you read man files in Safari through a man: URI scheme" - echo "To use it within Zsh, install it from http://www.bruji.com/bwana/" + echo "To use it within Zsh, install it from https://www.bruji.com/bwana/" fi diff --git a/plugins/catimg/catimg.plugin.zsh b/plugins/catimg/catimg.plugin.zsh index cb92f5986..5f58ecde3 100644 --- a/plugins/catimg/catimg.plugin.zsh +++ b/plugins/catimg/catimg.plugin.zsh @@ -1,6 +1,6 @@ ################################################################################ # catimg script by Eduardo San Martin Morote aka Posva # -# http://posva.net # +# https://posva.net # # # # Ouput the content of an image to the stdout using the 256 colors of the # # terminal. # diff --git a/plugins/catimg/catimg.sh b/plugins/catimg/catimg.sh index cd0f2e333..83ccf6a95 100755 --- a/plugins/catimg/catimg.sh +++ b/plugins/catimg/catimg.sh @@ -1,6 +1,6 @@ ################################################################################ # catimg script by Eduardo San Martin Morote aka Posva # -# http://posva.net # +# https://posva.net # # # # Ouput the content of an image to the stdout using the 256 colors of the # # terminal. # diff --git a/plugins/coffee/_coffee b/plugins/coffee/_coffee index 10b6b8164..5e52b30e6 100644 --- a/plugins/coffee/_coffee +++ b/plugins/coffee/_coffee @@ -1,6 +1,6 @@ #compdef coffee # ------------------------------------------------------------------------------ -# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users +# Copyright (c) 2011 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for Coffee.js v0.6.11 (http://coffeejs.org) +# Completion script for Coffee.js v0.6.11 (https://coffeescript.org) # # ------------------------------------------------------------------------------ # Authors diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index 0e2f2133f..ba1262de6 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -1,5 +1,5 @@ # Uses the command-not-found package zsh support -# as seen in http://www.porcheron.info/command-not-found-for-zsh/ +# as seen in https://www.porcheron.info/command-not-found-for-zsh/ # this is installed in Ubuntu [[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 42690e53e..654b692d2 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -179,7 +179,7 @@ apt-copy() { # apt-history remove # apt-history rollback # apt-history list -# Based On: http://linuxcommando.blogspot.com/2008/08/how-to-show-apt-log-history.html +# Based On: https://linuxcommando.blogspot.com/2008/08/how-to-show-apt-log-history.html apt-history () { case "$1" in install) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 32ad4848a..df4b44961 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -1,6 +1,6 @@ #compdef docker dockerd # -# zsh completion for docker (http://docker.com) +# zsh completion for docker (https://docker.com) # # version: 0.3.0 # github: https://github.com/felixr/docker-zsh-completion diff --git a/plugins/dotenv/README.md b/plugins/dotenv/README.md index e0e75571f..e880e9d69 100644 --- a/plugins/dotenv/README.md +++ b/plugins/dotenv/README.md @@ -2,7 +2,7 @@ Automatically load your project ENV variables from `.env` file when you `cd` into project root directory. -Storing configuration in the environment is one of the tenets of a [twelve-factor app](http://www.12factor.net). Anything that is likely to change between deployment environments, such as resource handles for databases or credentials for external services, should be extracted from the code into environment variables. +Storing configuration in the environment is one of the tenets of a [twelve-factor app](https://www.12factor.net). Anything that is likely to change between deployment environments, such as resource handles for databases or credentials for external services, should be extracted from the code into environment variables. ## Installation diff --git a/plugins/droplr/README.md b/plugins/droplr/README.md index 25cf61db7..6daa2540d 100644 --- a/plugins/droplr/README.md +++ b/plugins/droplr/README.md @@ -16,4 +16,4 @@ Author: [Fabio Fernandes](https://github.com/fabiofl) - Upload a file: `droplr ./path/to/file/` -- Shorten a link: `droplr http://example.com` +- Shorten a link: `droplr https://example.com` diff --git a/plugins/ember-cli/README.md b/plugins/ember-cli/README.md index 1f92bba32..2e4ed7068 100644 --- a/plugins/ember-cli/README.md +++ b/plugins/ember-cli/README.md @@ -1,8 +1,8 @@ # Ember CLI -**Maintainers:** [BilalBudhani](http://www.github.com/BilalBudhani), [eubenesa](http://www.github.com/eubenesa) +**Maintainers:** [BilalBudhani](https://github.com/BilalBudhani), [eubenesa](https://github.com/eubenesa) -Ember CLI (http://www.ember-cli.com/) +Ember CLI (https://www.ember-cli.com/) ### List of Aliases diff --git a/plugins/ember-cli/ember-cli.plugin.zsh b/plugins/ember-cli/ember-cli.plugin.zsh index a0f346829..3d06fd2f5 100644 --- a/plugins/ember-cli/ember-cli.plugin.zsh +++ b/plugins/ember-cli/ember-cli.plugin.zsh @@ -1,5 +1,5 @@ # Ember CLI -# Visit http://www.ember-cli.com/ to view user guide +# Visit https://www.ember-cli.com/ to view user guide alias es='ember serve' alias ea='ember addon' diff --git a/plugins/emoji/README.md b/plugins/emoji/README.md index 889e567e6..8b8860a86 100644 --- a/plugins/emoji/README.md +++ b/plugins/emoji/README.md @@ -71,7 +71,7 @@ PROMPT="$surfer > " ## Technical Details -The emoji names and codes are sourced from Unicode Technical Report \#51, which provides information on emoji support in Unicode. It can be found at http://www.unicode.org/reports/tr51/index.html. +The emoji names and codes are sourced from Unicode Technical Report \#51, which provides information on emoji support in Unicode. It can be found at https://www.unicode.org/reports/tr51/index.html. The group definitions are added by this OMZ plugin. They are not based on external definitions. (As far as I can tell. -apjanke) @@ -108,7 +108,7 @@ The `$emoji_skintone` associative array maps skin tone IDs to the variation sele echo "$emoji[smiling_face_with_open_mouth]$emoji_skintone[4]" ``` -Note that `$emoji_skintone` is an associative array, and its keys are the *names* of "Fitzpatrick Skin Type" groups, not linear indexes into a normal array. The names are `1_2`, `3`, `4`, `5`, and `6`. (Types 1 and 2 are combined into a single color.) See the [Diversity section in Unicode TR 51](http://www.unicode.org/reports/tr51/index.html#Diversity) for details. +Note that `$emoji_skintone` is an associative array, and its keys are the *names* of "Fitzpatrick Skin Type" groups, not linear indexes into a normal array. The names are `1_2`, `3`, `4`, `5`, and `6`. (Types 1 and 2 are combined into a single color.) See the [Diversity section in Unicode TR 51](https://www.unicode.org/reports/tr51/index.html#Diversity) for details. ## TODO @@ -130,6 +130,6 @@ This does *not* mean that it should use Gemoji at run time. None of the `zsh` pl #### ZWJ combining function -One of the newer features of Unicode emoji is the ability to use the "Zero-Width Joiner" character to compose multiple emoji characters in to a single "emoji ligature" glyph. For example, this is [how Apple supports "family" emoji with various genders and skin tones](http://www.unicode.org/reports/tr51/index.html#ZWJ_Sequences). +One of the newer features of Unicode emoji is the ability to use the "Zero-Width Joiner" character to compose multiple emoji characters in to a single "emoji ligature" glyph. For example, this is [how Apple supports "family" emoji with various genders and skin tones](https://www.unicode.org/reports/tr51/index.html#ZWJ_Sequences). These are a pain to write out (and probably worse to read), and it might be convenient to have a couple functions for concisely composing them, if wider support for them appears. diff --git a/plugins/emoji/emoji-data.txt b/plugins/emoji/emoji-data.txt index 7b4c015f7..2d6d64e2b 100644 --- a/plugins/emoji/emoji-data.txt +++ b/plugins/emoji/emoji-data.txt @@ -17,7 +17,7 @@ # none: not applicable # Field 4 — Emoji_Sources: # one or more values from {z, a, j, w, x} -# see the key in http://www.unicode.org/draft/reports/tr51/tr51.html#Major_Sources +# see the key in https://www.unicode.org/draft/reports/tr51/tr51.html#Major_Sources # NA: not applicable # Comment — currently contains the version where the character was first encoded, # followed by: @@ -1200,7 +1200,7 @@ 1F1F2 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇲🇭) flag for Marshall Islands 1F1F2 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇲🇰) flag for Macedonia 1F1F2 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇲🇱) flag for Mali -1F1F2 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇲🇲) flag for Myanmar +1F1F2 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇲🇲) flag for Myanmar 1F1F2 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇲🇳) flag for Mongolia 1F1F2 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇲🇴) flag for Macau 1F1F2 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇲🇵) flag for Northern Mariana Islands diff --git a/plugins/emoji/update_emoji.pl b/plugins/emoji/update_emoji.pl index 04f3ce8e7..8034052b7 100644 --- a/plugins/emoji/update_emoji.pl +++ b/plugins/emoji/update_emoji.pl @@ -5,15 +5,15 @@ # This script generates the emoji.plugin.zsh emoji definitions from the Unicode # character data for the emoji characters. # -# The data file can be found at http://unicode.org/Public/emoji/latest/emoji-data.txt -# as referenced in Unicode TR51 (http://www.unicode.org/reports/tr51/index.html). +# The data file can be found at https://unicode.org/Public/emoji/latest/emoji-data.txt +# as referenced in Unicode TR51 (https://www.unicode.org/reports/tr51/index.html). # # This is known to work with the data file from version 1.0. It may not work with later # versions if the format changes. In particular, this reads line comments to get the # emoji character name and unicode version. # # Country names have punctuation and other non-letter characters removed from their name, -# to avoid possible complications with having to escape the strings when using them as +# to avoid possible complications with having to escape the strings when using them as # array subscripts. The definition file seems to use some combining characters like accents # that get stripped during this process. @@ -41,7 +41,7 @@ sub process_emoji_data_file { # # This contains the definition for: # \$emoji - which maps character names to Unicode characters -# \$emoji_flags - maps country names to Unicode flag characters using region indicators +# \$emoji_flags - maps country names to Unicode flag characters using region indicators # Main emoji typeset -gAH emoji @@ -63,7 +63,7 @@ typeset -gAH emoji_mod next if /^\s*#/ or /^\s*$/; if (/^(\S.*?\S)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w.*?)\s*#\s*V(\S+)\s\(.*?\)\s*(\w.*\S)\s*$/) { - my ($code, $style, $level, $modifier_status, $sources, $version, $keycap_name) + my ($code, $style, $level, $modifier_status, $sources, $version, $keycap_name) = ($1, $2, $3, $4, $5, $6, $7); #print "code=$code style=$style level=$level modifier_status=$modifier_status sources=$sources version=$version name=$keycap_name\n"; my @code_points = split /\s+/, $code; @@ -84,7 +84,7 @@ typeset -gAH emoji_mod if ($flag_country) { $outfh->print("emoji_flags[$zsh_flag_country]=\$'$zsh_code'\n"); } else { - $outfh->print("emoji[$omz_name]=\$'$zsh_code'\n"); + $outfh->print("emoji[$omz_name]=\$'$zsh_code'\n"); } # Modifiers are included in both the main set and their separate map, # because they have a standalone representation as a color swatch. diff --git a/plugins/forklift/README.md b/plugins/forklift/README.md index 6c5cbab23..6c4ce1e81 100644 --- a/plugins/forklift/README.md +++ b/plugins/forklift/README.md @@ -4,7 +4,7 @@ Plugin for ForkLift, an FTP application for OS X. ### Requirements -* [ForkLift](http://www.binarynights.com/forklift/) +* [ForkLift](https://binarynights.com/) ### Usage diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index 4d956e38f..f06e79102 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -35,13 +35,13 @@ Available search contexts are: | angularjs | `https://google.com/search?as_sitesearch=angularjs.org&as_q=` | | aurajs | `http://aurajs.com/api/#stq=` | | bem | `https://google.com/search?as_sitesearch=bem.info&as_q=` | -| bootsnipp | `http://bootsnipp.com/search?q=` | -| caniuse | `http://caniuse.com/#search=` | -| codepen | `http://codepen.io/search?q=` | +| bootsnipp | `https://bootsnipp.com/search?q=` | +| caniuse | `https://caniuse.com/#search=` | +| codepen | `https://codepen.io/search?q=` | | compassdoc | `http://compass-style.org/search?q=` | | cssflow | `http://www.cssflow.com/search?q=` | | dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` | -| emberjs | `http://emberjs.com/api/#stp=1&stq=` | +| emberjs | `https://emberjs.com/api/#stp=1&stq=` | | fontello | `http://fontello.com/#search=` | | html5please | `http://html5please.com/#` | | jquery | `https://api.jquery.com/?s=` | @@ -51,7 +51,7 @@ Available search contexts are: | qunit | `https://api.qunitjs.com/?s=` | | reactjs | `https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=` | | smacss | `https://google.com/search?as_sitesearch=smacss.com&as_q=` | -| stackoverflow | `http://stackoverflow.com/search?q=` | +| stackoverflow | `https://stackoverflow.com/search?q=` | | unheap | `http://www.unheap.com/?s=` | If you want to have another context, open an Issue and tell us! @@ -62,4 +62,4 @@ If you want to have another context, open an Issue and tell us! **Wilson Mendes (willmendesneto)** + + -+ ++ diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 3fd49ab8e..14877fb0d 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -29,13 +29,13 @@ function frontend() { angularjs 'https://google.com/search?as_sitesearch=angularjs.org&as_q=' aurajs 'http://aurajs.com/api/#stq=' bem 'https://google.com/search?as_sitesearch=bem.info&as_q=' - bootsnipp 'http://bootsnipp.com/search?q=' - caniuse 'http://caniuse.com/#search=' - codepen 'http://codepen.io/search?q=' + bootsnipp 'https://bootsnipp.com/search?q=' + caniuse 'https://caniuse.com/#search=' + codepen 'https://codepen.io/search?q=' compassdoc 'http://compass-style.org/search?q=' cssflow 'http://www.cssflow.com/search?q=' dartlang 'https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:' - emberjs 'http://emberjs.com/api/#stp=1&stq=' + emberjs 'https://emberjs.com/api/#stp=1&stq=' fontello 'http://fontello.com/#search=' html5please 'http://html5please.com/#' jquery 'https://api.jquery.com/?s=' @@ -45,7 +45,7 @@ function frontend() { qunit 'https://api.qunitjs.com/?s=' reactjs 'https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=' smacss 'https://google.com/search?as_sitesearch=smacss.com&as_q=' - stackoverflow 'http://stackoverflow.com/search?q=' + stackoverflow 'https://stackoverflow.com/search?q=' unheap 'http://www.unheap.com/?s=' ) diff --git a/plugins/geeknote/README.md b/plugins/geeknote/README.md index a6b50e27f..3f2353112 100644 --- a/plugins/geeknote/README.md +++ b/plugins/geeknote/README.md @@ -1,6 +1,6 @@ ## ZSH-Geeknote -[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for [oh-my-zsh framework](http://github.com/robbyrussell/oh-my-zsh). +[Geeknote](https://github.com/VitaliyRodnenko/geeknote) plugin for oh-my-zsh. Plugins provides: diff --git a/plugins/git-extras/README.md b/plugins/git-extras/README.md index 8f12e297e..987f0d800 100644 --- a/plugins/git-extras/README.md +++ b/plugins/git-extras/README.md @@ -1,6 +1,6 @@ # git-extras -This plugin provides completion definitions for some of the commands defined by [git-extras](http://github.com/tj/git-extras). +This plugin provides completion definitions for some of the commands defined by [git-extras](https://github.com/tj/git-extras). ## Setup notes diff --git a/plugins/git-extras/git-extras.plugin.zsh b/plugins/git-extras/git-extras.plugin.zsh index 0dcd630e8..afc1679cc 100644 --- a/plugins/git-extras/git-extras.plugin.zsh +++ b/plugins/git-extras/git-extras.plugin.zsh @@ -2,7 +2,7 @@ # Description # ----------- # -# Completion script for git-extras (http://github.com/tj/git-extras). +# Completion script for git-extras (https://github.com/tj/git-extras). # # This depends on and reuses some of the internals of the _git completion # function that ships with zsh itself. It will not work with the _git that ships @@ -19,8 +19,8 @@ # Inspirations # ----------- # -# * git-extras (http://github.com/tj/git-extras) -# * git-flow-completion (http://github.com/bobthecow/git-flow-completion) +# * git-extras (https://github.com/tj/git-extras) +# * git-flow-completion (https://github.com/bobthecow/git-flow-completion) # # ------------------------------------------------------------------------------ diff --git a/plugins/git-flow-avh/git-flow-avh.plugin.zsh b/plugins/git-flow-avh/git-flow-avh.plugin.zsh index 1f3fa1e28..db8b5ff89 100755 --- a/plugins/git-flow-avh/git-flow-avh.plugin.zsh +++ b/plugins/git-flow-avh/git-flow-avh.plugin.zsh @@ -5,8 +5,8 @@ # # To achieve git-flow completion nirvana: # -# 0. Update your zsh's git-completion module to the newest verion. -# From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD +# 0. Update your zsh's git-completion module to the newest version. +# From here: https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_git # # 1. Install this file. Either: # diff --git a/plugins/git-hubflow/git-hubflow.plugin.zsh b/plugins/git-hubflow/git-hubflow.plugin.zsh index b0157c7a1..8d968229f 100644 --- a/plugins/git-hubflow/git-hubflow.plugin.zsh +++ b/plugins/git-hubflow/git-hubflow.plugin.zsh @@ -6,7 +6,7 @@ # To achieve git-hubflow completion nirvana: # # 0. Update your zsh's git-completion module to the newest version. -# From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD +# From here: https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_git # # 1. Install this file. Either: # diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh index 5175bf70f..2776f297f 100644 --- a/plugins/git-prompt/git-prompt.plugin.zsh +++ b/plugins/git-prompt/git-prompt.plugin.zsh @@ -1,5 +1,5 @@ # ZSH Git Prompt Plugin from: -# http://github.com/olivierverdier/zsh-git-prompt +# https://github.com/olivierverdier/zsh-git-prompt __GIT_PROMPT_DIR="${0:A:h}" diff --git a/plugins/github/README.md b/plugins/github/README.md index fea607876..2b66e390f 100644 --- a/plugins/github/README.md +++ b/plugins/github/README.md @@ -11,14 +11,14 @@ This plugin supports working with GitHub from the command line. It provides a fe * `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub * `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub * `exist_gh` - Takes an existing repo and pushes it to GitHub -* `git.io` - Shortens a URL using [git.io](http://git.io) +* `git.io` - Shortens a URL using [git.io](https://git.io) ## Installation -[Hub](http://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ. +[Hub](https://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ. -The [`github` Ruby gem](http://github.com/defunkt/github-gem) needs to be installed if you want to use it. +The [`github` Ruby gem](https://github.com/defunkt/github-gem) needs to be installed if you want to use it. ### Configuration diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 077f07bd4..fd19fb524 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -1,4 +1,4 @@ -# Set up hub wrapper for git, if it is available; http://github.com/github/hub +# Set up hub wrapper for git, if it is available; https://github.com/github/hub if (( $+commands[hub] )); then alias git=hub fi @@ -63,7 +63,7 @@ exist_gh() { # [DIRECTORY] # git.io "GitHub URL" # # Shorten GitHub url, example: -# https://github.com/nvogel/dotzsh > http://git.io/8nU25w +# https://github.com/nvogel/dotzsh > https://git.io/8nU25w # source: https://github.com/nvogel/dotzsh # documentation: https://github.com/blog/985-git-io-github-url-shortener # diff --git a/plugins/globalias/README.md b/plugins/globalias/README.md index ba9888ccb..0b064105d 100644 --- a/plugins/globalias/README.md +++ b/plugins/globalias/README.md @@ -2,7 +2,7 @@ Expands all glob expressions, subcommands and aliases (including global). -Idea from: http://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html. +Idea from: https://blog.patshead.com/2012/11/automatically-expaning-zsh-global-aliases---simplified.html. ## Usage diff --git a/plugins/hanami/README.md b/plugins/hanami/README.md index ef3451faf..3ac8defbb 100644 --- a/plugins/hanami/README.md +++ b/plugins/hanami/README.md @@ -1,12 +1,12 @@ # Hanami Plugin # -This plugin adds convenient ways to work with [Hanami](http://hanamirb.org/) via console. +This plugin adds convenient ways to work with [Hanami](https://hanamirb.org/) via console. It's inspired by Rails plugin, so if you've used it, you'll feel like home. ## Usage ## For example, type `hc` into your console when you're within Hanami project directory to run the application console. Have a look at available shortcuts below. You can read more about -these commands [on the official website](http://hanamirb.org/guides/command-line/applications/). +these commands [on the official website](https://hanamirb.org/guides/command-line/applications/). ## Aliases ## diff --git a/plugins/history-substring-search/README.md b/plugins/history-substring-search/README.md index 0c02e91b1..7fb0fa0b6 100644 --- a/plugins/history-substring-search/README.md +++ b/plugins/history-substring-search/README.md @@ -6,9 +6,9 @@ feature, where you can type in any part of any previously entered command and press the UP and DOWN arrow keys to cycle through the matching commands. You can also use K and J in VI mode or ^P and ^N in EMACS mode for the same. -[1]: http://fishshell.com -[2]: http://www.zsh.org/mla/users/2009/msg00818.html -[3]: http://sourceforge.net/projects/fizsh/ +[1]: https://fishshell.com +[2]: https://www.zsh.org/mla/users/2009/msg00818.html +[3]: https://sourceforge.net/projects/fizsh/ [4]: https://github.com/robbyrussell/oh-my-zsh/pull/215 [5]: https://github.com/zsh-users/zsh-history-substring-search [6]: https://github.com/zsh-users/zsh-syntax-highlighting diff --git a/plugins/httpie/README.md b/plugins/httpie/README.md index 1d4ec48bd..56aa6a8ca 100644 --- a/plugins/httpie/README.md +++ b/plugins/httpie/README.md @@ -1,6 +1,6 @@ ## HTTPie **Maintainer:** [lululau](https://github.com/lululau) -This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement. +This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement. -[HTTPie Homepage](http://httpie.org) +[HTTPie Homepage](https://httpie.org) diff --git a/plugins/jake-node/jake-node.plugin.zsh b/plugins/jake-node/jake-node.plugin.zsh index a9eef4029..3b692f899 100644 --- a/plugins/jake-node/jake-node.plugin.zsh +++ b/plugins/jake-node/jake-node.plugin.zsh @@ -3,7 +3,7 @@ # Warning : Jakefile should have the right case : Jakefile or jakefile # Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10 # Author : Alexandre Lacheze (@al3xstrat) -# Inspiration : http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh +# Inspiration : https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh function _jake () { if [ -f Jakefile ]||[ -f jakefile ]; then @@ -11,4 +11,4 @@ function _jake () { fi } -compdef _jake jake \ No newline at end of file +compdef _jake jake diff --git a/plugins/kitchen/_kitchen b/plugins/kitchen/_kitchen index dee5c5809..29a3125e4 100644 --- a/plugins/kitchen/_kitchen +++ b/plugins/kitchen/_kitchen @@ -1,6 +1,6 @@ #compdef kitchen # ------------------------------------------------------------------------------ -# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users +# Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for Test Kitchen (http://kitchen.ci/). +# Completion script for Test Kitchen (https://kitchen.ci/). # # ------------------------------------------------------------------------------ # Authors diff --git a/plugins/kube-ps1/kube-ps1.plugin.zsh b/plugins/kube-ps1/kube-ps1.plugin.zsh index fadef80d7..df7277a26 100644 --- a/plugins/kube-ps1/kube-ps1.plugin.zsh +++ b/plugins/kube-ps1/kube-ps1.plugin.zsh @@ -10,7 +10,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, diff --git a/plugins/lighthouse/lighthouse.plugin.zsh b/plugins/lighthouse/lighthouse.plugin.zsh index 48cddbccc..4a47b6010 100644 --- a/plugins/lighthouse/lighthouse.plugin.zsh +++ b/plugins/lighthouse/lighthouse.plugin.zsh @@ -1,7 +1,7 @@ # To use: add a .lighthouse file into your directory with the URL to the # individual project. For example: # https://rails.lighthouseapp.com/projects/8994 -# Example usage: http://screencast.com/t/ZDgwNDUwNT +# Example usage: https://screencast.com/t/ZDgwNDUwNT open_lighthouse_ticket () { if [ ! -f .lighthouse-url ]; then echo "There is no .lighthouse-url file in the current directory..." diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index e9a62a863..585f96e4f 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -1,5 +1,5 @@ # LOL!!1 -# Source: http://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh +# Source: https://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh alias wtf='dmesg' alias onoz='cat /var/log/errors.log' @@ -45,7 +45,7 @@ alias bringz='git pull' alias chicken='git add' alias oanward='git commit -m' alias ooanward='git commit -am' -alias yolo='git commit -m "$(curl -s whatthecommit.com/index.txt)"' +alias yolo='git commit -m "$(curl -s https://whatthecommit.com/index.txt)"' alias letcat='git checkout' alias violenz='git rebase' diff --git a/plugins/mix-fast/README.md b/plugins/mix-fast/README.md index 9a5eccc3f..644f12409 100644 --- a/plugins/mix-fast/README.md +++ b/plugins/mix-fast/README.md @@ -8,7 +8,7 @@ to update cache you should remove .mix_tasks file Inspired by and based on rake-fast zsh plugin. -This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/). +This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/). ## Installation @@ -25,4 +25,4 @@ You might consider adding `.mix_tasks` to your [global .gitignore](https://help. `mix`, then press tab -Currently maintained by [styx](https://github.com/styx/) \ No newline at end of file +Currently maintained by [styx](https://github.com/styx/) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index b7d6aca72..d99cf0b1e 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -241,7 +241,7 @@ if [[ ! -z "$playlist" ]]; then case "$state" in on|off) - # Inspired by: http://stackoverflow.com/a/14675583 + # Inspired by: https://stackoverflow.com/a/14675583 osascript 1>/dev/null 2>&1 <<-EOF tell application "System Events" to perform action "AXPress" of (menu item "${state}" of menu "Shuffle" of menu item "Shuffle" of menu "Controls" of menu bar item "Controls" of menu bar 1 of application process "iTunes" ) EOF diff --git a/plugins/osx/spotify b/plugins/osx/spotify index 69f6c5419..2ab98d3a0 100644 --- a/plugins/osx/spotify +++ b/plugins/osx/spotify @@ -408,7 +408,7 @@ while [ $# -gt 0 ]; do uri=`osascript -e 'tell application "Spotify" to spotify url of current track'`; remove='spotify:track:' url=${uri#$remove} - url="http://open.spotify.com/track/$url" + url="https://open.spotify.com/track/$url" if [ "$2" = "" ]; then cecho "Spotify URL: $url" diff --git a/plugins/pass/_pass b/plugins/pass/_pass index 7a9b1f955..715229e76 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -8,7 +8,7 @@ # All Rights Reserved. # # This file is licensed under the GPLv2+. -# Please visit http://git.zx2c4.com/password-store/tree/COPYING for more information. +# Please visit https://git.zx2c4.com/password-store/tree/COPYING for more information. # # Oh my zsh plugin maintainer: Santiago Borrazás diff --git a/plugins/per-directory-history/README.md b/plugins/per-directory-history/README.md index 196f74e6c..ea445d329 100644 --- a/plugins/per-directory-history/README.md +++ b/plugins/per-directory-history/README.md @@ -4,13 +4,13 @@ Per directory history for zsh, as well as global history, and the ability to toggle between them with ^G. -This is a implementation of per directory history for zsh, some -implementations of which exist in bash[1][],[2][]. It also implements -a per-directory-history-toggle-history function to change from using the -directory history to using the global history. In both cases the history is -always saved to both the global history and the directory history, so the -toggle state will not effect the saved histories. Being able to switch -between global and directory histories on the fly is a novel feature as far +This is a implementation of per directory history for zsh, some +implementations of which exist in bash[1][],[2][]. It also implements +a per-directory-history-toggle-history function to change from using the +directory history to using the global history. In both cases the history is +always saved to both the global history and the directory history, so the +toggle state will not effect the saved histories. Being able to switch +between global and directory histories on the fly is a novel feature as far as I am aware. This is a standalone repository for the script, however it is also included in @@ -34,7 +34,7 @@ Usage Configuration ------------------------------------------------------------------------------- -* HISTORY_BASE a global variable that defines the base directory in which the +* HISTORY_BASE a global variable that defines the base directory in which the directory histories are stored * per-directory-history-toggle-history is the function to toggle the history @@ -42,14 +42,14 @@ Configuration History ------------------------------------------------------------------------------- -The idea/inspiration for a per directory history is from [Stewart MacArthur][1] -and [Dieter][2], the implementation idea is from [Bart Schaefer][3]. The +The idea/inspiration for a per directory history is from [Stewart MacArthur][1] +and [Dieter][2], the implementation idea is from [Bart Schaefer][3]. The implementation is by [Jim Hester][5] in September 2012. [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html [2]: http://dieter.plaetinck.be/per_directory_bash -[3]: http://www.zsh.org/mla/users/1997/msg00226.html +[3]: https://www.zsh.org/mla/users/1997/msg00226.html [4]: https://github.com/robbyrussell/oh-my-zsh [5]: http://jimhester.com -[6]: http://github.com/jimhester/per-directory-history +[6]: https://github.com/jimhester/per-directory-history diff --git a/plugins/per-directory-history/per-directory-history.zsh b/plugins/per-directory-history/per-directory-history.zsh index 1242dc420..53ad963e7 100644 --- a/plugins/per-directory-history/per-directory-history.zsh +++ b/plugins/per-directory-history/per-directory-history.zsh @@ -26,7 +26,7 @@ # # [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html # [2]: http://dieter.plaetinck.be/per_directory_bash -# [3]: http://www.zsh.org/mla/users/1997/msg00226.html +# [3]: https://www.zsh.org/mla/users/1997/msg00226.html # ################################################################################ # diff --git a/plugins/percol/README.md b/plugins/percol/README.md index 97cca6876..b262e414e 100644 --- a/plugins/percol/README.md +++ b/plugins/percol/README.md @@ -2,9 +2,6 @@ Provides some useful function to make [percol](https://github.com/mooz/percol) work with zsh history and [jump plugin](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/jump/jump.plugin.zsh) -### Preview -![Preview](http://t1.qpic.cn/mblogpic/eb1c8f9d2b9f62d19fa8/2000.jpg) - ### Requirements ```shell diff --git a/plugins/perl/perl.plugin.zsh b/plugins/perl/perl.plugin.zsh index 1fbf7c122..678e88d97 100644 --- a/plugins/perl/perl.plugin.zsh +++ b/plugins/perl/perl.plugin.zsh @@ -21,7 +21,7 @@ alias pd='perldoc' alias ple='perl -wlne' # show the latest stable release of Perl -alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/perl\-([\d\.]+)\.tar\.gz/) { print $1; exit;}'\' +alias latest-perl='curl -s https://www.perl.org/get.html | perl -wlne '\''if (/perl\-([\d\.]+)\.tar\.gz/) { print $1; exit;}'\' diff --git a/plugins/pod/_pod b/plugins/pod/_pod index 508a47102..80d23daad 100644 --- a/plugins/pod/_pod +++ b/plugins/pod/_pod @@ -7,7 +7,7 @@ # ----------------------------------------------------------------------------- # FILE: _pod # DESCRIPTION: Cocoapods (0.33.1) autocomplete plugin for Oh-My-Zsh -# http://cocoapods.org +# https://cocoapods.org # Generated with `pod --completion-script # AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch) # GITHUB: https://github.com/mekanics diff --git a/plugins/pow/pow.plugin.zsh b/plugins/pow/pow.plugin.zsh index ded3336a7..0b8ccd15b 100644 --- a/plugins/pow/pow.plugin.zsh +++ b/plugins/pow/pow.plugin.zsh @@ -73,7 +73,7 @@ powed(){ } # Restart pow process -# taken from http://www.matthewratzloff.com/blog/2011/12/23/restarting-pow-when-dns-stops-responding +# taken from https://www.matthewratzloff.com repow(){ lsof | grep 20560 | awk '{print $2}' | xargs kill -9 launchctl unload ~/Library/LaunchAgents/cx.pow.powd.plist diff --git a/plugins/rake-fast/README.md b/plugins/rake-fast/README.md index 1417befa1..23cbd80fc 100644 --- a/plugins/rake-fast/README.md +++ b/plugins/rake-fast/README.md @@ -8,7 +8,7 @@ checks the file modification time to see if it needs to regenerate the cache file. This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), -which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/). +which is inspired by [this Ruby on Rails trick from 2006](https://weblog.rubyonrails.org/2006/3/9/fast-rake-task-completion-for-zsh/). Think about that. 2006. diff --git a/plugins/repo/README.md b/plugins/repo/README.md index 0b77e6d48..4d9366adf 100644 --- a/plugins/repo/README.md +++ b/plugins/repo/README.md @@ -2,6 +2,6 @@ **Maintainer:** [Stibbons](https://github.com/Stibbons) This plugin mainly add support automatic completion for the repo command line tool: -http://code.google.com/p/git-repo/ +https://code.google.com/p/git-repo/ * `r` aliases `repo` diff --git a/plugins/safe-paste/safe-paste.plugin.zsh b/plugins/safe-paste/safe-paste.plugin.zsh index 17c212c19..75f1791d7 100644 --- a/plugins/safe-paste/safe-paste.plugin.zsh +++ b/plugins/safe-paste/safe-paste.plugin.zsh @@ -1,7 +1,7 @@ -# Code from Mikael Magnusson: http://www.zsh.org/mla/users/2011/msg00367.html +# Code from Mikael Magnusson: https://www.zsh.org/mla/users/2011/msg00367.html # # Requires xterm, urxvt, iTerm2 or any other terminal that supports bracketed -# paste mode as documented: http://www.xfree86.org/current/ctlseqs.html +# paste mode as documented: https://www.xfree86.org/current/ctlseqs.html # create a new keymap to use while pasting bindkey -N paste diff --git a/plugins/scala/_scala b/plugins/scala/_scala index 80434680c..f7511a647 100644 --- a/plugins/scala/_scala +++ b/plugins/scala/_scala @@ -1,6 +1,6 @@ #compdef scala scalac # ------------------------------------------------------------------------------ -# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users +# Copyright (c) 2012 Github zsh-users - https://github.com/zsh-users # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for scala and scalac (http://www.scala-lang.org/). +# Completion script for scala and scalac (https://www.scala-lang.org/). # # ------------------------------------------------------------------------------ # Authors diff --git a/plugins/scd/README.md b/plugins/scd/README.md index 86ab67203..8c156da1f 100644 --- a/plugins/scd/README.md +++ b/plugins/scd/README.md @@ -14,8 +14,8 @@ directory aliases, which appear as named directories in zsh session. ## INSTALLATION NOTES Besides oh-my-zsh, `scd` can be used with *bash*, *dash* or *tcsh* -shells and is also available as [Vim](http://www.vim.org/) plugin and -[IPython](http://ipython.org/) extension. For installation details, see +shells and is also available as [Vim](https://www.vim.org/) plugin and +[IPython](https://ipython.org/) extension. For installation details, see https://github.com/pavoljuhas/smart-change-directory. ## SYNOPSIS diff --git a/plugins/scw/_scw b/plugins/scw/_scw index f9fdf916e..0eb125c65 100644 --- a/plugins/scw/_scw +++ b/plugins/scw/_scw @@ -1,6 +1,6 @@ #compdef scw # -# zsh completion for scw (http://scaleway.com) +# zsh completion for scw (https://www.scaleway.com) # # Inspired by https://github.com/felixr/docker-zsh-completion diff --git a/plugins/shrink-path/README.md b/plugins/shrink-path/README.md index 51fa8a051..b990aea91 100644 --- a/plugins/shrink-path/README.md +++ b/plugins/shrink-path/README.md @@ -57,10 +57,10 @@ supported. Copyright (C) 2008 by Daniel Friesel -License: WTFPL +License: WTFPL -Ref: http://www.zsh.org/mla/workers/2009/msg00415.html - http://www.zsh.org/mla/workers/2009/msg00419.html +Ref: https://www.zsh.org/mla/workers/2009/msg00415.html + https://www.zsh.org/mla/workers/2009/msg00419.html ## Misc diff --git a/plugins/shrink-path/shrink-path.plugin.zsh b/plugins/shrink-path/shrink-path.plugin.zsh index 29e6f0deb..86102e651 100644 --- a/plugins/shrink-path/shrink-path.plugin.zsh +++ b/plugins/shrink-path/shrink-path.plugin.zsh @@ -24,10 +24,10 @@ # Keywords: prompt directory truncate shrink collapse fish # # Copyright (C) 2008 by Daniel Friesel -# License: WTFPL +# License: WTFPL # -# Ref: http://www.zsh.org/mla/workers/2009/msg00415.html -# http://www.zsh.org/mla/workers/2009/msg00419.html +# Ref: https://www.zsh.org/mla/workers/2009/msg00415.html +# https://www.zsh.org/mla/workers/2009/msg00419.html shrink_path () { setopt localoptions diff --git a/plugins/spring/README.md b/plugins/spring/README.md index 62bfd8013..816181326 100644 --- a/plugins/spring/README.md +++ b/plugins/spring/README.md @@ -10,16 +10,16 @@ oh-my-zsh Spring Boot plugin $ cd ~/.oh-my-zsh/plugins $ git clone git@github.com:linux-china/oh-my-zsh-spring-boot-plugin.git spring -Adjust your .zshrc file and add spring to plugins=(...) - -## Tips +Adjust your .zshrc file and add spring to plugins=(...) + +## Tips * Install Spring Cloud plugin: spring install org.springframework.cloud:spring-cloud-cli:1.0.2.RELEASE ## Reference -* Spring Boot: http://projects.spring.io/spring-boot/ -* Spring Boot CLI: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#cli +* Spring Boot: https://spring.io/projects/spring-boot +* Spring Boot CLI: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#cli Maintainer : linux_china ([@linux_china](https://twitter.com/linux_china)) diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index fcc9004f8..e1c89b729 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -1,40 +1,40 @@ # Contributed and SLIGHTLY modded by Matt Parnell/ilikenwf # Created by the blogger at the URL below...I don't know where to find his/her name -# Original found at http://www.shellperson.net/sprunge-pastebin-script/ - +# Original found at https://www.shellperson.net/sprunge-pastebin-script/ + usage() { description | fmt -s >&2 } - + description() { cat << HERE - + DESCRIPTION Upload data and fetch URL from the pastebin http://sprunge.us - + USAGE $0 filename.txt $0 text string $0 < filename.txt piped_data | $0 - + NOTES -------------------------------------------------------------------------- * INPUT METHODS * $0 can accept piped data, STDIN redirection [ + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -671,7 +671,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -690,11 +690,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme index e4774cf0e..b9ac77d00 100644 --- a/themes/adben.zsh-theme +++ b/themes/adben.zsh-theme @@ -6,7 +6,7 @@ # # a) displaying a pseudo-random message from a database of quotations # # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29) # # b) displaying randomly command line tips from The command line fu -# # (http://www.commandlinefu.com) community: in order to make use of this functionality +# # (https://www.commandlinefu.com) community: in order to make use of this functionality # # you will need Internet connection. # # This theme provides as well information for the current user's context, like; # # branch and status for the current version control system (git and svn currently @@ -23,11 +23,11 @@ # # optionally: # # -Oh-myzsh vcs plug-ins git and svn. # # -Solarized theme (https://github.com/altercation/solarized/) -# # -OS X: iTerm 2 (http://www.iterm2.com/) +# # -OS X: iTerm 2 (https://iterm2.com/) # # -font Source code pro (https://github.com/adobe/source-code-pro) # # # # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info: -# # http://pthree.org/2008/11/23/727/ +# # https://pthree.org/2008/11/23/727/ # # enjoy! ########## COLOR ########### for COLOR in CYAN WHITE YELLOW MAGENTA BLACK BLUE RED DEFAULT GREEN GREY; do diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index b0a794f4d..d91f98735 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -13,7 +13,7 @@ # # In addition, I recommend the # [Solarized theme](https://github.com/altercation/solarized/) and, if you're -# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app - +# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app - # it has significantly better color fidelity. # # # Goals diff --git a/themes/arrow.zsh-theme b/themes/arrow.zsh-theme index d62dcdcb9..a3e77d65d 100644 --- a/themes/arrow.zsh-theme +++ b/themes/arrow.zsh-theme @@ -8,7 +8,7 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_DIRTY="*" ZSH_THEME_GIT_PROMPT_CLEAN="" -# See http://geoff.greer.fm/lscolors/ +# See https://geoff.greer.fm/lscolors/ export LSCOLORS="exfxcxdxbxbxbxbxbxbxbx" export LS_COLORS="di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=31;40:cd=31;40:su=31;40:sg=31;40:tw=31;40:ow=31;40:" diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme index c43fcc9fe..cf439f757 100644 --- a/themes/avit.zsh-theme +++ b/themes/avit.zsh-theme @@ -102,7 +102,7 @@ ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}" ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}" ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[white]%}" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="exfxcxdxbxegedabagacad" export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' export GREP_COLOR='1;33' diff --git a/themes/bira.zsh-theme b/themes/bira.zsh-theme index 29bda0be8..675483996 100644 --- a/themes/bira.zsh-theme +++ b/themes/bira.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/clean.zsh-theme b/themes/clean.zsh-theme index 7ee29cb8c..5c96e4726 100644 --- a/themes/clean.zsh-theme +++ b/themes/clean.zsh-theme @@ -9,6 +9,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' diff --git a/themes/duellj.zsh-theme b/themes/duellj.zsh-theme index 3849c35be..f70b39bc3 100644 --- a/themes/duellj.zsh-theme +++ b/themes/duellj.zsh-theme @@ -1,6 +1,6 @@ # user, host, full path, and time/date # on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;34m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}%!%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b ' RPROMPT='[%*]' diff --git a/themes/funky.zsh-theme b/themes/funky.zsh-theme index 2451296d9..574538f88 100644 --- a/themes/funky.zsh-theme +++ b/themes/funky.zsh-theme @@ -1,5 +1,5 @@ # Taken from Tassilo's Blog -# http://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/ +# https://tsdh.wordpress.com/2007/12/06/my-funky-zsh-prompt/ local blue_op="%{$fg[blue]%}[%{$reset_color%}" local blue_cp="%{$fg[blue]%}]%{$reset_color%}" @@ -11,4 +11,4 @@ local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color PROMPT="╭─${path_p}─${user_host}─${ret_status}─${hist_no} ╰─${blue_op}${smiley}${blue_cp} %# " local cur_cmd="${blue_op}%_${blue_cp}" -PROMPT2="${cur_cmd}> " \ No newline at end of file +PROMPT2="${cur_cmd}> " diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index 04b0450a8..c763ef3c6 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -1,4 +1,3 @@ -# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png # Based on bira theme setopt prompt_subst diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index 8b458cde9..c79027ed6 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -1,11 +1,11 @@ # prompt style and colors based on Steve Losh's Prose theme: -# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme +# https://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme # # vcs_info modifications from Bart Trojanowski's zsh prompt: # http://www.jukie.net/bart/blog/pimping-out-zsh-prompt # # git untracked files modification from Brian Carper: -# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt +# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt function virtualenv_info { [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' diff --git a/themes/itchy.zsh-theme b/themes/itchy.zsh-theme index c23889edf..e1f2d56e2 100644 --- a/themes/itchy.zsh-theme +++ b/themes/itchy.zsh-theme @@ -1,5 +1,3 @@ -# Inspired by http://peepcode.com/blog/2012/my-command-line-prompt - local smiley="%(?,%{$fg[green]%}☺%{$reset_color%},%{$fg[red]%}☹%{$reset_color%})" local user="%{$fg[cyan]%}%n%{$reset_color%}" diff --git a/themes/jreese.zsh-theme b/themes/jreese.zsh-theme index 0fa6b4ecd..de42a1010 100644 --- a/themes/jreese.zsh-theme +++ b/themes/jreese.zsh-theme @@ -1,5 +1,3 @@ -# ZSH Theme - Preview: http://dl.dropbox.com/u/1552408/Screenshots/2010-04-08-oh-my-zsh.png - if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/lambda.zsh-theme b/themes/lambda.zsh-theme index 63292d331..6e67773ea 100644 --- a/themes/lambda.zsh-theme +++ b/themes/lambda.zsh-theme @@ -1,5 +1,3 @@ -# ZSH Theme - Preview: http://cl.ly/350F0F0k1M2y3A2i3p1S - PROMPT='λ %~/ $(git_prompt_info)%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" diff --git a/themes/lukerandall.zsh-theme b/themes/lukerandall.zsh-theme index f4045bd8e..cdecd284f 100644 --- a/themes/lukerandall.zsh-theme +++ b/themes/lukerandall.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc +# ZSH Theme - Preview: https://cl.ly/f701d00760f8059e06dc # Thanks to gallifrey, upon whose theme this is based local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})" diff --git a/themes/macovsky-ruby.zsh-theme b/themes/macovsky-ruby.zsh-theme index 69d80d588..abda6232c 100644 --- a/themes/macovsky-ruby.zsh-theme +++ b/themes/macovsky-ruby.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" if [ -e ~/.rvm/bin/rvm-prompt ]; then diff --git a/themes/macovsky.zsh-theme b/themes/macovsky.zsh-theme index 2e6dce42d..d3f7d16b4 100644 --- a/themes/macovsky.zsh-theme +++ b/themes/macovsky.zsh-theme @@ -1,4 +1,4 @@ -# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png +# ZSH Theme - Preview: https://i.gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" if [ -e ~/.rvm/bin/rvm-prompt ]; then diff --git a/themes/mh.zsh-theme b/themes/mh.zsh-theme index 34a3765b1..2b2cc9b68 100644 --- a/themes/mh.zsh-theme +++ b/themes/mh.zsh-theme @@ -1,5 +1,5 @@ # mh theme -# preview: http://cl.ly/1y2x0W0E3t2C0F29043z +# preview: https://cl.ly/1y2x0W0E3t2C0F29043z # features: # path is autoshortened to ~30 characters @@ -19,6 +19,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index 110e3f203..7ff6a7ffe 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -1,16 +1,16 @@ # Michele Bologna's theme -# http://michelebologna.net +# https://www.michelebologna.net # # This a theme for oh-my-zsh. Features a colored prompt with: -# * username@host: [jobs] [git] workdir % -# * hostname color is based on hostname characters. When using as root, the +# * username@host: [jobs] [git] workdir % +# * hostname color is based on hostname characters. When using as root, the # prompt shows only the hostname in red color. # * [jobs], if applicable, counts the number of suspended jobs tty # * [git], if applicable, represents the status of your git repo (more on that # later) # * '%' prompt will be green if last command return value is 0, yellow otherwise. -# -# git prompt is inspired by official git contrib prompt: +# +# git prompt is inspired by official git contrib prompt: # https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh # and it adds: # * the current branch diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme index a95383ba5..f231b91bb 100644 --- a/themes/mikeh.zsh-theme +++ b/themes/mikeh.zsh-theme @@ -15,7 +15,7 @@ mikeh_precmd() { # user, host, full path, and time/date # on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 PROMPT=$'%{\e[0;34m%}%B..[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %I:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B..%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <($vcs_info_msg_0_)>%{\e[0m%}%b ' -PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' \ No newline at end of file +PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/themes/philips.zsh-theme b/themes/philips.zsh-theme index f6e5b324e..fec734bad 100644 --- a/themes/philips.zsh-theme +++ b/themes/philips.zsh-theme @@ -9,6 +9,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="*" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.patch=00;34:*.o=00;32:*.so=01;35:*.ko=01;31:*.la=00;33' diff --git a/themes/pmcgee.zsh-theme b/themes/pmcgee.zsh-theme index e4e45c71a..58a9b8bef 100644 --- a/themes/pmcgee.zsh-theme +++ b/themes/pmcgee.zsh-theme @@ -11,6 +11,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}*" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' diff --git a/themes/rkj.zsh-theme b/themes/rkj.zsh-theme index fe06161c8..d7c9314e3 100644 --- a/themes/rkj.zsh-theme +++ b/themes/rkj.zsh-theme @@ -1,6 +1,6 @@ # user, host, full path, and time/date # on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 function retcode() {} diff --git a/themes/sorin.zsh-theme b/themes/sorin.zsh-theme index ac6a49840..e478d2672 100644 --- a/themes/sorin.zsh-theme +++ b/themes/sorin.zsh-theme @@ -1,10 +1,10 @@ # sorin.zsh-theme -# screenshot: http://i.imgur.com/aipDQ.png +# screenshot: https://i.imgur.com/aipDQ.png if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" - + PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%}❯)%{$reset_color%} ' ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}" @@ -20,10 +20,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" -else +else MODE_INDICATOR="❮❮❮" local return_status="%(?::⏎)" - + PROMPT='%c$(git_prompt_info) %(!.#.❯) ' ZSH_THEME_GIT_PROMPT_PREFIX=" git:" diff --git a/themes/sporty_256.zsh-theme b/themes/sporty_256.zsh-theme index db0fc4277..e008a8664 100644 --- a/themes/sporty_256.zsh-theme +++ b/themes/sporty_256.zsh-theme @@ -1,6 +1,6 @@ # zsh theme requires 256 color enabled terminal # i.e TERM=xterm-256color -# Preview - http://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ +# Preview - https://www.flickr.com/photos/adelcampo/4556482563/sizes/o/ # based on robbyrussell's shell but louder! PROMPT='%{$fg_bold[blue]%}$(git_prompt_info) %F{208}%c%f diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index 622c90465..3532d3bc7 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -1,11 +1,11 @@ # prompt style and colors based on Steve Losh's Prose theme: -# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme +# https://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme # # vcs_info modifications from Bart Trojanowski's zsh prompt: # http://www.jukie.net/bart/blog/pimping-out-zsh-prompt # # git untracked files modification from Brian Carper: -# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt +# https://briancarper.net/blog/570/git-info-in-your-zsh-prompt export VIRTUAL_ENV_DISABLE_PROMPT=1 diff --git a/themes/sunaku.zsh-theme b/themes/sunaku.zsh-theme index 440fa90b4..77f3acc7b 100644 --- a/themes/sunaku.zsh-theme +++ b/themes/sunaku.zsh-theme @@ -1,5 +1,4 @@ # Git-centric variation of the "fishy" theme. -# See screenshot at http://ompldr.org/vOHcwZg ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+" ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!" diff --git a/themes/tonotdo.zsh-theme b/themes/tonotdo.zsh-theme index a6407034c..426e2bf35 100644 --- a/themes/tonotdo.zsh-theme +++ b/themes/tonotdo.zsh-theme @@ -7,6 +7,6 @@ ZSH_THEME_GIT_PROMPT_SUFFIX="" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%})" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[yellow]%}✗%{$fg_bold[blue]%})" -# LS colors, made with http://geoff.greer.fm/lscolors/ +# LS colors, made with https://geoff.greer.fm/lscolors/ export LSCOLORS="Gxfxcxdxbxegedabagacad" -export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' \ No newline at end of file +export LS_COLORS='no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.avi=01;35:*.bmp=01;35:*.fli=01;35:*.gif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mng=01;35:*.mov=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.tga=01;35:*.tif=01;35:*.xbm=01;35:*.xpm=01;35:*.dl=01;35:*.gl=01;35:*.wmv=01;35:*.aiff=00;32:*.au=00;32:*.mid=00;32:*.mp3=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:' diff --git a/themes/xiong-chiamiov-plus.zsh-theme b/themes/xiong-chiamiov-plus.zsh-theme index 5fb4fe6f4..aa6ef7421 100644 --- a/themes/xiong-chiamiov-plus.zsh-theme +++ b/themes/xiong-chiamiov-plus.zsh-theme @@ -1,6 +1,6 @@ # user, host, full path, and time/date # on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(git_prompt_info)>%{\e[0m%}%b ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/themes/xiong-chiamiov.zsh-theme b/themes/xiong-chiamiov.zsh-theme index 0ed335fb5..b67d9947c 100644 --- a/themes/xiong-chiamiov.zsh-theme +++ b/themes/xiong-chiamiov.zsh-theme @@ -1,6 +1,6 @@ # user, host, full path, and time/date # on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# entry in a nice long thread on the Arch Linux forums: https://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%a %b %d, %H:%M"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%} %{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]>%{\e[0m%}%b ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' diff --git a/tools/theme_chooser.sh b/tools/theme_chooser.sh index 2c2a379ba..82ae5857c 100755 --- a/tools/theme_chooser.sh +++ b/tools/theme_chooser.sh @@ -5,7 +5,7 @@ # the extent permitted by applicable law. You can redistribute it # and/or modify it under the terms of the Do What The Fuck You Want # To Public License, Version 2, as published by Sam Hocevar. See -# http://sam.zoy.org/wtfpl/COPYING for more details. +# http://www.wtfpl.net/txt/copying/ for more details. THEMES_DIR="$ZSH/themes" FAVLIST="${HOME}/.zsh_favlist" -- cgit v1.2.3-70-g09d2 From 026e4e499e6b01ebe4b6d9748c6e2eb182ad1359 Mon Sep 17 00:00:00 2001 From: Jackson Delahunt Date: Wed, 16 Jan 2019 05:01:34 +1100 Subject: installer: make TEST_CURRENT_SHELL use basename (#7514) Fixes #7492 --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 0cc020053..2fb87cdaf 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -79,7 +79,7 @@ main() { mv -f ~/.zshrc-omztemp ~/.zshrc # If this user's login shell is not already "zsh", attempt to switch. - TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') + TEST_CURRENT_SHELL=$(basename "$SHELL") if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then # If this platform provides a "chsh" command (not Cygwin), do it, man! if hash chsh >/dev/null 2>&1; then -- cgit v1.2.3-70-g09d2 From f319aa845dfa6b202e31dacf49ec8c2b2d5d17c2 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 25 Feb 2019 19:22:07 -0600 Subject: 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 --- README.md | 2 +- tools/install.sh | 2 +- tools/upgrade.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/README.md b/README.md index b3651a99c..d6c77a147 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ We're on the social media. ## Merchandise -We have [stickers](https://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](https://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town! +We have [stickers, shirts, and coffee mugs available](https://shop.planetargon.com/collections/oh-my-zsh?utm_source=github) for you to show off your love of Oh My Zsh. Again, you will become the talk of the town! ## License diff --git a/tools/install.sh b/tools/install.sh index 2fb87cdaf..e2b33f640 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -105,7 +105,7 @@ main() { echo '' echo 'p.s. Follow us at https://twitter.com/ohmyzsh.' echo '' - echo 'p.p.s. Get stickers and t-shirts at https://shop.planetargon.com.' + echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh.' echo '' printf "${NORMAL}" env zsh -l diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 25b2de27a..d234c7f88 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -33,7 +33,7 @@ then printf '%s\n' ' /____/ ' printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh" - printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/" + printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh" else printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' fi -- cgit v1.2.3-70-g09d2 From c23ab00990c8528a3334d178b9ec9135385cc99f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 7 Apr 2019 20:39:25 +0200 Subject: 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. --- tools/check_for_upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 05b31e8d4..c8dedcf77 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -34,7 +34,9 @@ if mkdir "$ZSH/log/update.lock" 2>/dev/null; then . ${ZSH_CACHE_DIR}/.zsh-update if [[ -z "$LAST_EPOCH" ]]; then - _update_zsh_update && return 0 + _update_zsh_update + rmdir $ZSH/log/update.lock # TODO: fix later + return 0 fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) -- cgit v1.2.3-70-g09d2 From 9b2410fbcfa21d6115219fe626a6f422b578d3ac Mon Sep 17 00:00:00 2001 From: Guillermo Azurdia Date: Thu, 18 Apr 2019 16:08:07 -0500 Subject: Remove dots from installer URLs (#7780) --- tools/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index e2b33f640..2e5e8fd43 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -103,9 +103,9 @@ main() { echo '' echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' echo '' - echo 'p.s. Follow us at https://twitter.com/ohmyzsh.' + echo 'p.s. Follow us at https://twitter.com/ohmyzsh' echo '' - echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh.' + echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh' echo '' printf "${NORMAL}" env zsh -l -- cgit v1.2.3-70-g09d2 From 9a832cccef79084e02028ca2fa8b021817256ad4 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 29 May 2016 10:35:55 +0200 Subject: installer: use exit-on-error from the beginning --- tools/install.sh | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 2e5e8fd43..5c5419b17 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,8 +1,16 @@ +#!/bin/sh +set -e + +# Test command existence (POSIX compatible) +command_exists() { + command -v "$@" >/dev/null 2>&1 +} + main() { # Use colors, but only if connected to a terminal, and that terminal # supports them. - if which tput >/dev/null 2>&1; then - ncolors=$(tput colors) + if command_exists tput; then + ncolors=$(tput colors) fi if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then RED="$(tput setaf 1)" @@ -20,13 +28,9 @@ main() { NORMAL="" fi - # Only enable exit-on-error after the non-critical colorization stuff, - # which may fail on systems lacking tput or terminfo - set -e - - if ! command -v zsh >/dev/null 2>&1; then + if ! command_exists zsh; then printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" - exit + exit 1 fi if [ ! -n "$ZSH" ]; then @@ -36,7 +40,7 @@ main() { if [ -d "$ZSH" ]; then printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n" printf "You'll need to remove $ZSH if you want to re-install.\n" - exit + exit 1 fi # Prevent the cloned repository from having insecure permissions. Failing to do @@ -47,7 +51,7 @@ main() { umask g-w,o-w printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" - command -v git >/dev/null 2>&1 || { + command_exists git || { echo "Error: git is not installed" exit 1 } @@ -82,7 +86,7 @@ main() { TEST_CURRENT_SHELL=$(basename "$SHELL") if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then # If this platform provides a "chsh" command (not Cygwin), do it, man! - if hash chsh >/dev/null 2>&1; then + if command_exists chsh; then printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n" chsh -s $(grep /zsh$ /etc/shells | tail -1) # Else, suggest the user do so manually. -- cgit v1.2.3-70-g09d2 From 73ef051aaecd5a63b84585bf67e263642660abb4 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 9 Aug 2016 02:28:47 +0200 Subject: 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. --- .editorconfig | 10 +++ tools/install.sh | 194 +++++++++++++++++++++++++++---------------------------- 2 files changed, 107 insertions(+), 97 deletions(-) create mode 100644 .editorconfig (limited to 'tools') diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..aa18e0e5c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +[*.sh] +indent_size = 4 +indent_style = tab diff --git a/tools/install.sh b/tools/install.sh index 5c5419b17..b1327af41 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -3,116 +3,116 @@ set -e # Test command existence (POSIX compatible) command_exists() { - command -v "$@" >/dev/null 2>&1 + command -v "$@" >/dev/null 2>&1 } main() { - # Use colors, but only if connected to a terminal, and that terminal - # supports them. - if command_exists tput; then - ncolors=$(tput colors) - fi - if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then - RED="$(tput setaf 1)" - GREEN="$(tput setaf 2)" - YELLOW="$(tput setaf 3)" - BLUE="$(tput setaf 4)" - BOLD="$(tput bold)" - NORMAL="$(tput sgr0)" - else - RED="" - GREEN="" - YELLOW="" - BLUE="" - BOLD="" - NORMAL="" - fi + # Use colors, but only if connected to a terminal, and that terminal + # supports them. + if command_exists tput; then + ncolors=$(tput colors) + fi - if ! command_exists zsh; then - printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" - exit 1 - fi + if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then + RED="$(tput setaf 1)" + GREEN="$(tput setaf 2)" + YELLOW="$(tput setaf 3)" + BLUE="$(tput setaf 4)" + BOLD="$(tput bold)" + NORMAL="$(tput sgr0)" + else + RED="" + GREEN="" + YELLOW="" + BLUE="" + BOLD="" + NORMAL="" + fi - if [ ! -n "$ZSH" ]; then - ZSH=~/.oh-my-zsh - fi + if ! command_exists zsh; then + printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" + exit 1 + fi - if [ -d "$ZSH" ]; then - printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n" - printf "You'll need to remove $ZSH if you want to re-install.\n" - exit 1 - fi + if [ ! -n "$ZSH" ]; then + ZSH=~/.oh-my-zsh + fi - # Prevent the cloned repository from having insecure permissions. Failing to do - # so causes compinit() calls to fail with "command not found: compdef" errors - # for users with insecure umasks (e.g., "002", allowing group writability). Note - # that this will be ignored under Cygwin by default, as Windows ACLs take - # precedence over umasks except for filesystems mounted with option "noacl". - umask g-w,o-w + if [ -d "$ZSH" ]; then + printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n" + printf "You'll need to remove $ZSH if you want to re-install.\n" + exit 1 + fi - printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" - command_exists git || { - echo "Error: git is not installed" - exit 1 - } - # The Windows (MSYS) Git is not compatible with normal use on cygwin - if [ "$OSTYPE" = cygwin ]; then - if git --version | grep msysgit > /dev/null; then - echo "Error: Windows/MSYS Git is not supported on Cygwin" - echo "Error: Make sure the Cygwin git package is installed and is first on the path" - exit 1 - fi - fi - env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { - printf "Error: git clone of oh-my-zsh repo failed\n" - exit 1 - } + # Prevent the cloned repository from having insecure permissions. Failing to do + # so causes compinit() calls to fail with "command not found: compdef" errors + # for users with insecure umasks (e.g., "002", allowing group writability). Note + # that this will be ignored under Cygwin by default, as Windows ACLs take + # precedence over umasks except for filesystems mounted with option "noacl". + umask g-w,o-w + printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" + command_exists git || { + echo "Error: git is not installed" + exit 1 + } + # The Windows (MSYS) Git is not compatible with normal use on cygwin + if [ "$OSTYPE" = cygwin ]; then + if git --version | grep msysgit > /dev/null; then + echo "Error: Windows/MSYS Git is not supported on Cygwin" + echo "Error: Make sure the Cygwin git package is installed and is first on the path" + exit 1 + fi + fi + env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { + printf "Error: git clone of oh-my-zsh repo failed\n" + exit 1 + } - printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" - if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n"; - mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; - fi + printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" + if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then + printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n"; + mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; + fi - printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" - cp "$ZSH"/templates/zshrc.zsh-template ~/.zshrc - sed "/^export ZSH=/ c\\ - export ZSH=\"$ZSH\" - " ~/.zshrc > ~/.zshrc-omztemp - mv -f ~/.zshrc-omztemp ~/.zshrc + printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" + cp "$ZSH/templates/zshrc.zsh-template" ~/.zshrc + sed "/^export ZSH=/ c\\ +export ZSH=\"$ZSH\" +" ~/.zshrc > ~/.zshrc-omztemp + mv -f ~/.zshrc-omztemp ~/.zshrc - # If this user's login shell is not already "zsh", attempt to switch. - TEST_CURRENT_SHELL=$(basename "$SHELL") - if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then - # If this platform provides a "chsh" command (not Cygwin), do it, man! - if command_exists chsh; then - printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n" - chsh -s $(grep /zsh$ /etc/shells | tail -1) - # Else, suggest the user do so manually. - else - printf "I can't change your shell automatically because this system does not have chsh.\n" - printf "${BLUE}Please manually change your default shell to zsh!${NORMAL}\n" - fi - fi + # If this user's login shell is not already "zsh", attempt to switch. + TEST_CURRENT_SHELL=$(basename "$SHELL") + if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then + # If this platform provides a "chsh" command (not Cygwin), do it, man! + if command_exists chsh; then + printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n" + chsh -s $(grep /zsh$ /etc/shells | tail -1) + # Else, suggest the user do so manually. + else + printf "I can't change your shell automatically because this system does not have chsh.\n" + printf "${BLUE}Please manually change your default shell to zsh!${NORMAL}\n" + fi + fi - printf "${GREEN}" - echo ' __ __ ' - echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' - echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' - echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' - echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' - echo ' /____/ ....is now installed!' - echo '' - echo '' - echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' - echo '' - echo 'p.s. Follow us at https://twitter.com/ohmyzsh' - echo '' - echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh' - echo '' - printf "${NORMAL}" - env zsh -l + printf "${GREEN}" + echo ' __ __ ' + echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' + echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' + echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' + echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' + echo ' /____/ ....is now installed!' + echo '' + echo '' + echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' + echo '' + echo 'p.s. Follow us at https://twitter.com/ohmyzsh' + echo '' + echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh' + echo '' + printf "${NORMAL}" + env zsh -l } main -- cgit v1.2.3-70-g09d2 From f94443925dacf44ad24e0efef9e486afb1c9c4d0 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 30 May 2016 18:05:29 +0200 Subject: installer: reorganise and add comments --- tools/install.sh | 97 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 57 insertions(+), 40 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index b1327af41..f7eee4dab 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,7 +1,18 @@ #!/bin/sh +# +# This script should be run via curl: +# sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +# or wget: +# sh -c "$(wget -qO- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +# +# As an alternative, you can download the install script separately and +# run it afterwards with `sh install.sh' +# set -e -# Test command existence (POSIX compatible) +# Default location +ZSH=${ZSH:-~/.oh-my-zsh} + command_exists() { command -v "$@" >/dev/null 2>&1 } @@ -30,17 +41,15 @@ main() { fi if ! command_exists zsh; then - printf "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!\n" + echo "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!" exit 1 fi - if [ ! -n "$ZSH" ]; then - ZSH=~/.oh-my-zsh - fi - if [ -d "$ZSH" ]; then - printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n" - printf "You'll need to remove $ZSH if you want to re-install.\n" + cat <<-EOF + ${YELLOW}You already have Oh My Zsh installed.${NORMAL} + You'll need to remove $ZSH if you want to re-install. + EOF exit 1 fi @@ -51,31 +60,34 @@ main() { # precedence over umasks except for filesystems mounted with option "noacl". umask g-w,o-w - printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" + echo "${BLUE}Cloning Oh My Zsh...${NORMAL}" + command_exists git || { echo "Error: git is not installed" exit 1 } - # The Windows (MSYS) Git is not compatible with normal use on cygwin - if [ "$OSTYPE" = cygwin ]; then - if git --version | grep msysgit > /dev/null; then - echo "Error: Windows/MSYS Git is not supported on Cygwin" - echo "Error: Make sure the Cygwin git package is installed and is first on the path" - exit 1 - fi + + if [ "$OSTYPE" = cygwin ] && git --version | grep -q msysgit; then + cat <<-EOF + Error: Windows/MSYS Git is not supported on Cygwin + Error: Make sure the Cygwin git package is installed and is first on the $PATH + EOF + exit 1 fi - env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { - printf "Error: git clone of oh-my-zsh repo failed\n" + + git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { + echo "Error: git clone of oh-my-zsh repo failed" exit 1 } - printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" + echo "${BLUE}Looking for an existing zsh config...${NORMAL}" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n"; + echo "${YELLOW}Found ~/.zshrc.${GREEN} Backing up to ~/.zshrc.pre-oh-my-zsh.${NORMAL}" mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; fi - printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" + echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${NORMAL}" + cp "$ZSH/templates/zshrc.zsh-template" ~/.zshrc sed "/^export ZSH=/ c\\ export ZSH=\"$ZSH\" @@ -87,31 +99,36 @@ export ZSH=\"$ZSH\" if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then # If this platform provides a "chsh" command (not Cygwin), do it, man! if command_exists chsh; then - printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n" + echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" chsh -s $(grep /zsh$ /etc/shells | tail -1) # Else, suggest the user do so manually. else - printf "I can't change your shell automatically because this system does not have chsh.\n" - printf "${BLUE}Please manually change your default shell to zsh!${NORMAL}\n" + cat <<-EOF + I can't change your shell automatically because this system does not have chsh. + ${BLUE}Please manually change your default shell to zsh${NORMAL} + EOF fi fi - printf "${GREEN}" - echo ' __ __ ' - echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' - echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' - echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' - echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' - echo ' /____/ ....is now installed!' - echo '' - echo '' - echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' - echo '' - echo 'p.s. Follow us at https://twitter.com/ohmyzsh' - echo '' - echo 'p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh' - echo '' - printf "${NORMAL}" + printf "$GREEN" + cat <<-'EOF' + __ __ + ____ / /_ ____ ___ __ __ ____ _____/ /_ + / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ + / /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / + \____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ + /____/ ....is now installed! + + + Please look over the ~/.zshrc file to select plugins, themes, and options. + + p.s. Follow us on https://twitter.com/ohmyzsh + + p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh + + EOF + printf "$NORMAL" + env zsh -l } -- cgit v1.2.3-70-g09d2 From a7bd1f99ae54ff2e2081c455f1b34900059ccc71 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 29 May 2016 08:15:40 +0200 Subject: installer: extract most code into functions --- tools/install.sh | 52 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 18 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index f7eee4dab..3ed8584aa 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -17,14 +17,16 @@ command_exists() { command -v "$@" >/dev/null 2>&1 } -main() { - # Use colors, but only if connected to a terminal, and that terminal - # supports them. +# Set up color sequences +setup_color() { if command_exists tput; then ncolors=$(tput colors) + else + ncolors=0 fi - if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then + # Only use colors if connected to a terminal that supports them + if [ -t 1 ] && [ $ncolors -ge 8 ]; then RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" YELLOW="$(tput setaf 3)" @@ -39,20 +41,9 @@ main() { BOLD="" NORMAL="" fi +} - if ! command_exists zsh; then - echo "${YELLOW}Zsh is not installed!${NORMAL} Please install zsh first!" - exit 1 - fi - - if [ -d "$ZSH" ]; then - cat <<-EOF - ${YELLOW}You already have Oh My Zsh installed.${NORMAL} - You'll need to remove $ZSH if you want to re-install. - EOF - exit 1 - fi - +setup_ohmyzsh() { # Prevent the cloned repository from having insecure permissions. Failing to do # so causes compinit() calls to fail with "command not found: compdef" errors # for users with insecure umasks (e.g., "002", allowing group writability). Note @@ -79,11 +70,13 @@ main() { echo "Error: git clone of oh-my-zsh repo failed" exit 1 } +} +setup_zshrc() { echo "${BLUE}Looking for an existing zsh config...${NORMAL}" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then echo "${YELLOW}Found ~/.zshrc.${GREEN} Backing up to ~/.zshrc.pre-oh-my-zsh.${NORMAL}" - mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; + mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh fi echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${NORMAL}" @@ -93,7 +86,9 @@ main() { export ZSH=\"$ZSH\" " ~/.zshrc > ~/.zshrc-omztemp mv -f ~/.zshrc-omztemp ~/.zshrc +} +setup_shell() { # If this user's login shell is not already "zsh", attempt to switch. TEST_CURRENT_SHELL=$(basename "$SHELL") if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then @@ -109,6 +104,27 @@ export ZSH=\"$ZSH\" EOF fi fi +} + +main() { + setup_color + + if ! command_exists zsh; then + echo "${YELLOW}Zsh is not installed.${NORMAL} Please install zsh first." + exit 1 + fi + + if [ -d "$ZSH" ]; then + cat <<-EOF + ${YELLOW}You already have Oh My Zsh installed.${NORMAL} + You'll need to remove $ZSH if you want to reinstall. + EOF + exit 1 + fi + + setup_ohmyzsh + setup_zshrc + setup_shell printf "$GREEN" cat <<-'EOF' -- cgit v1.2.3-70-g09d2 From 576499a5ad6bc7b4b80238010ce8f1ab6dcde264 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 21 May 2019 14:15:42 +0200 Subject: installer: fix for failed chsh quitting the installation --- tools/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 3ed8584aa..446e7f416 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -95,7 +95,9 @@ setup_shell() { # If this platform provides a "chsh" command (not Cygwin), do it, man! if command_exists chsh; then echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" - chsh -s $(grep /zsh$ /etc/shells | tail -1) + if ! chsh -s $(grep /zsh$ /etc/shells | tail -1); then + echo "Error: chsh command unsuccessful. Change your default shell manually." + fi # Else, suggest the user do so manually. else cat <<-EOF -- cgit v1.2.3-70-g09d2 From 1fdd5351fbea83293c510a4457ada799ae407a8b Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 21 May 2019 14:47:25 +0200 Subject: installer: abstract error messages --- tools/install.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 446e7f416..884080c30 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -17,6 +17,10 @@ command_exists() { command -v "$@" >/dev/null 2>&1 } +error() { + echo "Error: $@" >&2 +} + # Set up color sequences setup_color() { if command_exists tput; then @@ -54,20 +58,18 @@ setup_ohmyzsh() { echo "${BLUE}Cloning Oh My Zsh...${NORMAL}" command_exists git || { - echo "Error: git is not installed" + error "git is not installed" exit 1 } if [ "$OSTYPE" = cygwin ] && git --version | grep -q msysgit; then - cat <<-EOF - Error: Windows/MSYS Git is not supported on Cygwin - Error: Make sure the Cygwin git package is installed and is first on the $PATH - EOF + error "Windows/MSYS Git is not supported on Cygwin" + error "Make sure the Cygwin git package is installed and is first on the \$PATH" exit 1 fi git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { - echo "Error: git clone of oh-my-zsh repo failed" + error "git clone of oh-my-zsh repo failed" exit 1 } } @@ -96,7 +98,7 @@ setup_shell() { if command_exists chsh; then echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" if ! chsh -s $(grep /zsh$ /etc/shells | tail -1); then - echo "Error: chsh command unsuccessful. Change your default shell manually." + error "chsh command unsuccessful. Change your default shell manually." fi # Else, suggest the user do so manually. else @@ -119,7 +121,7 @@ main() { if [ -d "$ZSH" ]; then cat <<-EOF ${YELLOW}You already have Oh My Zsh installed.${NORMAL} - You'll need to remove $ZSH if you want to reinstall. + You'll need to remove '$ZSH' if you want to reinstall. EOF exit 1 fi -- cgit v1.2.3-70-g09d2 From 73f29087f99e2e6630dcc5954db1240e8c885147 Mon Sep 17 00:00:00 2001 From: Luca S Date: Thu, 19 Jul 2018 22:12:45 +0200 Subject: 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. --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 884080c30..659cd9447 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -149,7 +149,7 @@ main() { EOF printf "$NORMAL" - env zsh -l + exec zsh -l } main -- cgit v1.2.3-70-g09d2 From 8e10ac4d7346ebd4c6cf2815b72fd82c1cf980a0 Mon Sep 17 00:00:00 2001 From: Raf Czlonka Date: Mon, 8 Oct 2018 21:50:03 +0100 Subject: 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 --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 659cd9447..7eea2e748 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -97,7 +97,7 @@ setup_shell() { # If this platform provides a "chsh" command (not Cygwin), do it, man! if command_exists chsh; then echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" - if ! chsh -s $(grep /zsh$ /etc/shells | tail -1); then + if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then error "chsh command unsuccessful. Change your default shell manually." fi # Else, suggest the user do so manually. -- cgit v1.2.3-70-g09d2 From 62216aaa8ff496cd1a086c70642b5fff9e7fa282 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 24 May 2019 16:17:09 +0200 Subject: 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. --- tools/install.sh | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 7eea2e748..4dc25b0e0 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -91,22 +91,23 @@ export ZSH=\"$ZSH\" } setup_shell() { - # If this user's login shell is not already "zsh", attempt to switch. - TEST_CURRENT_SHELL=$(basename "$SHELL") - if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then - # If this platform provides a "chsh" command (not Cygwin), do it, man! - if command_exists chsh; then - echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" - if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then - error "chsh command unsuccessful. Change your default shell manually." - fi - # Else, suggest the user do so manually. - else - cat <<-EOF - I can't change your shell automatically because this system does not have chsh. - ${BLUE}Please manually change your default shell to zsh${NORMAL} - EOF - fi + # If this user's login shell is already "zsh", do not attempt to switch. + if [ "$(basename "$SHELL")" = "zsh" ]; then + return + fi + + # If this platform doesn't provide a "chsh" command, bail out. + if ! command_exists chsh; then + cat <<-EOF + I can't change your shell automatically because this system does not have chsh. + ${BLUE}Please manually change your default shell to zsh${NORMAL} + EOF + return + fi + + echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" + if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then + error "chsh command unsuccessful. Change your default shell manually." fi } -- cgit v1.2.3-70-g09d2 From 9d2b3ce79f9f7eaf989eb4606c36f84ee8eb1cfb Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 24 May 2019 16:42:26 +0200 Subject: installer: fix for Solus OS and systems with no /etc/shells Co-authored-by: Fredrik Fornwall --- tools/install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 4dc25b0e0..8ec973832 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -106,7 +106,18 @@ setup_shell() { fi echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" - if ! chsh -s $(grep '^/.*/zsh$' /etc/shells | tail -1); then + + # Test for the right location of the "shells" file + if [ -f /etc/shells ]; then + shells_file=/etc/shells + elif [ -f /usr/share/defaults/etc/shells ]; then # Solus OS + shells_file=/usr/share/defaults/etc/shells + else + error "could not find /etc/shells file. Change your default shell manually." + return + fi + + if ! chsh -s $(grep '^/.*/zsh$' "$shells_file" | tail -1); then error "chsh command unsuccessful. Change your default shell manually." fi } -- cgit v1.2.3-70-g09d2 From a6a093ba2aed292f0610110c0e787aca57288319 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 24 May 2019 17:05:20 +0200 Subject: 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 --- tools/install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 8ec973832..f91e02954 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -117,7 +117,18 @@ setup_shell() { return fi - if ! chsh -s $(grep '^/.*/zsh$' "$shells_file" | tail -1); then + # Get the path to the right zsh binary + # 1. Use the most preceding one based on $PATH, then check that it's in the shells file + # 2. If that fails, get a zsh path from the shells file, then check it actually exists + if ! zsh=$(which zsh) || ! grep -qx "$zsh" "$shells_file"; then + if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -1) || [ ! -f "$zsh" ]; then + error "no available zsh binary found. Change your default shell manually." + return + fi + fi + + # Actually change the default shell to zsh + if ! chsh -s "$zsh"; then error "chsh command unsuccessful. Change your default shell manually." fi } -- cgit v1.2.3-70-g09d2 From aa27430e10b10aa1ff879722095696c66bed85ae Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 28 Feb 2015 01:46:10 -0500 Subject: 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. --- tools/install.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index f91e02954..0d5ad2633 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -5,13 +5,21 @@ # or wget: # sh -c "$(wget -qO- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # -# As an alternative, you can download the install script separately and -# run it afterwards with `sh install.sh' +# As an alternative, you can first download the install script and run it afterwards: +# wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh +# sh install.sh +# +# Respects these environment variables for tweaking the installation process: +# REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh) +# BRANCH - branch to check out immediately after install # set -e -# Default location +# Default settings ZSH=${ZSH:-~/.oh-my-zsh} +REPO=${REPO:-robbyrussell/oh-my-zsh} +BRANCH=${BRANCH:-master} + command_exists() { command -v "$@" >/dev/null 2>&1 @@ -68,7 +76,7 @@ setup_ohmyzsh() { exit 1 fi - git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git "$ZSH" || { + git clone --depth=1 --branch "$BRANCH" "https://github.com/$REPO.git" "$ZSH" || { error "git clone of oh-my-zsh repo failed" exit 1 } -- cgit v1.2.3-70-g09d2 From 220d69b2ce18fab70b874a848ee646fe02eaa0aa Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 26 May 2019 18:57:40 +0200 Subject: installer: allow configuration of remote URL to clone from --- tools/install.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 0d5ad2633..db23d9896 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -11,16 +11,17 @@ # # Respects these environment variables for tweaking the installation process: # REPO - name of the GitHub repo to install from (default: robbyrussell/oh-my-zsh) -# BRANCH - branch to check out immediately after install +# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS) +# BRANCH - branch to check out immediately after install (default: master) # set -e # Default settings ZSH=${ZSH:-~/.oh-my-zsh} REPO=${REPO:-robbyrussell/oh-my-zsh} +REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master} - command_exists() { command -v "$@" >/dev/null 2>&1 } @@ -76,7 +77,7 @@ setup_ohmyzsh() { exit 1 fi - git clone --depth=1 --branch "$BRANCH" "https://github.com/$REPO.git" "$ZSH" || { + git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || { error "git clone of oh-my-zsh repo failed" exit 1 } -- cgit v1.2.3-70-g09d2 From 153f5e11ed2f2cd50afe8804ecf1c2d6ef8e1f35 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Fri, 24 May 2019 19:58:09 +0200 Subject: 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 --- tools/install.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index db23d9896..e69ce4b83 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -27,7 +27,7 @@ command_exists() { } error() { - echo "Error: $@" >&2 + echo ${RED}"Error: $@"${RESET} >&2 } # Set up color sequences @@ -45,14 +45,14 @@ setup_color() { YELLOW="$(tput setaf 3)" BLUE="$(tput setaf 4)" BOLD="$(tput bold)" - NORMAL="$(tput sgr0)" + RESET="$(tput sgr0)" else - RED="" - GREEN="" - YELLOW="" - BLUE="" - BOLD="" - NORMAL="" + RED=$(printf '\033[31m') + GREEN=$(printf '\033[32m') + YELLOW=$(printf '\033[33m') + BLUE=$(printf '\033[34m') + BOLD=$(printf '\033[1m') + RESET=$(printf '\033[m') fi } @@ -64,7 +64,7 @@ setup_ohmyzsh() { # precedence over umasks except for filesystems mounted with option "noacl". umask g-w,o-w - echo "${BLUE}Cloning Oh My Zsh...${NORMAL}" + echo "${BLUE}Cloning Oh My Zsh...${RESET}" command_exists git || { error "git is not installed" @@ -84,13 +84,13 @@ setup_ohmyzsh() { } setup_zshrc() { - echo "${BLUE}Looking for an existing zsh config...${NORMAL}" + echo "${BLUE}Looking for an existing zsh config...${RESET}" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - echo "${YELLOW}Found ~/.zshrc.${GREEN} Backing up to ~/.zshrc.pre-oh-my-zsh.${NORMAL}" + echo "${YELLOW}Found ~/.zshrc.${GREEN} Backing up to ~/.zshrc.pre-oh-my-zsh.${RESET}" mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh fi - echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${NORMAL}" + echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${RESET}" cp "$ZSH/templates/zshrc.zsh-template" ~/.zshrc sed "/^export ZSH=/ c\\ @@ -109,12 +109,12 @@ setup_shell() { if ! command_exists chsh; then cat <<-EOF I can't change your shell automatically because this system does not have chsh. - ${BLUE}Please manually change your default shell to zsh${NORMAL} + ${BLUE}Please manually change your default shell to zsh${RESET} EOF return fi - echo "${BLUE}Time to change your default shell to zsh!${NORMAL}" + echo "${BLUE}Time to change your default shell to zsh!${RESET}" # Test for the right location of the "shells" file if [ -f /etc/shells ]; then @@ -146,13 +146,13 @@ main() { setup_color if ! command_exists zsh; then - echo "${YELLOW}Zsh is not installed.${NORMAL} Please install zsh first." + echo "${YELLOW}Zsh is not installed.${RESET} Please install zsh first." exit 1 fi if [ -d "$ZSH" ]; then cat <<-EOF - ${YELLOW}You already have Oh My Zsh installed.${NORMAL} + ${YELLOW}You already have Oh My Zsh installed.${RESET} You'll need to remove '$ZSH' if you want to reinstall. EOF exit 1 @@ -179,7 +179,7 @@ main() { p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh EOF - printf "$NORMAL" + printf "$RESET" exec zsh -l } -- cgit v1.2.3-70-g09d2 From 43b3126b5cd2253330edf73930d37f17eaf4328f Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Wed, 23 Sep 2015 18:41:48 -0400 Subject: installer: use timestamped backups to preserve all old zshrcs --- tools/install.sh | 22 ++++++++++++++++++++-- tools/uninstall.sh | 15 ++++++++------- 2 files changed, 28 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index e69ce4b83..66da05690 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -84,10 +84,28 @@ setup_ohmyzsh() { } setup_zshrc() { + # Keep most recent old .zshrc at .zshrc.pre-oh-my-zsh, and older ones + # with datestamp of installation that moved them aside, so we never actually + # destroy a user's original zshrc echo "${BLUE}Looking for an existing zsh config...${RESET}" + + # Must use this exact name so uninstall.sh can find it + OLD_ZSHRC=~/.zshrc.pre-oh-my-zsh if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - echo "${YELLOW}Found ~/.zshrc.${GREEN} Backing up to ~/.zshrc.pre-oh-my-zsh.${RESET}" - mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh + if [ -e "$OLD_ZSHRC" ]; then + OLD_OLD_ZSHRC="${OLD_ZSHRC}-$(date +%Y-%m-%d_%H-%M-%S)" + if [ -e "$OLD_OLD_ZSHRC" ]; then + error "$OLD_OLD_ZSHRC exists. Can't back up ${OLD_ZSHRC}" + error "re-run the installer again in a couple of seconds" + exit 1 + fi + mv "$OLD_ZSHRC" "${OLD_OLD_ZSHRC}" + + echo "${YELLOW}Found old ~/.zshrc.pre-oh-my-zsh." \ + "${GREEN}Backing up to ${OLD_OLD_ZSHRC}${RESET}" + fi + echo "${YELLOW}Found ~/.zshrc.${RESET} ${GREEN}Backing up to ${OLD_ZSHRC}${RESET}" + mv ~/.zshrc "$OLD_ZSHRC" fi echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${RESET}" diff --git a/tools/uninstall.sh b/tools/uninstall.sh index bf2244be8..9793be2a1 100644 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -10,16 +10,17 @@ if [ -d ~/.oh-my-zsh ]; then fi echo "Looking for original zsh config..." -if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]; then - echo "Found ~/.zshrc.pre-oh-my-zsh -- Restoring to ~/.zshrc"; +ZSHRC_ORIG=~/.zshrc.pre-oh-my-zsh +if [ -e "$ZSHRC_ORIG" ]; then + echo "Found $ZSHRC_ORIG -- Restoring to ~/.zshrc" - if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - ZSHRC_SAVE=".zshrc.omz-uninstalled-$(date +%Y%m%d%H%M%S)"; - echo "Found ~/.zshrc -- Renaming to ~/${ZSHRC_SAVE}"; - mv ~/.zshrc ~/"${ZSHRC_SAVE}"; + if [ -e ~/.zshrc ]; then + ZSHRC_SAVE=~/.zshrc.omz-uninstalled-$(date +%Y-%m-%d_%H-%M-%S) + echo "Found ~/.zshrc -- Renaming to ${ZSHRC_SAVE}" + mv ~/.zshrc "${ZSHRC_SAVE}" fi - mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc; + mv "$ZSHRC_ORIG" ~/.zshrc echo "Your original zsh config was restored. Please restart your session." else -- cgit v1.2.3-70-g09d2 From 794ff4a62daa57b985ea35a3d6dc879d771e53f0 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 27 May 2019 20:41:55 +0200 Subject: installer: add ability to skip the default shell change Co-authored-by: Marshall Ford Co-authored-by: Joel Kuzmarski --- tools/install.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 66da05690..b479dc803 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -10,9 +10,12 @@ # sh install.sh # # Respects these environment variables for tweaking the installation process: +# 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 - set to no tells the installer not to change the default shell (default: yes) # set -e @@ -22,6 +25,10 @@ REPO=${REPO:-robbyrussell/oh-my-zsh} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master} +# Other options +CHSH=${CHSH:-yes} + + command_exists() { command -v "$@" >/dev/null 2>&1 } @@ -118,6 +125,11 @@ export ZSH=\"$ZSH\" } setup_shell() { + # Skip setup if the user wants or stdin is closed (not running interactively). + if [ $CHSH = no ] || ! [ -t 0 ]; then + return + fi + # If this user's login shell is already "zsh", do not attempt to switch. if [ "$(basename "$SHELL")" = "zsh" ]; then return @@ -161,6 +173,14 @@ setup_shell() { } main() { + # Parse arguments + while [ $# -gt 0 ]; do + case $1 in + --skip-chsh) CHSH=no ;; + esac + shift + done + setup_color if ! command_exists zsh; then @@ -202,4 +222,4 @@ main() { exec zsh -l } -main +main "$@" -- cgit v1.2.3-70-g09d2 From a40d93295f91d1553522e58433e0ba2c4186d2b8 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 27 May 2019 22:21:39 +0200 Subject: installer: don't run zsh at the end Co-authored-by: Joel Kuzmarski --- tools/install.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index b479dc803..2d2936531 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -219,6 +219,11 @@ main() { EOF printf "$RESET" + if [ ! -t 0 ]; then + echo "${YELLOW}Run zsh to try it out.${RESET}" + exit + fi + exec zsh -l } -- cgit v1.2.3-70-g09d2 From 1cf42a506ff55d12c3246239332469d193bbf4b1 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 27 May 2019 22:58:33 +0200 Subject: installer: add option to not run zsh at the end Co-authored-by: Liquidsoul Co-authored-by: Alexander Polynomdivision Co-authored-by: loket Co-authored-by: Connor Demille --- tools/install.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 2d2936531..9eb83cfbd 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -15,7 +15,8 @@ # 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 - set to no tells the installer not to change the default shell (default: yes) +# 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) # set -e @@ -27,6 +28,7 @@ BRANCH=${BRANCH:-master} # Other options CHSH=${CHSH:-yes} +RUNZSH=${RUNZSH:-yes} command_exists() { @@ -126,7 +128,7 @@ export ZSH=\"$ZSH\" setup_shell() { # Skip setup if the user wants or stdin is closed (not running interactively). - if [ $CHSH = no ] || ! [ -t 0 ]; then + if [ $CHSH = no ]; then return fi @@ -173,9 +175,15 @@ setup_shell() { } main() { + if [ ! -t 0 ]; then + RUNZSH=no + CHSH=no + fi + # Parse arguments while [ $# -gt 0 ]; do case $1 in + --silent|--batch) RUNZSH=no; CHSH=no ;; --skip-chsh) CHSH=no ;; esac shift @@ -219,7 +227,7 @@ main() { EOF printf "$RESET" - if [ ! -t 0 ]; then + if [ $RUNZSH = no ]; then echo "${YELLOW}Run zsh to try it out.${RESET}" exit fi -- cgit v1.2.3-70-g09d2 From 065844fdc058360a66320f9d0e6a04fc12853a05 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 27 May 2019 22:58:58 +0200 Subject: installer: comment changes --- tools/install.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 9eb83cfbd..05b485333 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -9,7 +9,10 @@ # wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh # sh install.sh # -# Respects these environment variables for tweaking the installation process: +# 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) -- cgit v1.2.3-70-g09d2 From b931d6a9dbab9e507179ae405455e443102fcc28 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 28 May 2019 17:34:05 +0200 Subject: installer: change to --unattended argument and add docs --- tools/install.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 05b485333..8763b3513 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -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 -- cgit v1.2.3-70-g09d2 From 66d6d08841ebde3610eaee961f63f8420e914d3b Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Tue, 28 May 2019 18:34:58 +0200 Subject: installer: improve message formatting and color --- tools/install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 8763b3513..3f0e468fe 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -101,6 +101,8 @@ setup_ohmyzsh() { error "git clone of oh-my-zsh repo failed" exit 1 } + + echo } setup_zshrc() { @@ -128,13 +130,15 @@ setup_zshrc() { mv ~/.zshrc "$OLD_ZSHRC" fi - echo "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc.${RESET}" + echo "${GREEN}Using the Oh My Zsh template file and adding it to ~/.zshrc.${RESET}" cp "$ZSH/templates/zshrc.zsh-template" ~/.zshrc sed "/^export ZSH=/ c\\ export ZSH=\"$ZSH\" " ~/.zshrc > ~/.zshrc-omztemp mv -f ~/.zshrc-omztemp ~/.zshrc + + echo } setup_shell() { @@ -157,7 +161,7 @@ setup_shell() { return fi - echo "${BLUE}Time to change your default shell to zsh!${RESET}" + echo "${BLUE}Time to change your default shell to zsh:${RESET}" # Test for the right location of the "shells" file if [ -f /etc/shells ]; then @@ -174,7 +178,8 @@ setup_shell() { # 2. If that fails, get a zsh path from the shells file, then check it actually exists if ! zsh=$(which zsh) || ! grep -qx "$zsh" "$shells_file"; then if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -1) || [ ! -f "$zsh" ]; then - error "no available zsh binary found. Change your default shell manually." + error "no zsh binary found or not present in '$shells_file'" + error "change your default shell manually." return fi fi @@ -182,7 +187,12 @@ setup_shell() { # Actually change the default shell to zsh if ! chsh -s "$zsh"; then error "chsh command unsuccessful. Change your default shell manually." + else + export SHELL="$zsh" + echo "${GREEN}Shell successfully changed to '$zsh'.${RESET}" fi + + echo } main() { -- cgit v1.2.3-70-g09d2 From 2e54ba2dfb95890c6ea32323ae14486ffc1c46ed Mon Sep 17 00:00:00 2001 From: Zach Whitten Date: Fri, 13 Oct 2017 14:33:22 -0400 Subject: installer: restore previous default shell with uninstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Antonio QUINTAVALLE Co-authored-by: Marc Cornellà --- tools/install.sh | 7 +++++++ tools/uninstall.sh | 21 +++++++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 3f0e468fe..15c7b7703 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -184,6 +184,13 @@ setup_shell() { fi fi + # We're going to change the default shell, so back up the current one + if [ -n $SHELL ]; then + echo $SHELL > ~/.shell.pre-oh-my-zsh + else + grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh + fi + # Actually change the default shell to zsh if ! chsh -s "$zsh"; then error "chsh command unsuccessful. Change your default shell manually." diff --git a/tools/uninstall.sh b/tools/uninstall.sh index 9793be2a1..da31a6a14 100644 --- a/tools/uninstall.sh +++ b/tools/uninstall.sh @@ -22,14 +22,23 @@ if [ -e "$ZSHRC_ORIG" ]; then mv "$ZSHRC_ORIG" ~/.zshrc - echo "Your original zsh config was restored. Please restart your session." -else - if hash chsh >/dev/null 2>&1; then - echo "Switching back to bash" - chsh -s /bin/bash + echo "Your original zsh config was restored." +fi + +if hash chsh >/dev/null 2>&1; then + if [ -f ~/.shell.pre-oh-my-zsh ]; then + old_shell=$(cat ~/.shell.pre-oh-my-zsh) + else + old_shell=/bin/bash + fi + echo "Switching your shell back to '$old_shell':" + if chsh -s "$old_shell"; then + rm -f ~/.shell.pre-oh-my-zsh else - echo "You can edit /etc/passwd to switch your default shell back to bash" + echo "Could not change default shell. Change it manually by running chsh" + echo "or editing the /etc/passwd file." fi fi echo "Thanks for trying out Oh My Zsh. It's been uninstalled." +echo "Don't forget to restart your terminal!" -- cgit v1.2.3-70-g09d2 From 0824dcc9fbd66171f53c38c8327598ec469ebe85 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 1 Jun 2019 19:26:17 +0200 Subject: installer: allow for tput errors tput may throw errors on invalid $TERM values, for example. This shorthand syntax allows for that as well as for if tput doesn't exist. --- tools/install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 15c7b7703..a515bac48 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -52,11 +52,7 @@ error() { # Set up color sequences setup_color() { - if command_exists tput; then - ncolors=$(tput colors) - else - ncolors=0 - fi + ncolors=$(tput colors 2>/dev/null) || ncolors=0 # Only use colors if connected to a terminal that supports them if [ -t 1 ] && [ $ncolors -ge 8 ]; then -- cgit v1.2.3-70-g09d2 From b944fee6ea0b5616e8bff95206c3ce57d268625f Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 1 Jun 2019 21:12:08 +0200 Subject: installer: ask user about changing the shell to zsh --- tools/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index a515bac48..d56d8addc 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -159,6 +159,15 @@ setup_shell() { echo "${BLUE}Time to change your default shell to zsh:${RESET}" + # Prompt for user choice on changing the default login shell + printf "${YELLOW}Do you want to change your default shell to zsh? [Y/n]${RESET} " + read opt + case $opt in + y*|Y*|"") echo "Changing the shell..." ;; + n*|N*) echo "Shell change skipped."; return ;; + *) echo "Invalid choice. Shell change skipped."; return ;; + esac + # Test for the right location of the "shells" file if [ -f /etc/shells ]; then shells_file=/etc/shells -- cgit v1.2.3-70-g09d2 From 702a594df3b49f40496e4840cae2d93c83d5bc4d Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 9 Jun 2019 00:12:09 +0200 Subject: installer: don't rely on tput for coloring tput is error-prone and may not be needed, since all the formatting codes used are standard across all types of terminals. --- tools/install.sh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index d56d8addc..17b70bfea 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -50,25 +50,22 @@ error() { echo ${RED}"Error: $@"${RESET} >&2 } -# Set up color sequences setup_color() { - ncolors=$(tput colors 2>/dev/null) || ncolors=0 - - # Only use colors if connected to a terminal that supports them - if [ -t 1 ] && [ $ncolors -ge 8 ]; then - RED="$(tput setaf 1)" - GREEN="$(tput setaf 2)" - YELLOW="$(tput setaf 3)" - BLUE="$(tput setaf 4)" - BOLD="$(tput bold)" - RESET="$(tput sgr0)" - else + # Only use colors if connected to a terminal + if [ -t 1 ]; then RED=$(printf '\033[31m') GREEN=$(printf '\033[32m') YELLOW=$(printf '\033[33m') BLUE=$(printf '\033[34m') BOLD=$(printf '\033[1m') RESET=$(printf '\033[m') + else + RED="" + GREEN="" + YELLOW="" + BLUE="" + BOLD="" + RESET="" fi } -- cgit v1.2.3-70-g09d2 From fd4571d1b02ac68833a5b5c166395434723b9128 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 8 Sep 2019 20:45:06 +0200 Subject: installer: allow chsh to work in termux --- tools/install.sh | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 17b70bfea..61010214e 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -165,29 +165,37 @@ setup_shell() { *) echo "Invalid choice. Shell change skipped."; return ;; esac - # Test for the right location of the "shells" file - if [ -f /etc/shells ]; then - shells_file=/etc/shells - elif [ -f /usr/share/defaults/etc/shells ]; then # Solus OS - shells_file=/usr/share/defaults/etc/shells - else - error "could not find /etc/shells file. Change your default shell manually." - return - fi + # Check if we're running on Termux + case "$PREFIX" in + *com.termux*) termux=true; zsh=zsh ;; + *) termux=false ;; + esac - # Get the path to the right zsh binary - # 1. Use the most preceding one based on $PATH, then check that it's in the shells file - # 2. If that fails, get a zsh path from the shells file, then check it actually exists - if ! zsh=$(which zsh) || ! grep -qx "$zsh" "$shells_file"; then - if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -1) || [ ! -f "$zsh" ]; then - error "no zsh binary found or not present in '$shells_file'" - error "change your default shell manually." + if [ "$termux" != true ]; then + # Test for the right location of the "shells" file + if [ -f /etc/shells ]; then + shells_file=/etc/shells + elif [ -f /usr/share/defaults/etc/shells ]; then # Solus OS + shells_file=/usr/share/defaults/etc/shells + else + error "could not find /etc/shells file. Change your default shell manually." return fi + + # Get the path to the right zsh binary + # 1. Use the most preceding one based on $PATH, then check that it's in the shells file + # 2. If that fails, get a zsh path from the shells file, then check it actually exists + if ! zsh=$(which zsh) || ! grep -qx "$zsh" "$shells_file"; then + if ! zsh=$(grep '^/.*/zsh$' "$shells_file" | tail -1) || [ ! -f "$zsh" ]; then + error "no zsh binary found or not present in '$shells_file'" + error "change your default shell manually." + return + fi + fi fi # We're going to change the default shell, so back up the current one - if [ -n $SHELL ]; then + if [ -n "$SHELL" ]; then echo $SHELL > ~/.shell.pre-oh-my-zsh else grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh -- cgit v1.2.3-70-g09d2 From 534ec60bfd14ee640076c7594ee4fa723fafd1b1 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 21 Oct 2019 16:42:06 +0200 Subject: Set default git-config values known to fix repository issues - core.autocrlf=false -> #4069 - fsck.zeroPaddedFilemode -> #4963 Fixes #4069 Fixes #4963 --- tools/install.sh | 6 +++++- tools/upgrade.sh | 12 +++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/install.sh b/tools/install.sh index 61010214e..a5a90e6f6 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -90,7 +90,11 @@ setup_ohmyzsh() { exit 1 fi - git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || { + git clone -c core.eol=lf -c core.autocrlf=false \ + -c fsck.zeroPaddedFilemode=ignore \ + -c fetch.fsck.zeroPaddedFilemode=ignore \ + -c receive.fsck.zeroPaddedFilemode=ignore \ + --depth=1 --branch "$BRANCH" "$REMOTE" "$ZSH" || { error "git clone of oh-my-zsh repo failed" exit 1 } diff --git a/tools/upgrade.sh b/tools/upgrade.sh index d234c7f88..0dd855b70 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -20,8 +20,18 @@ else NORMAL="" fi -printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh" cd "$ZSH" + +# Set git-config values known to fix git errors +# Line endings (#4069) +git config core.eol lf +git config core.autocrlf false +# zeroPaddedFilemode fsck errors (#4963) +git config fsck.zeroPaddedFilemode ignore +git config fetch.fsck.zeroPaddedFilemode ignore +git config receive.fsck.zeroPaddedFilemode ignore + +printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh" if git pull --rebase --stat origin master then printf '%s' "$GREEN" -- cgit v1.2.3-70-g09d2