diff --git a/zsh/.oh-my-zsh/.gitignore b/zsh/.oh-my-zsh/.gitignore index 87a79cd..251c9dc 100644 --- a/zsh/.oh-my-zsh/.gitignore +++ b/zsh/.oh-my-zsh/.gitignore @@ -4,3 +4,4 @@ custom/ # temp files directories cache/ log/ +*.swp diff --git a/zsh/.oh-my-zsh/CONTRIBUTING.md b/zsh/.oh-my-zsh/CONTRIBUTING.md index f575157..be67e93 100644 --- a/zsh/.oh-my-zsh/CONTRIBUTING.md +++ b/zsh/.oh-my-zsh/CONTRIBUTING.md @@ -31,7 +31,7 @@ your problem. If you find one, comment on it so we can know there are more people experiencing it. -If not, look at the [Troubleshooting](https://github.com/robbyrussell/oh-my-zsh/wiki/Troubleshooting) +If not, look at the [Troubleshooting](https://github.com/ohmyzsh/ohmyzsh/wiki/Troubleshooting) page for instructions on how to gather data to better debug your problem. Then, you can go ahead and create an issue with as much detail as you can provide. @@ -62,7 +62,7 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa You should be familiar with the basics of [contributing on GitHub](https://help.github.com/articles/using-pull-requests) and have a fork -[properly set up](https://github.com/robbyrussell/oh-my-zsh/wiki/Contribution-Technical-Practices). +[properly set up](https://github.com/ohmyzsh/ohmyzsh/wiki/Contribution-Technical-Practices). You MUST always create PRs with _a dedicated branch_ based on the latest upstream tree. @@ -85,7 +85,7 @@ maintainers) by mentioning their GitHub handle (starting with `@`) in your messa ### You have an addition -Please [do not](https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#dont-send-us-your-theme-for-now) +Please [do not](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#dont-send-us-your-theme-for-now) send themes for now. Please be so kind as to [search](#use-the-search-luke) for any pending, merged or rejected Pull Requests @@ -109,7 +109,7 @@ to help you check whether a similar contribution to yours already exists. Please before making any contribution, it avoids duplicates and eases maintenance. Trust me, that works 90% of the time. -You can also take a look at the [FAQ](https://github.com/robbyrussell/oh-my-zsh/wiki/FAQ) +You can also take a look at the [FAQ](https://github.com/ohmyzsh/ohmyzsh/wiki/FAQ) to be sure your contribution has not already come up. If all fails, your thing has probably not been reported yet, so you can go ahead @@ -121,5 +121,5 @@ and [create an issue](#reporting-issues) or [submit a PR](#submitting-pull-reque Very nice!! :) -Please have a look at the [Volunteer](https://github.com/robbyrussell/oh-my-zsh/wiki/Volunteers) +Please have a look at the [Volunteer](https://github.com/ohmyzsh/ohmyzsh/wiki/Volunteers) page for instructions on where to start and more. diff --git a/zsh/.oh-my-zsh/LICENSE.txt b/zsh/.oh-my-zsh/LICENSE.txt index eb9978a..7431907 100644 --- a/zsh/.oh-my-zsh/LICENSE.txt +++ b/zsh/.oh-my-zsh/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2009-2019 Robby Russell and contributors (https://github.com/robbyrussell/oh-my-zsh/contributors) +Copyright (c) 2009-2019 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/zsh/.oh-my-zsh/README.md b/zsh/.oh-my-zsh/README.md index 2f23feb..ac4b387 100644 --- a/zsh/.oh-my-zsh/README.md +++ b/zsh/.oh-my-zsh/README.md @@ -2,6 +2,9 @@ Oh My Zsh

