From 23688fc7ab925111fdb0db07670b6b641e380ec9 Mon Sep 17 00:00:00 2001
From: Iulian Onofrei <6d0847b9@opayq.com>
Date: Sat, 29 Sep 2018 17:01:41 +0300
Subject: [PATCH 01/23] Add option to color any help command
This allows you to use `colored git log --help` for example, to get
colored output.
---
plugins/colored-man-pages/colored-man-pages.plugin.zsh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/colored-man-pages/colored-man-pages.plugin.zsh b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
index 1bea536e0..ac6a94654 100644
--- a/plugins/colored-man-pages/colored-man-pages.plugin.zsh
+++ b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
@@ -16,7 +16,7 @@ EOF
fi
fi
-function man() {
+function colored() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
@@ -28,5 +28,9 @@ function man() {
PAGER="${commands[less]:-$PAGER}" \
_NROFF_U=1 \
PATH="$HOME/bin:$PATH" \
- man "$@"
+ "$@"
+}
+
+function man() {
+ colored man "$@"
}
From 783dd1504f99bd34aedd1d4a68ae6f14e38606da Mon Sep 17 00:00:00 2001
From: Pavel Omelchenko
Date: Wed, 17 Jul 2019 15:17:34 +0300
Subject: [PATCH 02/23] change key string
---
plugins/homestead/homestead.plugin.zsh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh
index cdbc564e4..f67a582f4 100644
--- a/plugins/homestead/homestead.plugin.zsh
+++ b/plugins/homestead/homestead.plugin.zsh
@@ -1,6 +1,6 @@
# Homestead basic command completion
_homestead_get_command_list () {
- homestead --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
+ homestead --no-ansi | sed "1,/Common commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_homestead () {
From 9817e1e7ff62494abf9d7c78870e92908567e8f4 Mon Sep 17 00:00:00 2001
From: Gopal9816
Date: Sat, 27 Jul 2019 17:39:00 +0530
Subject: [PATCH 03/23] common-aliases: add README (#8039)
---
plugins/common-aliases/README.md | 121 +++++++++++++++++++++++++++++++
1 file changed, 121 insertions(+)
create mode 100644 plugins/common-aliases/README.md
diff --git a/plugins/common-aliases/README.md b/plugins/common-aliases/README.md
new file mode 100644
index 000000000..d198a29ac
--- /dev/null
+++ b/plugins/common-aliases/README.md
@@ -0,0 +1,121 @@
+# Common Aliases Plugin
+
+This plugin creates helpful shortcut aliases for many commonly used commands.
+
+To use it add `common-aliases` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... common-aliases)
+```
+
+## Aliases
+
+### ls command
+
+| Alias | Command | Description |
+|-------|---------------|--------------------------------------------------------------------------------|
+| l | `ls -lFh` | List files as a long list, show size, type, human-readable |
+| la | `ls -lAFh` | List almost all files as a long list show size, type, human-readable |
+| lr | `ls -tRFh` | List files recursively sorted by date, show type, human-readable |
+| lt | `ls -ltFh` | List files as a long list sorted by date, show type, human-readable |
+| ll | `ls -l` | List files as a long list |
+| ldot | `ls -ld .*` | List dot files as a long list |
+| lS | `ls -1FSsh` | List files showing only size and name sorted by size |
+| lart | `ls -1Fcart` | List all files sorted in reverse of create/modification time (oldest first) |
+| lrt | `ls -1Fcrt` | List files sorted in reverse of create/modification time(oldest first) |
+
+### File handling
+
+| Alias | Command | Description |
+|-------|-----------------------|------------------------------------------------------------------------------------|
+| rm | `rm -i` | Remove a file |
+| cp | `cp -i` | Copy a file |
+| mv | `mv -i` | Move a file |
+| zshrc | `${=EDITOR} ~/.zshrc` | Quickly access the ~/.zshrc file |
+| dud | `du -d 1 -h` | Display the size of files at depth 1 in current location in human-readable form |
+| duf | `du -sh` | Display the size of files in current location in human-readable form |
+| t | `tail -f` | Shorthand for tail which outputs the last part of a file |
+
+### find and grep
+
+| Alias | Command | Description |
+|-------|-----------------------------------------------------|-----------------------------------------|
+| fd | `find . -type d -name` | Find a directory with the given name |
+| ff | `find . -type f -name` | Find a file with the given name |
+| grep | `grep --color` | Searches for a query string |
+| sgrep | `grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}` | Useful for searching within files |
+
+### Other Aliases
+
+| Alias | Command | Description |
+|-----------|---------------------|-------------------------------------------------------------|
+| h | `history` | Lists all recently used commands |
+| hgrep | `fc -El 0 \| grep` | Searches for a word in the list of previously used commands |
+| help | `man` | Opens up the man page for a command |
+| p | `ps -f` | Displays currently executing processes |
+| sortnr | `sort -n -r` | Used to sort the lines of a text file |
+| unexport | `unset` | Used to unset an environment variable |
+
+## Global aliases
+
+These aliases are expanded in any position in the command line, meaning you can use them even at the
+end of the command you've typed. Examples:
+
+Quickly pipe to less:
+```zsh
+$ ls -l /var/log L
+# will run
+$ ls -l /var/log | less
+```
+Silences stderr output:
+```zsh
+$ find . -type f NE
+# will run
+$ find . -type f 2>/dev/null
+```
+
+| Alias | Command | Description |
+|-------|-----------------------------|-------------------------------------------------------------|
+| H | `\| head` | Pipes output to head which outputs the first part of a file |
+| T | `\| tail` | Pipes output to tail which outputs the last part of a file |
+| G | `\| grep` | Pipes output to grep to search for some word |
+| L | `\| less` | Pipes output to less, useful for paging |
+| M | `\| most` | Pipes output to more, useful for paging |
+| LL | `2>&1 \| less` | Writes stderr to stdout and passes it to less |
+| CA | `2>&1 \| cat -A` | Writes stderr to stdout and passes it to cat |
+| NE | `2 > /dev/null` | Silences stderr |
+| NUL | `> /dev/null 2>&1` | Silences both stdout and stderr |
+| P | `2>&1\| pygmentize -l pytb` | Writes stderr to stdout and passes it to pygmentize |
+
+## File extension aliases
+
+These are special aliases that are triggered when a file name is passed as the command. For example,
+if the pdf file extension is aliased to `acroread` (a popular Linux pdf reader), when running `file.pdf`
+that file will be open with `acroread`.
+
+### Reading Docs
+
+| Alias | Command | Description |
+|-------|-------------|-------------------------------------|
+| pdf | `acroread` | Opens up a document using acroread |
+| ps | `gv` | Opens up a .ps file using gv |
+| dvi | `xdvi` | Opens up a .dvi file using xdvi |
+| chm | `xchm` | Opens up a .chm file using xchm |
+| djvu | `djview` | Opens up a .djvu file using djview |
+
+### Listing files inside a packed file
+
+| Alias | Command | Description |
+|---------|-------------|-------------------------------------|
+| zip | `unzip -l` | Lists files inside a .zip file |
+| rar | `unrar l` | Lists files inside a .rar file |
+| tar | `tar tf` | Lists files inside a .tar file |
+| tar.gz | `echo` | Lists files inside a .tar.gz file |
+| ace | `unace l` | Lists files inside a .ace file |
+
+### Some other features
+
+- Opens urls in terminal using browser specified by the variable `$BROWSER`
+- Opens C, C++, Tex and text files using editor specified by the variable `$EDITOR`
+- Opens images using image viewer specified by the variable `$XIVIEWER`
+- Opens videos and other media using mplayer
From 59c1ec80aa9b018db34078e69a27e57aea5ad761 Mon Sep 17 00:00:00 2001
From: Rocky
Date: Wed, 31 Jul 2019 01:23:50 -0600
Subject: [PATCH 04/23] agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic (#8050)
Fixes #7985
---
themes/agnoster.zsh-theme | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 518a14a37..7e37440a4 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -204,7 +204,7 @@ prompt_dir() {
# Virtualenv: current working virtualenv
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
- if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
+ if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
fi
}
From 6d2221e697ea4a2445202b1c32283610f84585ef Mon Sep 17 00:00:00 2001
From: Jack Brown
Date: Wed, 31 Jul 2019 17:45:54 +1000
Subject: [PATCH 05/23] frontend-search: add duckduckgo as an option for
fallback search (#7973)
---
plugins/frontend-search/README.md | 4 +++
.../frontend-search.plugin.zsh | 31 +++++++++++++------
2 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md
index bf76902fd..ddcb3d72b 100644
--- a/plugins/frontend-search/README.md
+++ b/plugins/frontend-search/README.md
@@ -62,6 +62,10 @@ Available search contexts are:
If you want to have another context, open an Issue and tell us!
+## Fallback search behaviour
+
+The plugin will use Google as a fallback if the docs site for a search context does not have a search function. You can set the fallback search engine to DuckDuckGo by setting `FRONTEND_SEARCH_FALLBACK='duckduckgo'` in your `~/.zshrc` file before Oh My Zsh is sourced.
+
## Author
**Wilson Mendes (willmendesneto)**
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
index 87243be13..ed19280c4 100644
--- a/plugins/frontend-search/frontend-search.plugin.zsh
+++ b/plugins/frontend-search/frontend-search.plugin.zsh
@@ -27,6 +27,17 @@ alias typescript='frontend typescript'
alias unheap='frontend unheap'
alias vuejs='frontend vuejs'
+function _frontend_fallback() {
+ local url
+ if [[ "$FRONTEND_SEARCH_FALLBACK" == duckduckgo ]]; then
+ url="https://duckduckgo.com/?sites=$1&q="
+ else
+ url="https://google.com/search?as_sitesearch=$1&as_q="
+ fi
+
+ echo "$url"
+}
+
function frontend() {
emulate -L zsh
@@ -34,8 +45,8 @@ function frontend() {
typeset -A urls
urls=(
angular 'https://angular.io/?search='
- angularjs 'https://google.com/search?as_sitesearch=angularjs.org&as_q='
- bem 'https://google.com/search?as_sitesearch=bem.info&as_q='
+ angularjs $(_frontend_fallback 'angularjs.org')
+ bem $(_frontend_fallback 'bem.info')
bootsnipp 'https://bootsnipp.com/search?q='
bundlephobia 'https://bundlephobia.com/result?p='
caniuse 'https://caniuse.com/#search='
@@ -43,24 +54,24 @@ function frontend() {
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 'https://www.google.com/search?as_sitesearch=emberjs.com/&as_q='
- flowtype 'https://google.com/search?as_sitesearch=flow.org/en/docs/&as_q='
+ emberjs $(_frontend_fallback 'emberjs.com/')
+ flowtype $(_frontend_fallback 'flow.org/en/docs/')
fontello 'http://fontello.com/#search='
github 'https://github.com/search?q='
html5please 'https://html5please.com/#'
- jestjs 'https://www.google.com/search?as_sitesearch=jestjs.io&as_q='
+ jestjs $(_frontend_fallback 'jestjs.io')
jquery 'https://api.jquery.com/?s='
lodash 'https://devdocs.io/lodash/index#'
mdn 'https://developer.mozilla.org/search?q='
- nodejs 'https://www.google.com/search?as_sitesearch=nodejs.org/en/docs/&as_q='
+ nodejs $(_frontend_fallback 'nodejs.org/en/docs/')
npmjs 'https://www.npmjs.com/search?q='
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='
+ reactjs $(_frontend_fallback 'reactjs.org/')
+ smacss $(_frontend_fallback 'smacss.com')
stackoverflow 'https://stackoverflow.com/search?q='
- typescript 'https://google.com/search?as_sitesearch=www.typescriptlang.org/docs&as_q='
+ typescript $(_frontend_fallback 'www.typescriptlang.org/docs')
unheap 'http://www.unheap.com/?s='
- vuejs 'https://www.google.com/search?as_sitesearch=vuejs.org&as_q='
+ vuejs $(_frontend_fallback 'vuejs.org')
)
# show help for command list
From 26aad59779b2cd7ce313798a4e6b76a29b9f2347 Mon Sep 17 00:00:00 2001
From: Iulian Onofrei
Date: Sun, 4 Aug 2019 00:33:40 +0300
Subject: [PATCH 06/23] Add README file
---
plugins/colored-man-pages/README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 plugins/colored-man-pages/README.md
diff --git a/plugins/colored-man-pages/README.md b/plugins/colored-man-pages/README.md
new file mode 100644
index 000000000..d9f6acb2a
--- /dev/null
+++ b/plugins/colored-man-pages/README.md
@@ -0,0 +1,15 @@
+# Colored man pages plugin
+
+This plugin adds colors to man pages.
+
+To use it, add `colored-man-pages` to the plugins array in your zshrc file:
+
+```zsh
+plugins=(... colored-man-pages)
+```
+
+You can also try to color other pages by prefixing the respective command with `colored`:
+
+```zsh
+colored git help clone
+```
From 89366be43fd6ceff52a9da2f2edef654ab619514 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Tue, 6 Aug 2019 18:01:32 +0200
Subject: [PATCH 07/23] Revert "agnoster: fix VIRTUAL_ENV_DISABLE_PROMPT logic
(#8050)" (#8061)
This reverts commit 59c1ec80aa9b018db34078e69a27e57aea5ad761.
---
themes/agnoster.zsh-theme | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 7e37440a4..518a14a37 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -204,7 +204,7 @@ prompt_dir() {
# Virtualenv: current working virtualenv
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
- if [[ -n $virtualenv_path && -z $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
+ if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
prompt_segment blue black "(`basename $virtualenv_path`)"
fi
}
From 40fafe0f59371d1a9d83b83c614acfd1d740aabb Mon Sep 17 00:00:00 2001
From: Jisse Reitsma
Date: Wed, 7 Aug 2019 20:16:25 +0200
Subject: [PATCH 08/23] n98-magerun: support magerun for Magento 2 (#7950)
---
plugins/n98-magerun/n98-magerun.plugin.zsh | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh
index bfcf27b98..d79aee7eb 100644
--- a/plugins/n98-magerun/n98-magerun.plugin.zsh
+++ b/plugins/n98-magerun/n98-magerun.plugin.zsh
@@ -2,7 +2,8 @@
# FILE: n98-magerun.plugin.zsh
# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin
# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
-# VERSION: 1.0.0
+# AUTHOR: Jisse Reitsma (jisse at yireo dot com)
+# VERSION: 1.1.0
# ------------------------------------------------------------------------------
# n98-magerun basic command completion
@@ -24,11 +25,18 @@ _n98_magerun () {
compdef _n98_magerun n98-magerun.phar
compdef _n98_magerun n98-magerun
+compdef _n98_magerun n98-magerun2.phar
+compdef _n98_magerun n98-magerun2
# Aliases
alias n98='n98-magerun.phar'
alias mage='n98-magerun.phar'
-alias magefl='n98-magerun.phar cache:flush'
+alias magerun='n98-magerun.phar'
+
+alias n98-2='n98-magerun2.phar'
+alias mage2='n98-magerun2.phar'
+alias magerun2='n98-magerun2.phar'
# Install n98-magerun into the current directory
-alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar'
+alias mage-get='wget https://files.magerun.net/n98-magerun.phar'
+alias mage2-get='wget https://files.magerun.net/n98-magerun2.phar'
From d8ad4e902cd359cf0a58cc8fc759377ec3d3c026 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Tue, 13 Aug 2019 14:15:14 +0200
Subject: [PATCH 09/23] meta: convert workflow file to GitHub Actions v2 yml
syntax
---
.github/main.workflow | 17 -----------------
.github/workflows/pull_request_triage.yml | 14 ++++++++++++++
2 files changed, 14 insertions(+), 17 deletions(-)
delete mode 100644 .github/main.workflow
create mode 100644 .github/workflows/pull_request_triage.yml
diff --git a/.github/main.workflow b/.github/main.workflow
deleted file mode 100644
index 0dbb0247a..000000000
--- a/.github/main.workflow
+++ /dev/null
@@ -1,17 +0,0 @@
-workflow "Triage Pull Request" {
- on = "pull_request"
- resolves = ["Triage"]
-}
-
-# Only act if there are code changes: if the pull_request
-# event's action is either 'opened' (new PR) or 'synchronize' (new commits)
-action "Filter actions" {
- uses = "actions/bin/filter@0ac6d44"
- args = "action 'opened|synchronize'"
-}
-
-action "Triage" {
- needs = ["Filter actions"]
- uses = "ohmyzsh/github-actions/pull-request-triage@master"
- secrets = ["GITHUB_TOKEN"]
-}
diff --git a/.github/workflows/pull_request_triage.yml b/.github/workflows/pull_request_triage.yml
new file mode 100644
index 000000000..341298a0f
--- /dev/null
+++ b/.github/workflows/pull_request_triage.yml
@@ -0,0 +1,14 @@
+on: pull_request
+name: Triage Pull Request
+jobs:
+ mainJob:
+ name: Triage
+ if: github.event.action == 'opened' || github.event.action == 'synchronize'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@master
+ - name: Analyze and triage
+ uses: ohmyzsh/github-actions/pull-request-triage@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
From 4974143745360bfbfde535eab23df27daa8e3c8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Tue, 13 Aug 2019 15:10:15 +0200
Subject: [PATCH 10/23] meta: move if condition on workflow to steps
Provisional measure due to "Unexpected value 'if'" error. See https://github.community/t5/GitHub-API-Development-and/jobs-lt-job-id-gt-if-not-working/m-p/28980
---
.github/workflows/pull_request_triage.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/pull_request_triage.yml b/.github/workflows/pull_request_triage.yml
index 341298a0f..a27392a92 100644
--- a/.github/workflows/pull_request_triage.yml
+++ b/.github/workflows/pull_request_triage.yml
@@ -1,13 +1,13 @@
on: pull_request
name: Triage Pull Request
jobs:
- mainJob:
+ triage:
name: Triage
- if: github.event.action == 'opened' || github.event.action == 'synchronize'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
+ if: github.event.action == 'opened' || github.event.action == 'synchronize'
- name: Analyze and triage
uses: ohmyzsh/github-actions/pull-request-triage@master
env:
From 28232904bec1e8e15da52ae048a8a31ef7fac67b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Tue, 13 Aug 2019 18:19:07 +0200
Subject: [PATCH 11/23] git-auto-fetch: override zle-line-init only if it
exists
---
.../git-auto-fetch/git-auto-fetch.plugin.zsh | 20 +++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
index 745c669b5..56ab86dbe 100644
--- a/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
+++ b/plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
@@ -18,10 +18,18 @@ function git-auto-fetch {
echo "${fg_bold[red]}disabled${reset_color}")
}
-eval "override-git-auto-fetch-$(declare -f zle-line-init)"
-
-function zle-line-init () {
- git-fetch-all
- override-git-auto-fetch-zle-line-init
-}
+# Override zle-line-init if it exists
+if (( $+functions[zle-line-init] )); then
+ eval "override-git-auto-fetch-$(declare -f zle-line-init)"
+
+ function zle-line-init () {
+ git-fetch-all
+ override-git-auto-fetch-zle-line-init
+ }
+else
+ function zle-line-init () {
+ git-fetch-all
+ }
+fi
+
zle -N zle-line-init
From c4c620adcd0dadf8f3f0d6aa331780291b5bdacd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Sun, 18 Aug 2019 15:13:46 +0200
Subject: [PATCH 12/23] meta: add DEBUG_ACTIONS flag to PR triage action
---
.github/workflows/pull_request_triage.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/pull_request_triage.yml b/.github/workflows/pull_request_triage.yml
index a27392a92..77ec4ce79 100644
--- a/.github/workflows/pull_request_triage.yml
+++ b/.github/workflows/pull_request_triage.yml
@@ -12,3 +12,4 @@ jobs:
uses: ohmyzsh/github-actions/pull-request-triage@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ DEBUG_ACTIONS: ${{ secrets.DEBUG_ACTIONS }}
From 97c0d0a563d2303adc64e94c78544bb4d2dbf83c Mon Sep 17 00:00:00 2001
From: SomeDer <48731521+SomeDer@users.noreply.github.com>
Date: Mon, 19 Aug 2019 11:14:22 +0100
Subject: [PATCH 13/23] Allow plugins sudo and thefuck to be loaded before
vi-mode (#8087)
---
plugins/sudo/sudo.plugin.zsh | 4 +++-
plugins/thefuck/thefuck.plugin.zsh | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh
index 0b843822e..f405b025f 100644
--- a/plugins/sudo/sudo.plugin.zsh
+++ b/plugins/sudo/sudo.plugin.zsh
@@ -28,4 +28,6 @@ sudo-command-line() {
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]
-bindkey "\e\e" sudo-command-line
+bindkey -M emacs '\e\e' sudo-command-line
+bindkey -M vicmd '\e\e' sudo-command-line
+bindkey -M viins '\e\e' sudo-command-line
diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh
index ac88e67de..b8586c70d 100644
--- a/plugins/thefuck/thefuck.plugin.zsh
+++ b/plugins/thefuck/thefuck.plugin.zsh
@@ -15,4 +15,6 @@ fuck-command-line() {
}
zle -N fuck-command-line
# Defined shortcut keys: [Esc] [Esc]
-bindkey "\e\e" fuck-command-line
+bindkey -M emacs '\e\e' fuck-command-line
+bindkey -M vicmd '\e\e' fuck-command-line
+bindkey -M viins '\e\e' fuck-command-line
From 90a0de4698d8ec4300bf6aa3d6847e299a05b1f5 Mon Sep 17 00:00:00 2001
From: SomeDer <48731521+SomeDer@users.noreply.github.com>
Date: Mon, 19 Aug 2019 16:53:13 +0100
Subject: [PATCH 14/23] Add alias-finder plugin (#7768)
---
plugins/alias-finder/README.md | 46 ++++++++++++++++++++
plugins/alias-finder/alias-finder.plugin.zsh | 46 ++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 plugins/alias-finder/README.md
create mode 100644 plugins/alias-finder/alias-finder.plugin.zsh
diff --git a/plugins/alias-finder/README.md b/plugins/alias-finder/README.md
new file mode 100644
index 000000000..409f4b653
--- /dev/null
+++ b/plugins/alias-finder/README.md
@@ -0,0 +1,46 @@
+# alias-finder plugin
+
+This plugin searches the defined aliases and outputs any that match the command inputted. This makes learning new aliases easier.
+
+To use it, add `alias-finder` to the `plugins` array of your zshrc file:
+```
+plugins=(... alias-finder)
+```
+
+## Usage
+To see if there is an alias defined for the command, pass it as an argument to `alias-finder`. This can also run automatically before each command you input - add `ZSH_ALIAS_FINDER_AUTOMATIC=true` to your zshrc if you want this.
+
+## Options
+
+- Use `--longer` or `-l` to allow the aliases to be longer than the input (match aliases if they contain the input).
+- Use `--exact` or `-e` to avoid matching aliases that are shorter than the input.
+
+## Examples
+```
+$ alias-finder "git pull"
+gl='git pull'
+g=git
+```
+```
+$ alias-finder "web_search google oh my zsh"
+google='web_search google'
+```
+```
+$ alias-finder "git commit -v"
+gc="git commit -v"
+g=git
+```
+```
+$ alias-finder -e "git commit -v"
+gc='git commit -v'
+```
+```
+$ alias-finder -l "git commit -v"
+gc='git commit -v'
+'gc!'='git commit -v --amend'
+gca='git commit -v -a'
+'gca!'='git commit -v -a --amend'
+'gcan!'='git commit -v -a --no-edit --amend'
+'gcans!'='git commit -v -a -s --no-edit --amend'
+'gcn!'='git commit -v --no-edit --amend'
+```
diff --git a/plugins/alias-finder/alias-finder.plugin.zsh b/plugins/alias-finder/alias-finder.plugin.zsh
new file mode 100644
index 000000000..2bfaad597
--- /dev/null
+++ b/plugins/alias-finder/alias-finder.plugin.zsh
@@ -0,0 +1,46 @@
+alias-finder() {
+ local cmd="" exact="" longer="" wordStart="" wordEnd="" multiWordEnd=""
+ for i in $@; do
+ case $i in
+ -e|--exact) exact=true;;
+ -l|--longer) longer=true;;
+ *)
+ if [[ -z $cmd ]]; then
+ cmd=$i
+ else
+ cmd="$cmd $i"
+ fi
+ ;;
+ esac
+ done
+ cmd=$(sed 's/[].\|$(){}?+*^[]/\\&/g' <<< $cmd) # adds escaping for grep
+ if [[ $(wc -l <<< $cmd) == 1 ]]; then
+ while [[ $cmd != "" ]]; do
+ if [[ $longer = true ]]; then
+ wordStart="'{0,1}"
+ else
+ wordEnd="$"
+ multiWordEnd="'$"
+ fi
+ if [[ $cmd == *" "* ]]; then
+ local finder="'$cmd$multiWordEnd"
+ else
+ local finder=$wordStart$cmd$wordEnd
+ fi
+ alias | grep -E "=$finder"
+ if [[ $exact = true || $longer = true ]]; then
+ break
+ else
+ cmd=$(sed -E 's/ {0,1}[^ ]*$//' <<< $cmd) # removes last word
+ fi
+ done
+ fi
+}
+
+preexec_alias-finder() {
+ if [[ $ZSH_ALIAS_FINDER_AUTOMATIC = true ]]; then
+ alias-finder $1
+ fi
+}
+
+preexec_functions+=(preexec_alias-finder)
From 8634d9542a974ce4700ca14c3d3bc410945cc20a Mon Sep 17 00:00:00 2001
From: Matthew Turney
Date: Mon, 19 Aug 2019 10:57:19 -0500
Subject: [PATCH 15/23] Add git-escape-magic plugin (#2847)
---
plugins/git-escape-magic/README.md | 17 +++
plugins/git-escape-magic/git-escape-magic | 135 ++++++++++++++++++
.../git-escape-magic.plugin.zsh | 9 ++
3 files changed, 161 insertions(+)
create mode 100644 plugins/git-escape-magic/README.md
create mode 100644 plugins/git-escape-magic/git-escape-magic
create mode 100644 plugins/git-escape-magic/git-escape-magic.plugin.zsh
diff --git a/plugins/git-escape-magic/README.md b/plugins/git-escape-magic/README.md
new file mode 100644
index 000000000..a14364f22
--- /dev/null
+++ b/plugins/git-escape-magic/README.md
@@ -0,0 +1,17 @@
+# Git Escape Magic
+
+This plugin is copied from the original at
+https://github.com/knu/zsh-git-escape-magic. All credit for the
+functionality enabled by this plugin should go to @knu.
+
+An excerpt from that project's readme explains it's purpose.
+
+> It eliminates the need for manually escaping those meta-characters. The zle function it provides is context aware and recognizes the characteristics of each subcommand of git. Every time you type one of these meta-characters on a git command line, it automatically escapes the meta-character with a backslash as necessary and as appropriate.
+
+## Useage
+
+To use this plugin add it to your list of plugins in your `.zshrc` file.
+
+**NOTE**: If you use url-quote-magic it must be included before this
+plugin runs to prevent any conflicts.
+
diff --git a/plugins/git-escape-magic/git-escape-magic b/plugins/git-escape-magic/git-escape-magic
new file mode 100644
index 000000000..94a8d7b0f
--- /dev/null
+++ b/plugins/git-escape-magic/git-escape-magic
@@ -0,0 +1,135 @@
+# -*- mode: sh -*-
+#
+# git-escape-magic - zle tweak for git command line arguments
+#
+# Copyright (c) 2011, 2012, 2014 Akinori MUSHA
+# Licensed under the 2-clause BSD license.
+#
+# This tweak eliminates the need for manually escaping shell
+# meta-characters such as [~^{}] that are used for specifying a git
+# object (commit or tree). Every time you type one of these
+# characters on a git command line, it is automatically escaped with a
+# backslash as necessary and as appropriate.
+#
+# If you want to use this with url-quote-magic, make sure to enable it
+# first.
+#
+# Usage:
+# autoload -Uz git-escape-magic
+# git-escape-magic
+#
+
+git-escape-magic.self-insert() {
+ emulate -L zsh
+ setopt extendedglob
+ local self_insert_function
+ zstyle -s ':git-escape-magic' self-insert-function self_insert_function
+
+ if [[ "$KEYS" == [{}~^]* ]] && {
+ local qkey="${(q)KEYS}"
+ [[ "$KEYS" != "$qkey" ]]
+ } && {
+ local lbuf="$LBUFFER$qkey"
+ [[ "${(Q)LBUFFER}$KEYS" == "${(Q)lbuf}" ]]
+ } && {
+ local -a words
+ words=("${(@Q)${(z)lbuf}}")
+ [[ "$words[(i)(*/|)git(|-[^/]##)]" -le $#words ]]
+ }
+ then
+ local i
+ i="$words[(I)([;(){\&]|\&[\&\!]|\|\||[=<>]\(*)]"
+ if [[ $i -gt 0 ]]; then
+ shift $((i-1)) words
+ if [[ "$words[1]" == [\=\<\>]\(* ]]; then
+ words[1]="${words[1]#[=<>]\(}"
+ else
+ [[ "$words[1]" == \; && $words[2] == (then|else|elif|do) ]] && shift words
+ shift words
+ fi
+ fi
+ while [[ "$words[1]" == (if|while|until|\!) ]]; do
+ shift words
+ done
+ while [[ "$words[1]" == [A-Za-z_][A-Za-z0-9_]#=* ]]; do
+ shift words
+ done
+ [[ "$words[1]" == (*/|)git(|-[^/]##) ]] && {
+ local subcommand
+ subcommand="${words[1]##*/git-}"
+ if [[ -z "$subcommand" ]]; then
+ shift words
+ subcommand="$words[1]"
+ fi
+ [[ $#words -ge 2 ]]
+ } &&
+ case "$subcommand" in
+ # commands that may take pathspec but never take refspec with [{}~^]
+ (add|rm|am|apply|check-attr|checkout-index|clean|clone|config|diff-files|hash-object|help|index-pack|mailinfo|mailsplit|merge-file|merge-index|mergetool|mktag|mv|pack-objects|pack-redundant|relink|send-email|show-index|show-ref|stage|status|verify-pack)
+ false ;;
+ # commands that may take pathspec but rarely take refspec with [{}~^]
+ (for-each-ref|grep|ls-files|update-index)
+ false ;;
+ (archive|ls-tree)
+ ! [[ $#words -ge 3 &&
+ "$words[-2]" == [^-]* ]] ;;
+ (diff-tree)
+ ! [[ $#words -ge 4 &&
+ "$words[-2]" == [^-]* &&
+ "$words[-3]" == [^-]* ]] ;;
+ (*)
+ [[ $words[(i)--] -gt $#words ]] ;;
+ esac &&
+ case "${words[-1]%%"$KEYS"}" in
+ (*[@^])
+ [[ "$KEYS" == [{~^]* ]] ;;
+ (*[@^]\{[^}]##)
+ [[ "$KEYS" == \}* ]] ;;
+ (?*)
+ [[ "$KEYS" == [~^]* ]] ;;
+ (*)
+ false ;;
+ esac &&
+ LBUFFER="$LBUFFER\\"
+ fi
+
+ zle "$self_insert_function"
+}
+
+git-escape-magic.on() {
+ emulate -L zsh
+ local self_insert_function="${$(zle -lL | awk \
+ '$1=="zle"&&$2=="-N"&&$3=="self-insert"{print $4;exit}'):-.self-insert}"
+
+ [[ "$self_insert_function" == git-escape-magic.self-insert ]] &&
+ return 0
+
+ # For url-quote-magic which does not zle -N itself
+ zle -la "$self_insert_function" || zle -N "$self_insert_function"
+
+ zstyle ':git-escape-magic' self-insert-function "$self_insert_function"
+
+ zle -A git-escape-magic.self-insert self-insert
+ return 0
+}
+
+git-escape-magic.off() {
+ emulate -L zsh
+ local self_insert_function
+ zstyle -s ':git-escape-magic' self-insert-function self_insert_function
+
+ [[ -n "$self_insert_function" ]] &&
+ zle -A "$self_insert_function" self-insert
+ return 0
+}
+
+zle -N git-escape-magic.self-insert
+zle -N git-escape-magic.on
+zle -N git-escape-magic.off
+
+git-escape-magic() {
+ git-escape-magic.on
+}
+
+[[ -o kshautoload ]] || git-escape-magic "$@"
+
diff --git a/plugins/git-escape-magic/git-escape-magic.plugin.zsh b/plugins/git-escape-magic/git-escape-magic.plugin.zsh
new file mode 100644
index 000000000..c021ea707
--- /dev/null
+++ b/plugins/git-escape-magic/git-escape-magic.plugin.zsh
@@ -0,0 +1,9 @@
+# Automatically detect and escape zsh globbing meta-characters when used with
+# git refspec characters like `[^~{}]`. NOTE: This must be loaded _after_
+# url-quote-magic.
+#
+# This trick is detailed at https://github.com/knu/zsh-git-escape-magic and is
+# what allowed this plugin to exist.
+
+autoload -Uz git-escape-magic
+git-escape-magic
From 1908f7bddcacdfb18a5a4b1c883f0c405d1660a8 Mon Sep 17 00:00:00 2001
From: Kirill Pinchuk
Date: Mon, 19 Aug 2019 19:12:53 +0300
Subject: [PATCH 16/23] fabric: support fabric 2+ completion (#8010)
---
plugins/fabric/_fab | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/fabric/_fab b/plugins/fabric/_fab
index 9628e1224..4c2e61306 100644
--- a/plugins/fabric/_fab
+++ b/plugins/fabric/_fab
@@ -5,7 +5,7 @@ local curcontext=$curcontext state line
declare -A opt_args
declare target_list
-target_list=(`fab --shortlist 2>/dev/null`)
+target_list=(`fab --shortlist 2>/dev/null || fab --complete 2>/dev/null`)
_targets() {
_describe -t commands "fabric targets" target_list
From e604eaf55e1c5b19035778c0e0adb0dd6e344b94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?=
Date: Mon, 19 Aug 2019 18:17:17 +0200
Subject: [PATCH 17/23] lib: delete LC_CTYPE locale setting which causes
problems
Fixes #7942
---
lib/misc.zsh | 5 -----
1 file changed, 5 deletions(-)
diff --git a/lib/misc.zsh b/lib/misc.zsh
index 40ffa479d..36c3ae2e5 100644
--- a/lib/misc.zsh
+++ b/lib/misc.zsh
@@ -31,10 +31,5 @@ else
alias afind='ack -il'
fi
-# only define LC_CTYPE if undefined
-if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
- export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
-fi
-
# recognize comments
setopt interactivecomments
From 43ed0b455ed5bbf66ef3e604c3d9845eb90f0078 Mon Sep 17 00:00:00 2001
From: Matthew Armand
Date: Mon, 19 Aug 2019 12:54:49 -0400
Subject: [PATCH 18/23] af-magic: add hg prompt and tweak virtualenv info
(#8056)
- Add mercurial support to af-magic, so now the vcs prompt will show up in either a git or hg repository
- The virtualenv prompt was white and bumped up against the user@hostname output
- Fixed that so its green (which I thought highlighted it more thematically) and has a space before user@hostname
---
themes/af-magic.zsh-theme | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme
index 2a6595a71..d185fa1ab 100644
--- a/themes/af-magic.zsh-theme
+++ b/themes/af-magic.zsh-theme
@@ -8,7 +8,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
# primary prompt
PROMPT='$FG[237]${(l.COLUMNS..-.)}%{$reset_color%}
$FG[032]%~\
-$(git_prompt_info) \
+$(git_prompt_info)$(hg_prompt_info) \
$FG[105]%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}'
@@ -21,7 +21,7 @@ eval my_orange='$FG[214]'
# right prompt
if type "virtualenv_prompt_info" > /dev/null
then
- RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
+ RPROMPT='$FG[078]$(virtualenv_prompt_info)%{$reset_color%} $my_gray%n@%m%{$reset_color%}%'
else
RPROMPT='$my_gray%n@%m%{$reset_color%}%'
fi
@@ -31,3 +31,9 @@ ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075]($FG[078]"
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
+
+# hg settings
+ZSH_THEME_HG_PROMPT_PREFIX="$FG[075]($FG[078]"
+ZSH_THEME_HG_PROMPT_CLEAN=""
+ZSH_THEME_HG_PROMPT_DIRTY="$my_orange*%{$reset_color%}"
+ZSH_THEME_HG_PROMPT_SUFFIX="$FG[075])%{$reset_color%}"
From de3b14cf69eeb43797bae8320af6972032b604ff Mon Sep 17 00:00:00 2001
From: Julien Janvier <3691804+jjanvier@users.noreply.github.com>
Date: Tue, 20 Aug 2019 12:11:38 +0200
Subject: [PATCH 19/23] git: add aliases for git switch and restore (#8089)
---
plugins/git/README.md | 4 ++++
plugins/git/git.plugin.zsh | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/plugins/git/README.md b/plugins/git/README.md
index fc89b27e0..3311ccf55 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -131,7 +131,9 @@ plugins=(... git)
| grmc | git rm --cached |
| grmv | git remote rename |
| grrm | git remote remove |
+| grs | git restore |
| grset | git remote set-url |
+| grss | git restore --source |
| grt | cd "$(git rev-parse --show-toplevel \|\| echo .)" |
| gru | git reset -- |
| grup | git remote update |
@@ -154,6 +156,8 @@ plugins=(... git)
| gsts | git stash show --text |
| gstall | git stash --all |
| gsu | git submodule update |
+| gsw | git switch |
+| gswc | git switch -c |
| gts | git tag -s |
| gtv | git tag \| sort -V |
| gtl | gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl |
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index e0ce27fd4..9787392de 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -207,7 +207,9 @@ alias grm='git rm'
alias grmc='git rm --cached'
alias grmv='git remote rename'
alias grrm='git remote remove'
+alias grs='git restore'
alias grset='git remote set-url'
+alias grss='git restore --source'
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
alias gru='git reset --'
alias grup='git remote update'
@@ -236,6 +238,8 @@ alias gstp='git stash pop'
alias gsts='git stash show --text'
alias gstall='git stash --all'
alias gsu='git submodule update'
+alias gsw='git switch'
+alias gswc='git switch -c'
alias gts='git tag -s'
alias gtv='git tag | sort -V'
From 246e7832ef6f4b77ae998508d0ba90c82961fd0a Mon Sep 17 00:00:00 2001
From: Pavel Omelchenko
Date: Thu, 22 Aug 2019 12:00:31 +0300
Subject: [PATCH 20/23] feature: add condition for regular expression
---
plugins/homestead/homestead.plugin.zsh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh
index f67a582f4..b9940dbcf 100644
--- a/plugins/homestead/homestead.plugin.zsh
+++ b/plugins/homestead/homestead.plugin.zsh
@@ -1,6 +1,6 @@
# Homestead basic command completion
_homestead_get_command_list () {
- homestead --no-ansi | sed "1,/Common commands/d" | awk '/^ +[a-z]+/ { print $1 }'
+ homestead --no-ansi | sed "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_homestead () {
From caf0bfa0461d5d787ab4f336139aadffcea379a9 Mon Sep 17 00:00:00 2001
From: Vignesh Balasubramaniam
Date: Fri, 23 Aug 2019 10:58:21 -0400
Subject: [PATCH 21/23] ubuntu: fix aglu to list available upgrades (#8082)
---
plugins/ubuntu/ubuntu.plugin.zsh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh
index d589096c3..a53752fb2 100644
--- a/plugins/ubuntu/ubuntu.plugin.zsh
+++ b/plugins/ubuntu/ubuntu.plugin.zsh
@@ -12,10 +12,10 @@ alias acp='apt-cache policy'
#List all installed packages
alias agli='apt list --installed'
-# superuser operations ######################################################
-
# List available updates only
-alias aglu='sudo apt-get -u upgrade --assume-no'
+alias aglu='apt list --upgradable'
+
+# superuser operations ######################################################
alias afu='sudo apt-file update'
From df9cf723963e38d152b750d85f0907b57dde53bb Mon Sep 17 00:00:00 2001
From: Ryan Styrczula
Date: Fri, 23 Aug 2019 11:05:11 -0400
Subject: [PATCH 22/23] plugins/git: Fix `gbda` trying to delete worktree
branches
Git learned to add a `+` in front of branches that are
checked out in other worktrees.
See: https://github.com/git/git/blob/745f6812895b31c02b29bdfe4ae8e5498f776c26/Documentation/RelNotes/2.23.0.txt#L252-L256
---
plugins/git/README.md | 2 +-
plugins/git/git.plugin.zsh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/git/README.md b/plugins/git/README.md
index 3311ccf55..7878f747b 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -22,7 +22,7 @@ plugins=(... git)
| gb | git branch |
| gba | git branch -a |
| gbd | git branch -d |
-| gbda | git branch --no-color --merged \| command grep -vE "^(\*\|\s*(master\|develop\|dev)\s*$)" \| command xargs -n 1 git branch -d |
+| gbda | git branch --no-color --merged \| command grep -vE "^(\+|\*\|\s*(master\|develop\|dev)\s*$)" \| command xargs -n 1 git branch -d |
| gbD | git branch -D |
| gbl | git blame -b -w |
| gbnm | git branch --no-merged |
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 9787392de..2edee0298 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -42,7 +42,7 @@ alias gap='git apply'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
-alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
+alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
alias gbD='git branch -D'
alias gbl='git blame -b -w'
alias gbnm='git branch --no-merged'
From 08beebd89f9eec956c126c732a287ec5a5a197a8 Mon Sep 17 00:00:00 2001
From: Pavel Omelchenko
Date: Sat, 24 Aug 2019 01:00:08 +0300
Subject: [PATCH 23/23] homestead: repair sed regex (#8103)
---
plugins/homestead/homestead.plugin.zsh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/homestead/homestead.plugin.zsh b/plugins/homestead/homestead.plugin.zsh
index b9940dbcf..ea2803d77 100644
--- a/plugins/homestead/homestead.plugin.zsh
+++ b/plugins/homestead/homestead.plugin.zsh
@@ -1,6 +1,6 @@
# Homestead basic command completion
_homestead_get_command_list () {
- homestead --no-ansi | sed "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }'
+ homestead --no-ansi | sed -E "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_homestead () {