From e137068cacfc42eb96c8e0e58855d7d1c5c06c05 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 9 Nov 2015 02:08:40 -0500 Subject: [PATCH 01/15] Update external completions --- modules/completion/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/external b/modules/completion/external index 68c94947..c2dde89f 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit 68c949470eaa87c5d67080d32fb2b69c8b837eb4 +Subproject commit c2dde89fb34e2734106e50689bf4127f6b0a288d From c05fbedd8d6eeb998af58fd947c5424caf797ebd Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 9 Nov 2015 02:08:59 -0500 Subject: [PATCH 02/15] Update external history-substring-search --- modules/history-substring-search/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/history-substring-search/external b/modules/history-substring-search/external index c4a83561..2c295432 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit c4a83561a12b898ff7145856d0e6ae50757e28ba +Subproject commit 2c295432175990c1bb4e90bc13f609daa67a25d6 From de9ed0610b1cc2c5aadc0eac8c59add0b2f6d118 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 9 Nov 2015 02:09:30 -0500 Subject: [PATCH 03/15] Update external syntax-highlighting --- modules/syntax-highlighting/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index 3dc57419..44e5323b 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit 3dc574190071ef59054f6d693132410b37aa3ae4 +Subproject commit 44e5323b53edd221a79a585869cf4833d555ba58 From 165879d4b30dbf90d436b02a73786a28519d9e93 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 9 Nov 2015 02:09:48 -0500 Subject: [PATCH 04/15] Update pure theme --- modules/prompt/external/pure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/pure b/modules/prompt/external/pure index 04212522..95e7fd7d 160000 --- a/modules/prompt/external/pure +++ b/modules/prompt/external/pure @@ -1 +1 @@ -Subproject commit 04212522f39f43998d001b4a94b05856f010a54b +Subproject commit 95e7fd7de7af9cf68678c31cac22b79816b44c90 From e641c2111a40e8f8e4ca581eba240b8457c2e7bb Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 11 Nov 2015 22:56:39 -0500 Subject: [PATCH 05/15] [Fix #940] Update agnoster theme remote URL --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index cb8f419e..a8a9e57a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/davidjrice/prezto_powerline.git [submodule "modules/prompt/external/agnoster"] path = modules/prompt/external/agnoster - url = https://gist.github.com/3712874.git + url = https://github.com/agnoster/agnoster-zsh-theme.git [submodule "modules/prompt/functions/pure"] path = modules/prompt/external/pure url = https://github.com/sindresorhus/pure.git From 02b3d329acdef10c145a1068e9f2a419d8104444 Mon Sep 17 00:00:00 2001 From: Ryan Brown Date: Thu, 9 Jul 2015 18:46:09 -0400 Subject: [PATCH 06/15] Fix typo in dnf module README --- modules/dnf/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dnf/README.md b/modules/dnf/README.md index 06439544..bbf1c923 100644 --- a/modules/dnf/README.md +++ b/modules/dnf/README.md @@ -15,7 +15,7 @@ Aliases - `dnfr` removes package(s). - `dnfs` searches for a package. - `dnfu` updates packages. - - `dnfU` upgrates packages. + - `dnfU` upgrades packages. Authors ------- From a7e4b447b3f5d3b31996d02c390745cf0f10cda1 Mon Sep 17 00:00:00 2001 From: "Ryan S. Brown" Date: Sat, 11 Jul 2015 15:53:23 -0400 Subject: [PATCH 07/15] Fix typo in yum module README --- modules/yum/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/yum/README.md b/modules/yum/README.md index 10383c56..fa944da8 100644 --- a/modules/yum/README.md +++ b/modules/yum/README.md @@ -15,7 +15,7 @@ Aliases - `yumr` removes package(s). - `yums` searches for a package. - `yumu` updates packages. - - `yumU` upgrates packages. + - `yumU` upgrades packages. Authors ------- From 2ad1b2f5b1f5997f9473b1f8705ab8d000d51600 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 21 Jul 2015 15:01:31 -0700 Subject: [PATCH 08/15] Load add-zsh-hook in GPG module Fixes this error: ~/.zprezto/modules/gpg/init.zsh:43: command not found: add-zsh-hook --- modules/gpg/init.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gpg/init.zsh b/modules/gpg/init.zsh index a7c6cf76..b969c7a5 100644 --- a/modules/gpg/init.zsh +++ b/modules/gpg/init.zsh @@ -30,6 +30,9 @@ export GPG_TTY="$(tty)" # Integrate with the SSH module. if grep 'enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then + # Load required functions. + autoload -Uz add-zsh-hook + # Override the ssh-agent environment file default path. _ssh_agent_env="$_gpg_agent_env" From 7227c4f0bef5f8ae787c65150d7a7403394fff48 Mon Sep 17 00:00:00 2001 From: Zach Riggle Date: Fri, 31 Jul 2015 16:00:17 -0400 Subject: [PATCH 09/15] Fix unarchive for .deb which uses xz, and absolute paths --- modules/archive/functions/unarchive | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/archive/functions/unarchive b/modules/archive/functions/unarchive index f1b4224a..72dfbd1f 100644 --- a/modules/archive/functions/unarchive +++ b/modules/archive/functions/unarchive @@ -8,6 +8,7 @@ local remove_archive local success local file_name +local file_path local extract_dir if (( $# == 0 )); then @@ -36,6 +37,7 @@ while (( $# > 0 )); do success=0 file_name="${1:t}" + file_path="${1:A}" extract_dir="${file_name:r}" case "$1:l" in (*.tar.gz|*.tgz) tar xvzf "$1" ;; @@ -60,10 +62,10 @@ while (( $# > 0 )); do (*.deb) mkdir -p "$extract_dir/control" mkdir -p "$extract_dir/data" - cd "$extract_dir"; ar vx "../${1}" > /dev/null - cd control; tar xzvf ../control.tar.gz - cd ../data; tar xzvf ../data.tar.gz - cd ..; rm *.tar.gz debian-binary + cd "$extract_dir"; ar vx "${file_path}" > /dev/null + cd control; tar xvf ../control.tar.* + cd ../data; tar xvf ../data.tar.* + cd ..; rm control.tar.* data.tar.* debian-binary cd .. ;; (*) From 64aa907087e0f7aff5f499d8ccebc6526f8870f0 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 28 Feb 2016 22:31:21 -0500 Subject: [PATCH 10/15] Update external completions --- modules/completion/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/completion/external b/modules/completion/external index c2dde89f..3a2bb878 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit c2dde89fb34e2734106e50689bf4127f6b0a288d +Subproject commit 3a2bb8781d32d05d1bf05deeeb476beb651e8272 From e36eed9c8a55d687ccb7b0b91bd9d2bee9854ac2 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 28 Feb 2016 22:31:46 -0500 Subject: [PATCH 11/15] Update external history-substring-search --- modules/history-substring-search/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/history-substring-search/external b/modules/history-substring-search/external index 2c295432..7a4b54b7 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit 2c295432175990c1bb4e90bc13f609daa67a25d6 +Subproject commit 7a4b54b708ab88e0421097614f1acaa7a973c795 From 38baf39513ff76379931db5bee0f2db2b8b0e93c Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 28 Feb 2016 22:32:12 -0500 Subject: [PATCH 12/15] Update external syntax-highlighting --- modules/syntax-highlighting/external | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index 44e5323b..7044c198 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit 44e5323b53edd221a79a585869cf4833d555ba58 +Subproject commit 7044c1986e2f6b15eec27a03651207fccb0a2fbe From 8bd720b0c7076745aaf23d0e4a13b96bf6d44c68 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 28 Feb 2016 22:32:40 -0500 Subject: [PATCH 13/15] Update pure theme --- modules/prompt/external/pure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/external/pure b/modules/prompt/external/pure index 95e7fd7d..fb4c37da 160000 --- a/modules/prompt/external/pure +++ b/modules/prompt/external/pure @@ -1 +1 @@ -Subproject commit 95e7fd7de7af9cf68678c31cac22b79816b44c90 +Subproject commit fb4c37dad3c5cbdebca61a8ff5545397c11d450f From c8b8397728ee9ed19315f96aa2f149a4a4a183b2 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 2 Mar 2016 16:31:30 -0500 Subject: [PATCH 14/15] [Fix #532] Integrate autosuggestions --- .gitmodules | 3 ++ modules/README.md | 5 +++ modules/autosuggestions/README.md | 53 +++++++++++++++++++++++++++++++ modules/autosuggestions/external | 1 + modules/autosuggestions/init.zsh | 35 ++++++++++++++++++++ runcoms/zpreztorc | 7 ++++ 6 files changed, 104 insertions(+) create mode 100644 modules/autosuggestions/README.md create mode 160000 modules/autosuggestions/external create mode 100644 modules/autosuggestions/init.zsh diff --git a/.gitmodules b/.gitmodules index a8a9e57a..518a2795 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "modules/prompt/functions/pure"] path = modules/prompt/external/pure url = https://github.com/sindresorhus/pure.git +[submodule "modules/autosuggestions/external"] + path = modules/autosuggestions/external + url = https://github.com/tarruda/zsh-autosuggestions diff --git a/modules/README.md b/modules/README.md index 2a49804c..db851f36 100644 --- a/modules/README.md +++ b/modules/README.md @@ -10,6 +10,11 @@ Archive Provides functions to list and extract archives. +Autosuggestions +--------------- + +Integrates zsh-autosuggestions into Prezto. + Command-Not-Found ----------------- diff --git a/modules/autosuggestions/README.md b/modules/autosuggestions/README.md new file mode 100644 index 00000000..70243798 --- /dev/null +++ b/modules/autosuggestions/README.md @@ -0,0 +1,53 @@ +Autosuggestions +--------------- + +Integrates zsh-autosuggestions into Prezto. + +Autosuggestions +=============== + +Integrates [zsh-autosuggestions][1] into Prezto, which implements the +[Fish shell][2]'s autosuggestions feature, where the user can type in any part +of a previously entered command and Zsh suggests commands as you type based on +history and completions. + +If this module is used in conjuncture with the *syntax-highlighting* module, it +must be loaded **after** it. + +If this module is used in conjuncture with the *history-substring-search* +module, it must be loaded **after** it. + +Contributors +------------ + +New features and bug fixes should be submitted to the [zsh-autosuggestions][1] +project according to its rules and regulations. This module will be synchronized +against it. + +Settings +-------- + +### Highlighting + +If colors are enabled, *autosuggestions* will automatically highlight +positive results. + +To enable highlighting for this module only, add the following line to +*zpreztorc*: + + zstyle ':prezto:module:autosuggestions' color 'yes' + +To set the query found color, add the following line to *zpreztorc*: + + zstyle ':prezto:module:autosuggestions:color' found '' + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][3].* + + - [Sorin Ionescu](https://github.com/sorin-ionescu) + +[1]: https://github.com/tarruda/zsh-autosuggestions +[2]: http://fishshell.com +[3]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/autosuggestions/external b/modules/autosuggestions/external new file mode 160000 index 00000000..f0a74557 --- /dev/null +++ b/modules/autosuggestions/external @@ -0,0 +1 @@ +Subproject commit f0a745576ff69fa608421ee7214d4cd77b43e62f diff --git a/modules/autosuggestions/init.zsh b/modules/autosuggestions/init.zsh new file mode 100644 index 00000000..a3a772e5 --- /dev/null +++ b/modules/autosuggestions/init.zsh @@ -0,0 +1,35 @@ +# +# Integrates zsh-autosuggestions into Prezto. +# +# Authors: +# Sorin Ionescu +# + +# Load dependencies. +pmodload 'editor' + +# Source module files. +source "${0:h}/external/zsh-autosuggestions.zsh" || return 1 + +# +# Highlighting +# + +# Set highlight color, default 'fg=8'. +zstyle -s ':prezto:module:autosuggestions:color' found \ + 'ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE' || ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8' + +# Disable highlighting. +if ! zstyle -t ':prezto:module:autosuggestions' color; then + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='' +fi + +# +# Key Bindings +# + +if [[ -n "$key_info" ]]; then + # vi + bindkey -M viins "$key_info[Control]F" vi-forward-word + bindkey -M viins "$key_info[Control]E" vi-add-eol +fi diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 4778944c..1b418df1 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -34,6 +34,13 @@ zstyle ':prezto:load' pmodule \ 'completion' \ 'prompt' +# +# Autosuggestions +# + +# Set the query found color. +# zstyle ':prezto:module:autosuggestions:color' found '' + # # Editor # From 4f19700919c8ebbaf75755fc0d03716d13183f49 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 2 Mar 2016 23:29:51 -0500 Subject: [PATCH 15/15] Add missing syntax highlighter --- runcoms/zpreztorc | 1 + 1 file changed, 1 insertion(+) diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 1b418df1..e93ac6bf 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -128,6 +128,7 @@ zstyle ':prezto:module:prompt' theme 'sorin' # 'main' \ # 'brackets' \ # 'pattern' \ +# 'line' \ # 'cursor' \ # 'root' #