+[![Discord server](https://img.shields.io/discord/642496866407284746)](https://discord.gg/bpXWhnN) +[![Follow @ohmyzsh](https://img.shields.io/twitter/follow/ohmyzsh?label=Follow+@ohmyzsh&style=flat)](https://twitter.com/intent/follow?screen_name=ohmyzsh) + Oh My Zsh is an open source, community-driven framework for managing your [zsh](https://www.zsh.org/) configuration. Sounds boring. Let's try again. @@ -19,7 +22,7 @@ To learn more, visit [ohmyz.sh](https://ohmyz.sh) and follow [@ohmyzsh](https:// ### Prerequisites * A Unix-like operating system: macOS, Linux, BSD. On Windows: WSL is preferred, but cygwin or msys also mostly work. -* [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (run `zsh --version` to confirm), check the following instructions here: [Installing ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) +* [Zsh](https://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (run `zsh --version` to confirm), check the following instructions here: [Installing ZSH](https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH) * `curl` or `wget` should be installed * `git` should be installed @@ -30,13 +33,13 @@ Oh My Zsh is installed by running one of the following commands in your terminal #### via curl ```shell -sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ``` #### via wget ```shell -sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ``` #### Manual inspection @@ -46,7 +49,7 @@ that by downloading the install script first, looking through it so everything l then running it: ```shell -curl -Lo install.sh https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh +curl -Lo install.sh https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh sh install.sh ``` @@ -54,7 +57,7 @@ sh install.sh ### Plugins -Oh My Zsh comes with a shitload of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available. +Oh My Zsh comes with a shitload of plugins to take advantage of. You can take a look in the [plugins](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins) directory and/or the [wiki](https://github.com/ohmyzsh/ohmyzsh/wiki/Plugins) to see what's currently available. #### Enabling Plugins @@ -86,7 +89,7 @@ Most plugins (should! we're working on this) include a __README__, which documen ### Themes -We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://github.com/robbyrussell/oh-my-zsh/wiki/Themes) on the wiki. Check them out! +We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes) on the wiki. Check them out! #### Selecting a Theme @@ -102,7 +105,7 @@ To use a different theme, simply change the value to match the name of your desi ```shell ZSH_THEME="agnoster" # (this is one of the fancy ones) -# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster +# see https://github.com/ohmyzsh/ohmyzsh/wiki/Themes#agnoster ``` _Note: many themes require installing the [Powerline Fonts](https://github.com/powerline/fonts) in order to render properly._ @@ -111,7 +114,7 @@ Open up a new terminal window and your prompt should look something like this: ![Agnoster theme](https://cloud.githubusercontent.com/assets/2618447/6316862/70f58fb6-ba03-11e4-82c9-c083bf9a6574.png) -In case you did not find a suitable theme for your needs, please have a look at the wiki for [more of them](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes). +In case you did not find a suitable theme for your needs, please have a look at the wiki for [more of them](https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes). If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window. @@ -157,14 +160,14 @@ flag `--unattended` to the `install.sh` script. This will have the effect of not the default shell, and also won't run `zsh` when the installation has finished. ```shell -sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended ``` #### Installing from a forked repository The install script also accepts these variables to allow installation of a different repository: -- `REPO` (default: `robbyrussell/oh-my-zsh`): this takes the form of `owner/repository`. If you set +- `REPO` (default: `ohmyzsh/ohmyzsh`): this takes the form of `owner/repository`. If you set this variable, the installer will look for a repository at `https://github.com/{owner}/{repository}`. - `REMOTE` (default: `https://github.com/${REPO}.git`): this is the full URL of the git repository @@ -188,7 +191,7 @@ REPO=apjanke/oh-my-zsh BRANCH=edge sh install.sh ##### 1. Clone the repository: ```shell -git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh +git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh ``` ##### 2. *Optionally*, backup your existing `~/.zshrc` file: @@ -270,13 +273,13 @@ Before you participate in our delightful community, please read the [code of con I'm far from being a [Zsh](https://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! -We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can. +We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/ohmyzsh/ohmyzsh/issues) and help where you can. See [Contributing](CONTRIBUTING.md) for more details. ### Do NOT send us themes -We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page. +We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes) wiki page. ## Contributors diff --git a/zsh/.oh-my-zsh/lib/termsupport.zsh b/zsh/.oh-my-zsh/lib/termsupport.zsh index aa14f3f..f5e367f 100644 --- a/zsh/.oh-my-zsh/lib/termsupport.zsh +++ b/zsh/.oh-my-zsh/lib/termsupport.zsh @@ -75,8 +75,9 @@ function omz_termsupport_preexec { title '$CMD' '%100>...>$LINE%<<' } -precmd_functions+=(omz_termsupport_precmd) -preexec_functions+=(omz_termsupport_preexec) +autoload -U add-zsh-hook +add-zsh-hook precmd omz_termsupport_precmd +add-zsh-hook preexec omz_termsupport_preexec # Keep Apple Terminal.app's current working directory updated @@ -99,7 +100,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then } # Use a precmd hook instead of a chpwd hook to avoid contaminating output - precmd_functions+=(update_terminalapp_cwd) + add-zsh-hook precmd update_terminalapp_cwd # Run once to get initial cwd set update_terminalapp_cwd fi diff --git a/zsh/.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh b/zsh/.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh index 6b8fa66..caee9b5 100644 --- a/zsh/.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/alias-finder/alias-finder.plugin.zsh @@ -4,7 +4,7 @@ alias-finder() { case $i in -e|--exact) exact=true;; -l|--longer) longer=true;; - *) + *) if [[ -z $cmd ]]; then cmd=$i else @@ -43,4 +43,5 @@ preexec_alias-finder() { fi } -preexec_functions+=(preexec_alias-finder) +autoload -U add-zsh-hook +add-zsh-hook preexec preexec_alias-finder diff --git a/zsh/.oh-my-zsh/plugins/bundler/README.md b/zsh/.oh-my-zsh/plugins/bundler/README.md index a7d40cd..9f211b0 100644 --- a/zsh/.oh-my-zsh/plugins/bundler/README.md +++ b/zsh/.oh-my-zsh/plugins/bundler/README.md @@ -42,7 +42,7 @@ This will exclude the `foreman` and `spin` gems (i.e. their executable) from bei ## Excluded gems -These gems should not be called with `bundle exec`. Please see [issue #2923](https://github.com/robbyrussell/oh-my-zsh/pull/2923) on GitHub for clarification. +These gems should not be called with `bundle exec`. Please see [issue #2923](https://github.com/ohmyzsh/ohmyzsh/pull/2923) on GitHub for clarification. `berks` `foreman` diff --git a/zsh/.oh-my-zsh/plugins/catimg/README.md b/zsh/.oh-my-zsh/plugins/catimg/README.md index 2fc28a1..42b59a6 100644 --- a/zsh/.oh-my-zsh/plugins/catimg/README.md +++ b/zsh/.oh-my-zsh/plugins/catimg/README.md @@ -17,10 +17,10 @@ Plugin for displaying images on the terminal using the the `catimg.sh` script pr ) ``` -2. Reload the source file or restart your Terminal session: +2. Restart the shell or restart your Terminal session: ```console - $ source ~/.zshrc + $ exec zsh $ ``` diff --git a/zsh/.oh-my-zsh/plugins/colorize/README.md b/zsh/.oh-my-zsh/plugins/colorize/README.md index d1f878e..32dc97b 100644 --- a/zsh/.oh-my-zsh/plugins/colorize/README.md +++ b/zsh/.oh-my-zsh/plugins/colorize/README.md @@ -32,4 +32,4 @@ In the latter form, the file contents will be concatenated and presented by less ## Requirements -You have to install Pygments first: [pygments.org](http://pygments.org/download/) +You have to install Pygments first: [pygments.org](http://pygments.org/download.html) diff --git a/zsh/.oh-my-zsh/plugins/dircycle/README.md b/zsh/.oh-my-zsh/plugins/dircycle/README.md index 3ac162f..3c9b3a9 100644 --- a/zsh/.oh-my-zsh/plugins/dircycle/README.md +++ b/zsh/.oh-my-zsh/plugins/dircycle/README.md @@ -15,10 +15,10 @@ This plugin enables directory navigation similar to using back and forward on br ) ``` -2. Reload the source file or restart your Terminal session: +2. Restart the shell or restart your Terminal session: ```console - $ source ~/.zshrc + $ exec zsh $ ``` diff --git a/zsh/.oh-my-zsh/plugins/dirhistory/dirhistory.plugin.zsh b/zsh/.oh-my-zsh/plugins/dirhistory/dirhistory.plugin.zsh index 239915e..35c43d7 100644 --- a/zsh/.oh-my-zsh/plugins/dirhistory/dirhistory.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/dirhistory/dirhistory.plugin.zsh @@ -53,7 +53,8 @@ function push_future() { } # Called by zsh when directory changes -chpwd_functions+=(chpwd_dirhistory) +autoload -U add-zsh-hook +add-zsh-hook chpwd chpwd_dirhistory function chpwd_dirhistory() { push_past $PWD # If DIRHISTORY_CD is not set... diff --git a/zsh/.oh-my-zsh/plugins/dirpersist/dirpersist.plugin.zsh b/zsh/.oh-my-zsh/plugins/dirpersist/dirpersist.plugin.zsh index 616e2c3..daadc38 100644 --- a/zsh/.oh-my-zsh/plugins/dirpersist/dirpersist.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/dirpersist/dirpersist.plugin.zsh @@ -11,7 +11,8 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD fi -chpwd_functions+=(chpwd_dirpersist) +autoload -U add-zsh-hook +add-zsh-hook chpwd chpwd_dirpersist chpwd_dirpersist() { if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi local -ax my_stack diff --git a/zsh/.oh-my-zsh/plugins/django/django.plugin.zsh b/zsh/.oh-my-zsh/plugins/django/django.plugin.zsh index 86558ff..c2d00c1 100644 --- a/zsh/.oh-my-zsh/plugins/django/django.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/django/django.plugin.zsh @@ -374,7 +374,8 @@ _managepy-commands() { _applist() { local line local -a apps - _call_program help-command "python -c \"import os.path as op, re, django.conf, sys;\\ + _call_program help-command "python -c \"import sys; del sys.path[0];\\ + import os.path as op, re, django.conf;\\ bn=op.basename(op.abspath(op.curdir));[sys\\ .stdout.write(str(re.sub(r'^%s\.(.*?)$' % bn, r'\1', i)) + '\n') for i in django.conf.settings.\\ diff --git a/zsh/.oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh b/zsh/.oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh index 0a55528..bdd606f 100644 --- a/zsh/.oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/emoji-clock/emoji-clock.plugin.zsh @@ -2,7 +2,7 @@ # FILE: emoji-clock.plugin.zsh # DESCRIPTION: The current time with half hour accuracy as an emoji symbol. # Inspired by Andre Torrez' "Put A Burger In Your Shell" -# http://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html +# https://notes.torrez.org/2013/04/put-a-burger-in-your-shell.html # AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) # VERSION: 1.0.0 # ----------------------------------------------------------------------------- diff --git a/zsh/.oh-my-zsh/plugins/emotty/README.md b/zsh/.oh-my-zsh/plugins/emotty/README.md index 2cfbe12..ee57170 100644 --- a/zsh/.oh-my-zsh/plugins/emotty/README.md +++ b/zsh/.oh-my-zsh/plugins/emotty/README.md @@ -8,7 +8,7 @@ To use it, add emotty to the plugins array in your zshrc file: plugins=(... emotty) ``` -**NOTE:** it requires the [emoji plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/emoji). +**NOTE:** it requires the [emoji plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/emoji). ## Usage diff --git a/zsh/.oh-my-zsh/plugins/encode64/README.md b/zsh/.oh-my-zsh/plugins/encode64/README.md index 9850da8..66fc7cb 100644 --- a/zsh/.oh-my-zsh/plugins/encode64/README.md +++ b/zsh/.oh-my-zsh/plugins/encode64/README.md @@ -20,10 +20,10 @@ Alias plugin for encoding or decoding using `base64` command ) ``` -2. Restart your terminal session or reload configuration by running: +2. Restart your terminal session or restart the shell: ```sh - source ~/.zshrc + exec zsh ``` ## Usage and examples diff --git a/zsh/.oh-my-zsh/plugins/extract/README.md b/zsh/.oh-my-zsh/plugins/extract/README.md index 83b878c..41b6a61 100644 --- a/zsh/.oh-my-zsh/plugins/extract/README.md +++ b/zsh/.oh-my-zsh/plugins/extract/README.md @@ -27,6 +27,7 @@ plugins=(... extract) | `jar` | Java Archive | | `lzma` | LZMA archive | | `rar` | WinRAR archive | +| `rpm` | RPM package | | `sublime-package` | Sublime Text package | | `tar` | Tarball | | `tar.bz2` | Tarball with bzip2 compression | diff --git a/zsh/.oh-my-zsh/plugins/extract/_extract b/zsh/.oh-my-zsh/plugins/extract/_extract index 33d49fc..0257ce2 100644 --- a/zsh/.oh-my-zsh/plugins/extract/_extract +++ b/zsh/.oh-my-zsh/plugins/extract/_extract @@ -3,5 +3,5 @@ _arguments \ '(-r --remove)'{-r,--remove}'[Remove archive.]' \ - "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \ + "*::archive file:_files -g '(#i)*.(7z|Z|apk|aar|bz2|deb|gz|ipsw|jar|lzma|rar|rpm|sublime-package|tar|tar.bz2|tar.gz|tar.xz|tar.zma|tbz|tbz2|tgz|tlz|txz|war|whl|xpi|xz|zip)(-.)'" \ && return 0 diff --git a/zsh/.oh-my-zsh/plugins/extract/extract.plugin.zsh b/zsh/.oh-my-zsh/plugins/extract/extract.plugin.zsh index 5e9b9ff..27b9e50 100644 --- a/zsh/.oh-my-zsh/plugins/extract/extract.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/extract/extract.plugin.zsh @@ -41,13 +41,14 @@ extract() { && tar --lzma -xvf "$1" \ || lzcat "$1" | tar xvf - ;; (*.tar) tar xvf "$1" ;; - (*.gz) (( $+commands[pigz] )) && pigz -d "$1" || gunzip "$1" ;; + (*.gz) (( $+commands[pigz] )) && pigz -dk "$1" || gunzip -k "$1" ;; (*.bz2) bunzip2 "$1" ;; (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.z) uncompress "$1" ;; (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; + (*.rpm) mkdir "$extract_dir" && cd "$extract_dir" && rpm2cpio "../$1" | cpio --quiet -id && cd .. ;; (*.7z) 7za x "$1" ;; (*.deb) mkdir -p "$extract_dir/control" diff --git a/zsh/.oh-my-zsh/plugins/fedora/README.md b/zsh/.oh-my-zsh/plugins/fedora/README.md index 6594799..85d8d7d 100644 --- a/zsh/.oh-my-zsh/plugins/fedora/README.md +++ b/zsh/.oh-my-zsh/plugins/fedora/README.md @@ -1 +1 @@ -The fedora plugin is deprecated. Use the [dnf plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/dnf) instead. +The fedora plugin is deprecated. Use the [dnf plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/dnf) instead. diff --git a/zsh/.oh-my-zsh/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh b/zsh/.oh-my-zsh/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh index 56ab86d..5c42c21 100644 --- a/zsh/.oh-my-zsh/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh @@ -1,16 +1,17 @@ GIT_AUTO_FETCH_INTERVAL=${GIT_AUTO_FETCH_INTERVAL:=60} function git-fetch-all { - (`git rev-parse --is-inside-work-tree 2>/dev/null` && - dir=`git rev-parse --git-dir` && + (`command git rev-parse --is-inside-work-tree 2>/dev/null` && + dir=`command git rev-parse --git-dir` && [[ ! -f $dir/NO_AUTO_FETCH ]] && (( `date +%s` - `date -r $dir/FETCH_LOG +%s 2>/dev/null || echo 0` > $GIT_AUTO_FETCH_INTERVAL )) && - git fetch --all 2>/dev/null &>! $dir/FETCH_LOG &) + GIT_SSH_COMMAND="command ssh -o BatchMode=yes" \ + command git fetch --all 2>/dev/null &>! $dir/FETCH_LOG &) } function git-auto-fetch { - `git rev-parse --is-inside-work-tree 2>/dev/null` || return - guard="`git rev-parse --git-dir`/NO_AUTO_FETCH" + `command git rev-parse --is-inside-work-tree 2>/dev/null` || return + guard="`command git rev-parse --git-dir`/NO_AUTO_FETCH" (rm $guard 2>/dev/null && echo "${fg_bold[green]}enabled${reset_color}") || diff --git a/zsh/.oh-my-zsh/plugins/git-prompt/git-prompt.plugin.zsh b/zsh/.oh-my-zsh/plugins/git-prompt/git-prompt.plugin.zsh index 76ac2e6..da674af 100644 --- a/zsh/.oh-my-zsh/plugins/git-prompt/git-prompt.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/git-prompt/git-prompt.plugin.zsh @@ -20,9 +20,10 @@ function precmd_update_git_vars() { fi } -chpwd_functions+=(chpwd_update_git_vars) -precmd_functions+=(precmd_update_git_vars) -preexec_functions+=(preexec_update_git_vars) +autoload -U add-zsh-hook +add-zsh-hook chpwd chpwd_update_git_vars +add-zsh-hook precmd precmd_update_git_vars +add-zsh-hook preexec preexec_update_git_vars ## Function definitions diff --git a/zsh/.oh-my-zsh/plugins/gitfast/README.md b/zsh/.oh-my-zsh/plugins/gitfast/README.md index 84e35d7..23db539 100644 --- a/zsh/.oh-my-zsh/plugins/gitfast/README.md +++ b/zsh/.oh-my-zsh/plugins/gitfast/README.md @@ -11,5 +11,5 @@ plugins=(... gitfast) ## Aliases An earlier version of the plugin also loaded the git plugin. If you want to keep those -aliases enable the [git plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/git) +aliases enable the [git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git) as well. diff --git a/zsh/.oh-my-zsh/plugins/go/README.md b/zsh/.oh-my-zsh/plugins/go/README.md index 6ce6f4e..bf43b9f 100644 --- a/zsh/.oh-my-zsh/plugins/go/README.md +++ b/zsh/.oh-my-zsh/plugins/go/README.md @@ -1 +1 @@ -The go plugin is deprecated. Use the [golang plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/golang) instead. +The go plugin is deprecated. Use the [golang plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/golang) instead. diff --git a/zsh/.oh-my-zsh/plugins/history-substring-search/README.md b/zsh/.oh-my-zsh/plugins/history-substring-search/README.md index 7fb0fa0..0ffb213 100644 --- a/zsh/.oh-my-zsh/plugins/history-substring-search/README.md +++ b/zsh/.oh-my-zsh/plugins/history-substring-search/README.md @@ -9,7 +9,7 @@ You can also use K and J in VI mode or ^P and ^N in EMACS mode for the same. [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 +[4]: https://github.com/ohmyzsh/ohmyzsh/pull/215 [5]: https://github.com/zsh-users/zsh-history-substring-search [6]: https://github.com/zsh-users/zsh-syntax-highlighting diff --git a/zsh/.oh-my-zsh/plugins/jenv/jenv.plugin.zsh b/zsh/.oh-my-zsh/plugins/jenv/jenv.plugin.zsh index 2eda803..b85906a 100644 --- a/zsh/.oh-my-zsh/plugins/jenv/jenv.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/jenv/jenv.plugin.zsh @@ -15,7 +15,7 @@ if [[ $FOUND_JENV -eq 0 ]]; then fi if [[ $FOUND_JENV -eq 1 ]]; then - export PATH="${jenvdir}/bin:$PATH" + (( $+commands[jenv] )) || export PATH="${jenvdir}/bin:$PATH" eval "$(jenv init - zsh)" function jenv_prompt_info() { jenv version-name 2>/dev/null } diff --git a/zsh/.oh-my-zsh/plugins/jsontools/jsontools.plugin.zsh b/zsh/.oh-my-zsh/plugins/jsontools/jsontools.plugin.zsh index 20d5eb1..912c835 100644 --- a/zsh/.oh-my-zsh/plugins/jsontools/jsontools.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/jsontools/jsontools.plugin.zsh @@ -11,9 +11,10 @@ if [[ $(whence node) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METH alias urlencode_json='xargs -0 node -e "console.log(encodeURIComponent(process.argv[1]))"' alias urldecode_json='xargs -0 node -e "console.log(decodeURIComponent(process.argv[1]))"' elif [[ $(whence python) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xpython" ) ]]; then - alias pp_json='python -mjson.tool' + alias pp_json='python -c "import sys; del sys.path[0]; import runpy; runpy._run_module_as_main(\"json.tool\")"' alias is_json='python -c " -import json, sys; +import sys; del sys.path[0]; +import json; try: json.loads(sys.stdin.read()) except ValueError, e: @@ -22,11 +23,13 @@ else: print True sys.exit(0)"' alias urlencode_json='python -c " -import urllib, json, sys; +import sys; del sys.path[0]; +import urllib, json; print urllib.quote_plus(sys.stdin.read()) sys.exit(0)"' alias urldecode_json='python -c " -import urllib, json, sys; +import sys; del sys.path[0]; +import urllib, json; print urllib.unquote_plus(sys.stdin.read()) sys.exit(0)"' elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_METHOD" = "xruby" ) ]]; then @@ -36,4 +39,4 @@ elif [[ $(whence ruby) != "" && ( "x$JSONTOOLS_METHOD" = "x" || "x$JSONTOOLS_MET alias urldecode_json='ruby -e "require \"uri\"; puts URI.unescape(STDIN.read)"' fi -unset JSONTOOLS_METHOD \ No newline at end of file +unset JSONTOOLS_METHOD diff --git a/zsh/.oh-my-zsh/plugins/last-working-dir/last-working-dir.plugin.zsh b/zsh/.oh-my-zsh/plugins/last-working-dir/last-working-dir.plugin.zsh index 53bb19e..fd21705 100644 --- a/zsh/.oh-my-zsh/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -2,7 +2,8 @@ typeset -g ZSH_LAST_WORKING_DIRECTORY # Updates the last directory once directory is changed -chpwd_functions+=(chpwd_last_working_dir) +autoload -U add-zsh-hook +add-zsh-hook chpwd chpwd_last_working_dir chpwd_last_working_dir() { if [ "$ZSH_SUBSHELL" = 0 ]; then local cache_file="$ZSH_CACHE_DIR/last-working-dir" diff --git a/zsh/.oh-my-zsh/plugins/lol/README.md b/zsh/.oh-my-zsh/plugins/lol/README.md index b0e54f5..8fba7b7 100644 --- a/zsh/.oh-my-zsh/plugins/lol/README.md +++ b/zsh/.oh-my-zsh/plugins/lol/README.md @@ -13,10 +13,10 @@ Plugin for adding catspeak aliases, because why not ) ``` -2. Reload the source file or restart your Terminal session: +2. Restart your terminal session or restart the shell: ```console - $ source ~/.zshrc + $ exec zsh $ ``` diff --git a/zsh/.oh-my-zsh/plugins/lol/lol.plugin.zsh b/zsh/.oh-my-zsh/plugins/lol/lol.plugin.zsh index 585f96e..3c30259 100644 --- a/zsh/.oh-my-zsh/plugins/lol/lol.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/lol/lol.plugin.zsh @@ -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 https://whatthecommit.com/index.txt)"' +alias yolo='git commit -m "$(curl -s http://whatthecommit.com/index.txt)"' alias letcat='git checkout' alias violenz='git rebase' diff --git a/zsh/.oh-my-zsh/plugins/meteor/README.md b/zsh/.oh-my-zsh/plugins/meteor/README.md index 4bee87f..187a45a 100644 --- a/zsh/.oh-my-zsh/plugins/meteor/README.md +++ b/zsh/.oh-my-zsh/plugins/meteor/README.md @@ -1,6 +1,6 @@ ## Introduction -The [meteor plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/meteor) provides many +The [meteor plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/meteor) provides many [useful aliases](#aliases) as well as completion for the `meteor` command. Enable it by adding `meteor` to the plugins array in your zshrc file: diff --git a/zsh/.oh-my-zsh/plugins/mvn/README.md b/zsh/.oh-my-zsh/plugins/mvn/README.md index 88f5be8..3bbba5b 100644 --- a/zsh/.oh-my-zsh/plugins/mvn/README.md +++ b/zsh/.oh-my-zsh/plugins/mvn/README.md @@ -55,4 +55,4 @@ has colored output, so this function will be soon removed from the plugin. ### Known bugs It has a bug where it will swallow mvn prompts for user input, _e.g._ when using -`archetype:generate`. See [#5052](https://github.com/robbyrussell/oh-my-zsh/issues/5052). +`archetype:generate`. See [#5052](https://github.com/ohmyzsh/ohmyzsh/issues/5052). diff --git a/zsh/.oh-my-zsh/plugins/ng/README.md b/zsh/.oh-my-zsh/plugins/ng/README.md index 86ad640..94a450c 100644 --- a/zsh/.oh-my-zsh/plugins/ng/README.md +++ b/zsh/.oh-my-zsh/plugins/ng/README.md @@ -1,6 +1,6 @@ ## NG Plugin -This [ng plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/ng) +This [ng plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ng) adds completion support for Angular's CLI (named ng). Ng is hosted on [ng home](https://github.com/catull/angular-cli) diff --git a/zsh/.oh-my-zsh/plugins/osx/README.md b/zsh/.oh-my-zsh/plugins/osx/README.md index 4595ee3..f3881ec 100644 --- a/zsh/.oh-my-zsh/plugins/osx/README.md +++ b/zsh/.oh-my-zsh/plugins/osx/README.md @@ -42,20 +42,21 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Commands -| Command | Description | -| :-------------- | :-------------------------------------------------- | -| `tab` | Open the current directory in a new tab | -| `split_tab` | Split the current terminal tab horizontally | -| `vsplit_tab` | Split the current terminal tab vertically | -| `ofd` | Open the current directory in a Finder window | -| `pfd` | Return the path of the frontmost Finder window | -| `pfs` | Return the current Finder selection | -| `cdf` | `cd` to the current Finder directory | -| `pushdf` | `pushd` to the current Finder directory | -| `quick-look` | Quick-Look a specified file | -| `man-preview` | Open a specified man page in Preview app | -| `showfiles` | Show hidden files | -| `hidefiles` | Hide the hidden files | -| `itunes` | Control iTunes. Use `itunes -h` for usage details | -| `spotify` | Control Spotify and search by artist, album, track… | -| `rmdsstore` | Remove .DS\_Store files recursively in a directory | +| Command | Description | +| :-------------- | :---------------------------------------------------- | +| `tab` | Open the current directory in a new tab | +| `split_tab` | Split the current terminal tab horizontally | +| `vsplit_tab` | Split the current terminal tab vertically | +| `ofd` | Open the current directory in a Finder window | +| `pfd` | Return the path of the frontmost Finder window | +| `pfs` | Return the current Finder selection | +| `cdf` | `cd` to the current Finder directory | +| `pushdf` | `pushd` to the current Finder directory | +| `quick-look` | Quick-Look a specified file | +| `man-preview` | Open a specified man page in Preview app | +| `showfiles` | Show hidden files | +| `hidefiles` | Hide the hidden files | +| `itunes` | DEPRECATED. Use `music` from macOS Catalina on | +| `music` | Control Apple Music. Use `music -h` for usage details | +| `spotify` | Control Spotify and search by artist, album, track… | +| `rmdsstore` | Remove .DS\_Store files recursively in a directory | diff --git a/zsh/.oh-my-zsh/plugins/osx/osx.plugin.zsh b/zsh/.oh-my-zsh/plugins/osx/osx.plugin.zsh index eb3c4fb..03e9c1c 100644 --- a/zsh/.oh-my-zsh/plugins/osx/osx.plugin.zsh +++ b/zsh/.oh-my-zsh/plugins/osx/osx.plugin.zsh @@ -219,7 +219,19 @@ function vncviewer() { } # iTunes control function -function itunes() { +function itunes music() { + local APP_NAME=Music + + autoload is-at-least + if is-at-least 10.15 $(sw_vers -productVersion); then + if [[ $0 = itunes ]]; then + echo >&2 The itunes function name is deprecated. Use \`music\' instead. + return 1 + fi + else + APP_NAME=iTunes + fi + local opt=$1 local playlist=$2 shift @@ -236,7 +248,7 @@ function itunes() { opt="$opt track" ;; vol) - local new_volume volume=$(osascript -e 'tell application "iTunes" to get sound volume') + local new_volume volume=$(osascript -e "tell application \"$APP_NAME\" to get sound volume") if [[ $# -eq 0 ]]; then echo "Current volume is ${volume}." return 0 @@ -251,26 +263,26 @@ function itunes() { opt="set sound volume to ${new_volume}" ;; playlist) - # Inspired by: https://gist.github.com/nakajijapan/ac8b45371064ae98ea7f -if [[ ! -z "$playlist" ]]; then - osascript -e 'tell application "iTunes"' -e "set new_playlist to \"$playlist\" as string" -e "play playlist new_playlist" -e "end tell" 2>/dev/null; + # Inspired by: https://gist.github.com/nakajijapan/ac8b45371064ae98ea7f + if [[ ! -z "$playlist" ]]; then + osascript -e "tell application \"$APP_NAME\"" -e "set new_playlist to \"$playlist\" as string" -e "play playlist new_playlist" -e "end tell" 2>/dev/null; if [[ $? -eq 0 ]]; then opt="play" else opt="stop" fi - else - opt="set allPlaylists to (get name of every playlist)" - fi - ;; + else + opt="set allPlaylists to (get name of every playlist)" + fi + ;; playing|status) - local state=`osascript -e 'tell application "iTunes" to player state as string'` + local state=`osascript -e "tell application \"$APP_NAME\" to player state as string"` if [[ "$state" = "playing" ]]; then - currenttrack=`osascript -e 'tell application "iTunes" to name of current track as string'` - currentartist=`osascript -e 'tell application "iTunes" to artist of current track as string'` + currenttrack=`osascript -e "tell application \"$APP_NAME\" to name of current track as string"` + currentartist=`osascript -e "tell application \"$APP_NAME\" to artist of current track as string"` echo -E "Listening to $fg[yellow]$currenttrack$reset_color by $fg[yellow]$currentartist$reset_color"; else - echo "iTunes is" $state; + echo "$APP_NAME is" $state; fi return 0 ;; @@ -284,7 +296,7 @@ if [[ ! -z "$playlist" ]]; then if [[ -n "$state" && ! "$state" =~ "^(on|off|toggle)$" ]] then - print "Usage: itunes shuffle [on|off|toggle]. Invalid option." + print "Usage: $0 shuffle [on|off|toggle]. Invalid option." return 1 fi @@ -305,14 +317,14 @@ EOF esac ;; ""|-h|--help) - echo "Usage: itunes