From e18f18af92bbe6d5a89cbb86dc43b9012c57a70d Mon Sep 17 00:00:00 2001 From: Daniel Renninghoff Date: Tue, 1 Oct 2013 16:06:57 +0200 Subject: [PATCH 01/37] Support command-not-found on Arch Linux Signed-off-by: Sorin Ionescu --- modules/command-not-found/README.md | 3 ++- modules/command-not-found/init.zsh | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/command-not-found/README.md b/modules/command-not-found/README.md index 91a67f25c5..691806a427 100644 --- a/modules/command-not-found/README.md +++ b/modules/command-not-found/README.md @@ -1,7 +1,8 @@ Command-Not-Found ================= -Loads the [command-not-found][1] tool on Debian-based distributions. +Displays installation information for not found commands by loading the +[command-not-found][1] tool on Debian-based and Arch Linux-based distributions. Authors ------- diff --git a/modules/command-not-found/init.zsh b/modules/command-not-found/init.zsh index 7b554e86ac..c4d1b9f9ee 100644 --- a/modules/command-not-found/init.zsh +++ b/modules/command-not-found/init.zsh @@ -5,10 +5,14 @@ # Joseph Jon Booker # +# Load command-not-found on Debian-based distributions. +if [[ -s '/etc/zsh_command_not_found' ]]; then + source '/etc/zsh_command_not_found' +# Load command-not-found on Arch Linux-based distributions. +elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then + source '/usr/share/doc/pkgfile/command-not-found.zsh' # Return if requirements are not found. -if [[ ! -s '/etc/zsh_command_not_found' ]]; then +else return 1 fi -source '/etc/zsh_command_not_found' - From 1c6a01664463452edb9d1d83e4e291e4ff9071f3 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Mon, 14 Oct 2013 11:12:34 +0200 Subject: [PATCH 02/37] Add Ocaml module Manage local Ocaml modules with OPAM. Signed-off-by: Sorin Ionescu --- modules/README.md | 5 +++++ modules/ocaml/README.md | 28 ++++++++++++++++++++++++++++ modules/ocaml/init.zsh | 15 +++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 modules/ocaml/README.md create mode 100644 modules/ocaml/init.zsh diff --git a/modules/README.md b/modules/README.md index 63484e4ca7..3886dfc985 100644 --- a/modules/README.md +++ b/modules/README.md @@ -86,6 +86,11 @@ Node.js Provides utility functions for Node.js and loads npm completion. +Ocaml +----- + +Initializes Ocaml package management. + OSX --- diff --git a/modules/ocaml/README.md b/modules/ocaml/README.md new file mode 100644 index 0000000000..7d56fec8a5 --- /dev/null +++ b/modules/ocaml/README.md @@ -0,0 +1,28 @@ +Ocaml +===== + +Initializes [Ocaml][1] package management. + +OPAM +---- + +[OPAM][2] is a package manager for Ocaml. + +This module enables local package installation with OPAM by extending the +relevant path and Ocaml variables. + +### Usage + +Install packages to your local package directory with `opam install`. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][3].* + + - [Sebastian Wiesner](https://github.com/lunaryorn) + +[1]: http://ocaml.org/ +[2]: http://opam.ocamlpro.com/ +[3]: https://github.com/sorin-ionescu/prezto/issues + diff --git a/modules/ocaml/init.zsh b/modules/ocaml/init.zsh new file mode 100644 index 0000000000..2e5b71e552 --- /dev/null +++ b/modules/ocaml/init.zsh @@ -0,0 +1,15 @@ +# +# Initializes Ocaml package management. +# +# Authors: +# Sebastian Wiesner +# + +# Return if requirements are not found. +if (( ! $+commands[opam] )); then + return 1 +fi + +# Initialize OPAM. +eval "$(opam config env)" + From 28e956691ca727ab4ae1bdbf73cc631a9f905527 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 17 Nov 2013 15:58:53 -0500 Subject: [PATCH 03/37] Add and update module descriptions --- modules/README.md | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/modules/README.md b/modules/README.md index 3886dfc985..42583980d0 100644 --- a/modules/README.md +++ b/modules/README.md @@ -31,6 +31,16 @@ Dpkg Defines dpkg aliases and functions. +Editor +------ + +Sets key bindings. + +Emacs +----- + +Enables Emacs dependency management. + Environment ----------- @@ -41,13 +51,19 @@ Fasd Maintains a frequently used file and directory list for fast access. +Git +--- + +Enhances the Git distributed version control system by providing aliases, +functions and by exposing repository status information to prompts. + GNU Utility ----------- Provides for the interactive use of GNU utilities on non-GNU systems. GPG ---------- +--- Provides for an easier use of GPG by setting up gpg-agent. @@ -61,16 +77,16 @@ Helper Provides helper functions for developing modules. -History Substring Search ------------------------- - -Integrates zsh-history-substring-search into Prezto. - History ------- Sets history options and defines history aliases. +History Substring Search +------------------------ + +Integrates zsh-history-substring-search into Prezto. + Homebrew -------- @@ -142,10 +158,10 @@ Spectrum Provides for easier use of 256 colors and effects. -SSH-Agent ---------- +SSH +--- -Provides for an easier use of ssh-agent. +Provides for an easier use of SSH by setting up ssh-agent. Syntax Highlighting ------------------- From 8993a8dfadd2e090758bf41977938e91becc264e Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 20 Nov 2013 09:43:36 -0500 Subject: [PATCH 04/37] Bump minimum supported Zsh to v4.3.11 --- README.md | 2 +- init.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 326b735474..494a3a2bd7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Installation ------------ Prezto will work with any recent release of Zsh, but the minimum recommended -version is 4.3.10. +version is 4.3.11. 1. Launch Zsh: diff --git a/init.zsh b/init.zsh index fc12297c6f..fde7bcd33b 100644 --- a/init.zsh +++ b/init.zsh @@ -10,7 +10,7 @@ # # Check for the minimum supported version. -min_zsh_version='4.3.10' +min_zsh_version='4.3.11' if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then print "prezto: old shell detected, minimum required: $min_zsh_version" >&2 return 1 From 3a5fff9c6d8e62032f0173476aed73afcd00578e Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 23 Nov 2013 04:23:56 -0800 Subject: [PATCH 05/37] Don't override customized environments in subshells Only set up environment for the top-level shell, and allow it to be inherited normally. A top level shell is usually a login shell, but can also be a non-interactive, non-login shell in certain cases, such as when executing an SSH remote command. Signed-off-by: Sorin Ionescu --- runcoms/zprofile | 69 +++++++++++++++++++++++++++++++++++++++++++++++ runcoms/zshenv | 70 +++--------------------------------------------- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/runcoms/zprofile b/runcoms/zprofile index 2a3d07e6b1..642a5c74d7 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -5,3 +5,72 @@ # Sorin Ionescu # +# +# Browser +# + +if [[ "$OSTYPE" == darwin* ]]; then + export BROWSER='open' +fi + +# +# Editors +# + +export EDITOR='nano' +export VISUAL='nano' +export PAGER='less' + +# +# Language +# + +if [[ -z "$LANG" ]]; then + export LANG='en_US.UTF-8' +fi + +# +# Paths +# + +typeset -gU cdpath fpath mailpath path + +# Set the the list of directories that cd searches. +# cdpath=( +# $cdpath +# ) + +# Set the list of directories that Zsh searches for programs. +path=( + /usr/local/{bin,sbin} + $path +) + +# +# Less +# + +# Set the default Less options. +# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). +# Remove -X and -F (exit if the content fits on one screen) to enable it. +export LESS='-F -g -i -M -R -S -w -X -z-4' + +# Set the Less input preprocessor. +if (( $+commands[lesspipe.sh] )); then + export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-' +fi + +# +# Temporary Files +# + +if [[ ! -d "$TMPDIR" ]]; then + export TMPDIR="/tmp/$USER" + mkdir -p -m 700 "$TMPDIR" +fi + +TMPPREFIX="${TMPDIR%/}/zsh" +if [[ ! -d "$TMPPREFIX" ]]; then + mkdir -p "$TMPPREFIX" +fi + diff --git a/runcoms/zshenv b/runcoms/zshenv index 9ff39e0675..7b121203b0 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -5,72 +5,8 @@ # Sorin Ionescu # -# -# Browser -# - -if [[ "$OSTYPE" == darwin* ]]; then - export BROWSER='open' -fi - -# -# Editors -# - -export EDITOR='nano' -export VISUAL='nano' -export PAGER='less' - -# -# Language -# - -if [[ -z "$LANG" ]]; then - export LANG='en_US.UTF-8' -fi - -# -# Paths -# - -typeset -gU cdpath fpath mailpath path - -# Set the the list of directories that cd searches. -# cdpath=( -# $cdpath -# ) - -# Set the list of directories that Zsh searches for programs. -path=( - /usr/local/{bin,sbin} - $path -) - -# -# Less -# - -# Set the default Less options. -# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). -# Remove -X and -F (exit if the content fits on one screen) to enable it. -export LESS='-F -g -i -M -R -S -w -X -z-4' - -# Set the Less input preprocessor. -if (( $+commands[lesspipe.sh] )); then - export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-' -fi - -# -# Temporary Files -# - -if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$USER" - mkdir -p -m 700 "$TMPDIR" -fi - -TMPPREFIX="${TMPDIR%/}/zsh" -if [[ ! -d "$TMPPREFIX" ]]; then - mkdir -p "$TMPPREFIX" +# Ensure that a non-login, non-interactive shell has a defined environment. +if [[ "$SHLVL" -eq 1 && ! -o LOGIN ]]; then + source "${ZDOTDIR:-$HOME}/.zprofile" fi From cc4a58bee331e44d3ef69e9b0eb43dea45267f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Str=C3=B6mberg?= Date: Sun, 24 Nov 2013 03:14:23 +0100 Subject: [PATCH 06/37] Add Rails 4 bin path --- modules/rails/init.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/rails/init.zsh b/modules/rails/init.zsh index e51185bb8c..4ddbd1b9d4 100644 --- a/modules/rails/init.zsh +++ b/modules/rails/init.zsh @@ -38,6 +38,8 @@ alias rorx='_rails-command destroy' function _rails-command { if [[ -e "script/server" ]]; then ruby script/"$@" + elif [[ -e "bin/rails" ]]; then + ruby bin/rails "$@" else ruby script/rails "$@" fi From 5cfe250e522ced205ef20989a892d65e82c7e2c4 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 25 Nov 2013 16:11:08 -0500 Subject: [PATCH 07/37] Rewrite _rails-command to work from app subdirectories --- modules/rails/init.zsh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/modules/rails/init.zsh b/modules/rails/init.zsh index 4ddbd1b9d4..69f5b8863b 100644 --- a/modules/rails/init.zsh +++ b/modules/rails/init.zsh @@ -36,12 +36,27 @@ alias rorx='_rails-command destroy' # function _rails-command { - if [[ -e "script/server" ]]; then - ruby script/"$@" - elif [[ -e "bin/rails" ]]; then - ruby bin/rails "$@" + local root_dir="$PWD" + local rails_cmd + + while [[ "$root_dir" != '/' ]]; do + if [[ -d "$root_dir/.bundle" ]]; then + break + fi + root_dir="$root_dir:h" + done + + if [[ -e "$root_dir/bin/rails" ]]; then + rails_cmd='bin/rails' + elif [[ -e "$root_dir/script/rails" ]]; then + rails_cmd='script/rails' + elif [[ -e "$root_dir/script/server" ]]; then + rails_cmd='script/' else - ruby script/rails "$@" + print "$0: not inside of a Rails application: $PWD" >&2 + return 1 fi + + (cd "$root_dir" && ruby "$rails_cmd" "$@") } From b159ddb02ba9a630e2aa3ff29b3d5d4dace17705 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 25 Nov 2013 16:32:45 -0500 Subject: [PATCH 08/37] Do not specify a bundler install path --- modules/ruby/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index 1f748098e6..6bf1ea5315 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -44,7 +44,7 @@ alias rb='ruby' if (( $+commands[bundle] )); then alias rbb='bundle' alias rbbe='rbb exec' - alias rbbi='rbb install --path vendor/bundle' + alias rbbi='rbb install' alias rbbl='rbb list' alias rbbo='rbb open' alias rbbp='rbb package' From 52ea7152ad7ae4892dcf7e3b316b236786ba987b Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 25 Nov 2013 16:34:11 -0500 Subject: [PATCH 09/37] Git ignore bundler vendor/assets --- modules/ruby/init.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index 6bf1ea5315..e3238550f2 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -52,6 +52,8 @@ if (( $+commands[bundle] )); then alias rbbI='rbbi \ && rbb package \ && print .bundle >>! .gitignore \ + && print vendor/assets >>! .gitignore \ && print vendor/bundle >>! .gitignore \ && print vendor/cache >>! .gitignore' fi + From 76fc07ba9faa12419496ed77b380c102538f3bb3 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 25 Nov 2013 18:16:36 -0500 Subject: [PATCH 10/37] Comment a typeset --- runcoms/zprofile | 1 + 1 file changed, 1 insertion(+) diff --git a/runcoms/zprofile b/runcoms/zprofile index 642a5c74d7..7118770cde 100644 --- a/runcoms/zprofile +++ b/runcoms/zprofile @@ -33,6 +33,7 @@ fi # Paths # +# Ensure path arrays do not contain duplicates. typeset -gU cdpath fpath mailpath path # Set the the list of directories that cd searches. From d87761773426d63f442d48c669a49a54151a1c99 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 28 Feb 2013 19:22:16 -0500 Subject: [PATCH 11/37] [Fix #362, Fix #384] Set Mac OS X 10.6 terminal window title --- modules/terminal/init.zsh | 44 +++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index dc78a3bec0..e21aeb5871 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -39,14 +39,13 @@ function set-terminal-tab-title { fi } +# Sets the Terminal.app current working directory. +function set-terminal-app-cwd { + printf '\e]7;%s\a' "file://$HOST${PWD// /%20}" +} + # Sets the tab and window titles with a given command. function set-titles-with-command { - # Do not set the window and tab titles in Terminal.app because they are not - # reset upon command termination. - if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then - return 1 - fi - emulate -L zsh setopt EXTENDED_GLOB @@ -85,26 +84,35 @@ function set-titles-with-path { setopt EXTENDED_GLOB local absolute_path="${${1:a}:-$PWD}" + local abbreviated_path="${absolute_path/#$HOME/~}" + local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}" + unset MATCH - if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then - printf '\e]7;%s\a' "file://$HOST${absolute_path// /%20}" + if [[ "$TERM" == screen* ]]; then + set-screen-window-title "$truncated_path" else - local abbreviated_path="${absolute_path/#$HOME/~}" - local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}" - unset MATCH - - if [[ "$TERM" == screen* ]]; then - set-screen-window-title "$truncated_path" - else - set-terminal-window-title "$abbreviated_path" - set-terminal-tab-title "$truncated_path" - fi + set-terminal-window-title "$abbreviated_path" + set-terminal-tab-title "$truncated_path" fi } # Don't override precmd/preexec; append to hook array. autoload -Uz add-zsh-hook +if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then + # Sets the Terminal.app current working directory. + add-zsh-hook precmd set-terminal-app-cwd + + # Do not set the tab and window titles in Terminal.app since it sets the tab + # title to the currently running process by default and the current working + # directory is set separately. + + # Do set the tab and window titles inside terminal multiplexers. + if [[ "$TERM" != screen* ]]; then + return + fi +fi + # Sets the tab and window titles before the prompt is displayed. function set-titles-precmd { if zstyle -t ':prezto:module:terminal' auto-title; then From f6bd76a90be8ad5077dc70e7291e55889f6cc6cb Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 20 Aug 2013 11:22:47 -0400 Subject: [PATCH 12/37] Remove unused GNU Screen window number format --- modules/terminal/init.zsh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index e21aeb5871..c5b9dd3d59 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -11,13 +11,6 @@ if [[ "$TERM" == 'dumb' ]]; then return 1 fi -# Set the GNU Screen window number. -if [[ -n "$WINDOW" ]]; then - export SCREEN_NO="%B${WINDOW}%b " -else - export SCREEN_NO="" -fi - # Sets the GNU Screen title. function set-screen-window-title { if [[ "$TERM" == screen* ]]; then From b98c7469e5026c55efa48cdacd4923ca54e8b098 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Mon, 26 Aug 2013 12:12:44 -0400 Subject: [PATCH 13/37] Rewrite terminal auto-title --- modules/helper/README.md | 2 ++ modules/helper/init.zsh | 5 +++ modules/terminal/README.md | 9 +++-- modules/terminal/init.zsh | 72 ++++++++++++++++++++++++-------------- runcoms/zpreztorc | 8 +++-- 5 files changed, 64 insertions(+), 32 deletions(-) diff --git a/modules/helper/README.md b/modules/helper/README.md index b010b00539..7cafc2c690 100644 --- a/modules/helper/README.md +++ b/modules/helper/README.md @@ -11,6 +11,8 @@ Functions - `is-autoloadable` checks if a file can be autoloaded by trying to load it in a subshell. - `is-callable` checks if a name is a command, function, or alias. + - `is-terminal-inside-multiplexer` checks if the currently running terminal is + inside a terminal multiplexer. - `is-true` checks a boolean variable for "true". - `coalesce` prints the first non-empty string in the arguments array. diff --git a/modules/helper/init.zsh b/modules/helper/init.zsh index 7e0f9d574e..b7a89aeb54 100644 --- a/modules/helper/init.zsh +++ b/modules/helper/init.zsh @@ -21,6 +21,11 @@ function is-true { [[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]] } +# Checks if the currently running terminal is inside a terminal multiplexer. +function is-terminal-inside-multiplexer { + [[ -n "$STY" || -n "$TMUX" || -n "$DVTM" ]] +} + # Prints the first non-empty string in the arguments array. function coalesce { for arg in $argv; do diff --git a/modules/terminal/README.md b/modules/terminal/README.md index f1256c69e2..c1158b1c6a 100644 --- a/modules/terminal/README.md +++ b/modules/terminal/README.md @@ -8,10 +8,15 @@ Settings ### Auto-Title -To auto set the terminal window and tab titles with the current command or +To auto set the terminal emulator window and tab titles with the current command +or directory, add the following to *zpreztorc*: + + zstyle ':prezto:module:terminal:auto-title' emulator 'yes' + +To auto set the terminal multiplexer window title with the current command or directory, add the following to *zpreztorc*: - zstyle ':prezto:module:terminal' auto-title 'yes' + zstyle ':prezto:module:terminal:auto-title' multiplexer 'yes' Functions --------- diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index c5b9dd3d59..8c46eb008a 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -6,6 +6,9 @@ # Sorin Ionescu # +# Load dependencies. +pmodload 'helper' + # Return if requirements are not found. if [[ "$TERM" == 'dumb' ]]; then return 1 @@ -20,21 +23,23 @@ function set-screen-window-title { # Sets the terminal window title. function set-terminal-window-title { - if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]; then + if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*|dvtm*) ]]; then printf "\e]2;%s\a" ${(V)argv} fi } # Sets the terminal tab title. function set-terminal-tab-title { - if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*) ]]; then + if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*|dvtm*) ]]; then printf "\e]1;%s\a" ${(V)argv} fi } # Sets the Terminal.app current working directory. function set-terminal-app-cwd { - printf '\e]7;%s\a' "file://$HOST${PWD// /%20}" + if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then + printf '\e]7;%s\a' "file://$HOST${${1:-$PWD}// /%20}" + fi } # Sets the tab and window titles with a given command. @@ -89,36 +94,49 @@ function set-titles-with-path { fi } -# Don't override precmd/preexec; append to hook array. +# Do not override precmd/preexec; append to the hook array. autoload -Uz add-zsh-hook -if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then - # Sets the Terminal.app current working directory. +# Set up the Apple Terminal. +if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] \ + && (( ${${OSTYPE#darwin}[1,2]} >= 11 )) \ + && ! is-terminal-inside-multiplexer +then + # Sets the Terminal.app current working directory before the prompt is + # displayed. add-zsh-hook precmd set-terminal-app-cwd + # Unsets the Terminal.app current working directory when a terminal + # multiplexer or remote connection is started since it can no longer be + # updated, and it becomes confusing when the directory displayed in the title + # bar is no longer synchronized with real current working directory. + function unset-terminal-app-cwd { + if [[ "${2[(w)1]:t}" == (screen|tmux|dvtm|ssh|mosh) ]]; then + set-terminal-app-cwd ' ' + fi + } + add-zsh-hook preexec unset-terminal-app-cwd + # Do not set the tab and window titles in Terminal.app since it sets the tab # title to the currently running process by default and the current working - # directory is set separately. - - # Do set the tab and window titles inside terminal multiplexers. - if [[ "$TERM" != screen* ]]; then - return - fi + # directory is set separately, but do set the tab and window titles inside + # terminal multiplexers inside Terminal.app. + return fi -# Sets the tab and window titles before the prompt is displayed. -function set-titles-precmd { - if zstyle -t ':prezto:module:terminal' auto-title; then - set-titles-with-path - fi -} -add-zsh-hook precmd set-titles-precmd - -# Sets the tab and window titles before command execution. -function set-titles-preexec { - if zstyle -t ':prezto:module:terminal' auto-title; then - set-titles-with-command "$2" - fi -} -add-zsh-hook preexec set-titles-preexec +# Set up non-Apple terminals. +if ( ( ! is-terminal-inside-multiplexer || [[ -n "$DVTM" ]] ) \ + && zstyle -t ':prezto:module:terminal:auto-title' emulator ) \ + || ( is-terminal-inside-multiplexer \ + && zstyle -t ':prezto:module:terminal:auto-title' multiplexer ) +then + # Sets the tab and window titles before the prompt is displayed. + add-zsh-hook precmd set-titles-with-path + + # Sets the tab and window titles before command execution. + function set-titles-with-command-preexec { + set-titles-with-command "$2" + } + add-zsh-hook preexec set-titles-with-command-preexec +fi diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 8cdb163bb9..0fde4bd4c2 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -122,14 +122,16 @@ zstyle ':prezto:module:prompt' theme 'sorin' # 'builtin' 'bg=blue' \ # 'command' 'bg=blue' \ # 'function' 'bg=blue' -# # # Terminal # -# Auto set the tab and window titles. -zstyle ':prezto:module:terminal' auto-title 'yes' +# Auto set the terminal emulator tab and window titles. +zstyle ':prezto:module:terminal:auto-title' emulator 'yes' + +# Auto set the terminal multiplexer window title. +zstyle ':prezto:module:terminal:auto-title' multiplexer 'no' # # Tmux From 5b4dcea595371bcf9c1018156c4a085d67c9b929 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 27 Aug 2013 15:53:49 -0400 Subject: [PATCH 14/37] Simplify auto-titling --- modules/helper/README.md | 2 - modules/helper/init.zsh | 5 --- modules/terminal/README.md | 22 ++++------ modules/terminal/init.zsh | 86 +++++++++++++------------------------- runcoms/zpreztorc | 7 +--- 5 files changed, 39 insertions(+), 83 deletions(-) diff --git a/modules/helper/README.md b/modules/helper/README.md index 7cafc2c690..b010b00539 100644 --- a/modules/helper/README.md +++ b/modules/helper/README.md @@ -11,8 +11,6 @@ Functions - `is-autoloadable` checks if a file can be autoloaded by trying to load it in a subshell. - `is-callable` checks if a name is a command, function, or alias. - - `is-terminal-inside-multiplexer` checks if the currently running terminal is - inside a terminal multiplexer. - `is-true` checks a boolean variable for "true". - `coalesce` prints the first non-empty string in the arguments array. diff --git a/modules/helper/init.zsh b/modules/helper/init.zsh index b7a89aeb54..7e0f9d574e 100644 --- a/modules/helper/init.zsh +++ b/modules/helper/init.zsh @@ -21,11 +21,6 @@ function is-true { [[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]] } -# Checks if the currently running terminal is inside a terminal multiplexer. -function is-terminal-inside-multiplexer { - [[ -n "$STY" || -n "$TMUX" || -n "$DVTM" ]] -} - # Prints the first non-empty string in the arguments array. function coalesce { for arg in $argv; do diff --git a/modules/terminal/README.md b/modules/terminal/README.md index c1158b1c6a..76ce1c74d1 100644 --- a/modules/terminal/README.md +++ b/modules/terminal/README.md @@ -8,32 +8,26 @@ Settings ### Auto-Title -To auto set the terminal emulator window and tab titles with the current command -or directory, add the following to *zpreztorc*: - - zstyle ':prezto:module:terminal:auto-title' emulator 'yes' - -To auto set the terminal multiplexer window title with the current command or +To auto set the terminal window and tab titles with the current command or directory, add the following to *zpreztorc*: - zstyle ':prezto:module:terminal:auto-title' multiplexer 'yes' + zstyle ':prezto:module:terminal' auto-title 'yes' + +Auto titling is disabled inside terminal multiplexers, except inside dvtm, since +it interferes with window names defined in configuration files and profile +managers. Functions --------- -- `set-screen-window-title` sets the screen title. -- `set-terminal-tab-title` sets the terminal tab title. -- `set-terminal-window-title` sets the terminal window title. -- `set-titles-with-command` sets the screen and terminal titles with - a given command. -- `set-titles-with-path` sets the screen and terminal titles with a given path. +- `set-tab-title` sets the terminal tab title. +- `set-window-title` sets the terminal or terminal multiplexer window title. Authors ------- *The authors of this module should be contacted via the [issue tracker][1].* - - [James Cox](https://github.com/imajes) - [Sorin Ionescu](https://github.com/sorin-ionescu) [1]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index 8c46eb008a..b722a67f9d 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -2,82 +2,60 @@ # Sets terminal window and tab titles. # # Authors: -# James Cox # Sorin Ionescu # -# Load dependencies. -pmodload 'helper' - # Return if requirements are not found. if [[ "$TERM" == 'dumb' ]]; then return 1 fi -# Sets the GNU Screen title. -function set-screen-window-title { +# Sets the terminal or terminal multiplexer window title. +function set-window-title { if [[ "$TERM" == screen* ]]; then printf "\ek%s\e\\" ${(V)argv} - fi -} - -# Sets the terminal window title. -function set-terminal-window-title { - if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*|dvtm*) ]]; then + else printf "\e]2;%s\a" ${(V)argv} fi } # Sets the terminal tab title. -function set-terminal-tab-title { - if [[ "$TERM" == ((x|a|ml|dt|E)term*|(u|)rxvt*|dvtm*) ]]; then - printf "\e]1;%s\a" ${(V)argv} - fi -} - -# Sets the Terminal.app current working directory. -function set-terminal-app-cwd { - if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then - printf '\e]7;%s\a' "file://$HOST${${1:-$PWD}// /%20}" - fi +function set-tab-title { + printf "\e]1;%s\a" ${(V)argv} } # Sets the tab and window titles with a given command. -function set-titles-with-command { +function set-titles-with-command-preexec { emulate -L zsh setopt EXTENDED_GLOB # Get the command name that is under job control. - if [[ "${1[(w)1]}" == (fg|%*)(\;|) ]]; then + if [[ "${2[(w)1]}" == (fg|%*)(\;|) ]]; then # Get the job name, and, if missing, set it to the default %+. - local job_name="${${1[(wr)%*(\;|)]}:-%+}" + local job_name="${${2[(wr)%*(\;|)]}:-%+}" # Make a local copy for use in the subshell. local -A jobtexts_from_parent_shell jobtexts_from_parent_shell=(${(kv)jobtexts}) - jobs $job_name 2>/dev/null > >( + jobs "$job_name" 2>/dev/null > >( read index discarded # The index is already surrounded by brackets: [1]. set-titles-with-command "${(e):-\$jobtexts_from_parent_shell$index}" ) else # Set the command name, or in the case of sudo or ssh, the next command. - local cmd=${${1[(wr)^(*=*|sudo|ssh|-*)]}:t} + local cmd="${${2[(wr)^(*=*|sudo|ssh|-*)]}:t}" local truncated_cmd="${cmd/(#m)?(#c15,)/${MATCH[1,12]}...}" unset MATCH - if [[ "$TERM" == screen* ]]; then - set-screen-window-title "$truncated_cmd" - else - set-terminal-window-title "$cmd" - set-terminal-tab-title "$truncated_cmd" - fi + set-window-title "$cmd" + set-tab-title "$truncated_cmd" fi } # Sets the tab and window titles with a given path. -function set-titles-with-path { +function set-titles-with-path-precmd { emulate -L zsh setopt EXTENDED_GLOB @@ -86,12 +64,13 @@ function set-titles-with-path { local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}" unset MATCH - if [[ "$TERM" == screen* ]]; then - set-screen-window-title "$truncated_path" - else - set-terminal-window-title "$abbreviated_path" - set-terminal-tab-title "$truncated_path" - fi + set-window-title "$abbreviated_path" + set-tab-title "$truncated_path" +} + +# Sets the Terminal.app proxy icon. +function set-terminal-app-proxy-icon-precmd { + printf '\e]7;%s\a' "file://$HOST${${1:-$PWD}// /%20}" } # Do not override precmd/preexec; append to the hook array. @@ -99,44 +78,37 @@ autoload -Uz add-zsh-hook # Set up the Apple Terminal. if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] \ - && (( ${${OSTYPE#darwin}[1,2]} >= 11 )) \ - && ! is-terminal-inside-multiplexer + && ( ! [[ -n "$STY" || -n "$TMUX" || -n "$DVTM" ]] ) then # Sets the Terminal.app current working directory before the prompt is # displayed. - add-zsh-hook precmd set-terminal-app-cwd + add-zsh-hook precmd set-terminal-app-proxy-icon-precmd # Unsets the Terminal.app current working directory when a terminal # multiplexer or remote connection is started since it can no longer be # updated, and it becomes confusing when the directory displayed in the title # bar is no longer synchronized with real current working directory. - function unset-terminal-app-cwd { + function unset-terminal-app-proxy-icon-preexec { if [[ "${2[(w)1]:t}" == (screen|tmux|dvtm|ssh|mosh) ]]; then - set-terminal-app-cwd ' ' + set-terminal-app-proxy-icon-precmd ' ' fi } - add-zsh-hook preexec unset-terminal-app-cwd + add-zsh-hook preexec unset-terminal-app-cwd-preexec # Do not set the tab and window titles in Terminal.app since it sets the tab # title to the currently running process by default and the current working - # directory is set separately, but do set the tab and window titles inside - # terminal multiplexers inside Terminal.app. + # directory is set separately. return fi # Set up non-Apple terminals. -if ( ( ! is-terminal-inside-multiplexer || [[ -n "$DVTM" ]] ) \ - && zstyle -t ':prezto:module:terminal:auto-title' emulator ) \ - || ( is-terminal-inside-multiplexer \ - && zstyle -t ':prezto:module:terminal:auto-title' multiplexer ) +if zstyle -t ':prezto:module:terminal' auto-title \ + && ( ! [[ -n "$STY" || -n "$TMUX" ]] ) then # Sets the tab and window titles before the prompt is displayed. - add-zsh-hook precmd set-titles-with-path + add-zsh-hook precmd set-titles-with-path-precmd # Sets the tab and window titles before command execution. - function set-titles-with-command-preexec { - set-titles-with-command "$2" - } add-zsh-hook preexec set-titles-with-command-preexec fi diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index 0fde4bd4c2..b045cab955 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -127,11 +127,8 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Terminal # -# Auto set the terminal emulator tab and window titles. -zstyle ':prezto:module:terminal:auto-title' emulator 'yes' - -# Auto set the terminal multiplexer window title. -zstyle ':prezto:module:terminal:auto-title' multiplexer 'no' +# Auto set the tab and window titles. +# zstyle ':prezto:module:terminal' auto-title 'yes' # # Tmux From 9f60ddb96b041e820d6fb7b837dac227a2f81b0d Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 27 Aug 2013 16:04:52 -0400 Subject: [PATCH 15/37] Prefix internal functions --- modules/terminal/init.zsh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index b722a67f9d..0bd0ac316b 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -25,7 +25,7 @@ function set-tab-title { } # Sets the tab and window titles with a given command. -function set-titles-with-command-preexec { +function _terminal-set-titles-with-command-preexec { emulate -L zsh setopt EXTENDED_GLOB @@ -55,7 +55,7 @@ function set-titles-with-command-preexec { } # Sets the tab and window titles with a given path. -function set-titles-with-path-precmd { +function _terminal-set-titles-with-path-precmd { emulate -L zsh setopt EXTENDED_GLOB @@ -69,7 +69,7 @@ function set-titles-with-path-precmd { } # Sets the Terminal.app proxy icon. -function set-terminal-app-proxy-icon-precmd { +function _terminal-set-terminal-app-proxy-icon-precmd { printf '\e]7;%s\a' "file://$HOST${${1:-$PWD}// /%20}" } @@ -82,18 +82,18 @@ if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] \ then # Sets the Terminal.app current working directory before the prompt is # displayed. - add-zsh-hook precmd set-terminal-app-proxy-icon-precmd + add-zsh-hook precmd _terminal-set-terminal-app-proxy-icon-precmd # Unsets the Terminal.app current working directory when a terminal # multiplexer or remote connection is started since it can no longer be # updated, and it becomes confusing when the directory displayed in the title # bar is no longer synchronized with real current working directory. - function unset-terminal-app-proxy-icon-preexec { + function _terminal-unset-terminal-app-proxy-icon-preexec { if [[ "${2[(w)1]:t}" == (screen|tmux|dvtm|ssh|mosh) ]]; then - set-terminal-app-proxy-icon-precmd ' ' + _terminal-set-terminal-app-proxy-icon-precmd ' ' fi } - add-zsh-hook preexec unset-terminal-app-cwd-preexec + add-zsh-hook preexec _terminal-unset-terminal-app-proxy-icon-preexec # Do not set the tab and window titles in Terminal.app since it sets the tab # title to the currently running process by default and the current working @@ -106,9 +106,9 @@ if zstyle -t ':prezto:module:terminal' auto-title \ && ( ! [[ -n "$STY" || -n "$TMUX" ]] ) then # Sets the tab and window titles before the prompt is displayed. - add-zsh-hook precmd set-titles-with-path-precmd + add-zsh-hook precmd _terminal-set-titles-with-path-precmd # Sets the tab and window titles before command execution. - add-zsh-hook preexec set-titles-with-command-preexec + add-zsh-hook preexec _terminal-set-titles-with-command-preexec fi From d19c349f3feae7566bab59769e94021f3e96188f Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 28 Aug 2013 15:40:07 -0400 Subject: [PATCH 16/37] Unsufix internal functions --- modules/terminal/init.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index 0bd0ac316b..d49fd1539d 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -25,7 +25,7 @@ function set-tab-title { } # Sets the tab and window titles with a given command. -function _terminal-set-titles-with-command-preexec { +function _terminal-set-titles-with-command { emulate -L zsh setopt EXTENDED_GLOB @@ -41,7 +41,7 @@ function _terminal-set-titles-with-command-preexec { jobs "$job_name" 2>/dev/null > >( read index discarded # The index is already surrounded by brackets: [1]. - set-titles-with-command "${(e):-\$jobtexts_from_parent_shell$index}" + _terminal-set-titles-with-command "${(e):-\$jobtexts_from_parent_shell$index}" ) else # Set the command name, or in the case of sudo or ssh, the next command. @@ -55,7 +55,7 @@ function _terminal-set-titles-with-command-preexec { } # Sets the tab and window titles with a given path. -function _terminal-set-titles-with-path-precmd { +function _terminal-set-titles-with-path { emulate -L zsh setopt EXTENDED_GLOB @@ -69,7 +69,7 @@ function _terminal-set-titles-with-path-precmd { } # Sets the Terminal.app proxy icon. -function _terminal-set-terminal-app-proxy-icon-precmd { +function _terminal-set-terminal-app-proxy-icon { printf '\e]7;%s\a' "file://$HOST${${1:-$PWD}// /%20}" } @@ -82,18 +82,18 @@ if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] \ then # Sets the Terminal.app current working directory before the prompt is # displayed. - add-zsh-hook precmd _terminal-set-terminal-app-proxy-icon-precmd + add-zsh-hook precmd _terminal-set-terminal-app-proxy-icon # Unsets the Terminal.app current working directory when a terminal # multiplexer or remote connection is started since it can no longer be # updated, and it becomes confusing when the directory displayed in the title # bar is no longer synchronized with real current working directory. - function _terminal-unset-terminal-app-proxy-icon-preexec { + function _terminal-unset-terminal-app-proxy-icon { if [[ "${2[(w)1]:t}" == (screen|tmux|dvtm|ssh|mosh) ]]; then - _terminal-set-terminal-app-proxy-icon-precmd ' ' + _terminal-set-terminal-app-proxy-icon ' ' fi } - add-zsh-hook preexec _terminal-unset-terminal-app-proxy-icon-preexec + add-zsh-hook preexec _terminal-unset-terminal-app-proxy-icon # Do not set the tab and window titles in Terminal.app since it sets the tab # title to the currently running process by default and the current working @@ -106,9 +106,9 @@ if zstyle -t ':prezto:module:terminal' auto-title \ && ( ! [[ -n "$STY" || -n "$TMUX" ]] ) then # Sets the tab and window titles before the prompt is displayed. - add-zsh-hook precmd _terminal-set-titles-with-path-precmd + add-zsh-hook precmd _terminal-set-titles-with-path # Sets the tab and window titles before command execution. - add-zsh-hook preexec _terminal-set-titles-with-command-preexec + add-zsh-hook preexec _terminal-set-titles-with-command fi From 254b7c36d97a0fbe76ba81541e1f76f52120c841 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 28 Aug 2013 17:13:14 -0400 Subject: [PATCH 17/37] [Fix #324] Add configurable terminal window and tab title formats --- modules/terminal/README.md | 15 +++++++++++++-- modules/terminal/init.zsh | 16 +++++++++++++--- runcoms/zpreztorc | 6 ++++++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/modules/terminal/README.md b/modules/terminal/README.md index 76ce1c74d1..435d97205e 100644 --- a/modules/terminal/README.md +++ b/modules/terminal/README.md @@ -17,6 +17,16 @@ Auto titling is disabled inside terminal multiplexers, except inside dvtm, since it interferes with window names defined in configuration files and profile managers. +To format terminal window and tab titles, add the following to *zpreztorc*: + + zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' + zstyle ':prezto:module:terminal:tab-title' format '%m: %s' + +`%s` will be replaced with the current working directory path or the currently +executing program name. + +For a list of sequences, see [Expansion of Prompt Sequences][1]. + Functions --------- @@ -26,9 +36,10 @@ Functions Authors ------- -*The authors of this module should be contacted via the [issue tracker][1].* +*The authors of this module should be contacted via the [issue tracker][2].* - [Sorin Ionescu](https://github.com/sorin-ionescu) -[1]: https://github.com/sorin-ionescu/prezto/issues +[1]: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Expansion-of-Prompt-Sequences +[2]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index d49fd1539d..eeca67e2ac 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -12,16 +12,26 @@ fi # Sets the terminal or terminal multiplexer window title. function set-window-title { + local title_format{,ted} + zstyle -s ':prezto:module:terminal:window-title' format 'title_format' || title_format="%s" + zformat -f title_formatted "$title_format" "s:$argv" + if [[ "$TERM" == screen* ]]; then - printf "\ek%s\e\\" ${(V)argv} + title_format="\ek%s\e\\" else - printf "\e]2;%s\a" ${(V)argv} + title_format="\e]2;%s\a" fi + + printf "$title_format" "${(V%)title_formatted}" } # Sets the terminal tab title. function set-tab-title { - printf "\e]1;%s\a" ${(V)argv} + local title_format{,ted} + zstyle -s ':prezto:module:terminal:tab-title' format 'title_format' || title_format="%s" + zformat -f title_formatted "$title_format" "s:$argv" + + printf "\e]1;%s\a" ${(V%)title_formatted} } # Sets the tab and window titles with a given command. diff --git a/runcoms/zpreztorc b/runcoms/zpreztorc index b045cab955..9dd6c5dc9b 100644 --- a/runcoms/zpreztorc +++ b/runcoms/zpreztorc @@ -130,6 +130,12 @@ zstyle ':prezto:module:prompt' theme 'sorin' # Auto set the tab and window titles. # zstyle ':prezto:module:terminal' auto-title 'yes' +# Set the window title format. +# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' + +# Set the tab title format. +# zstyle ':prezto:module:terminal:tab-title' format '%m: %s' + # # Tmux # From d368d0536b7e857b8bd98cb7f5f547bac8b96bac Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 27 Sep 2013 00:11:38 -0400 Subject: [PATCH 18/37] Remove utility aliases for Cygwin --- modules/utility/init.zsh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 91c7809021..c1beee138b 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -104,10 +104,6 @@ alias sl='ls' # I often screw this up. # Mac OS X Everywhere if [[ "$OSTYPE" == darwin* ]]; then alias o='open' -elif [[ "$OSTYPE" == cygwin* ]]; then - alias o='cygstart' - alias pbcopy='tee > /dev/clipboard' - alias pbpaste='cat /dev/clipboard' else alias o='xdg-open' From b1abe7a84538097bf93e2c6677cedc7d7a980f68 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 27 Sep 2013 00:19:04 -0400 Subject: [PATCH 19/37] Warn that Cygwin is not supported --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 494a3a2bd7..27076d96a5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ Installation ------------ Prezto will work with any recent release of Zsh, but the minimum recommended -version is 4.3.11. +version is 4.3.11. Unfortunately, [Cygwin][9] is not supported due to +non-standard core utilities. 1. Launch Zsh: @@ -113,4 +114,5 @@ SOFTWARE. [6]: http://gitref.org [7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf [8]: http://grml.org/zsh/zsh-lovers.html +[9]: http://www.cygwin.com From 50edc451323fb70f225dd02475d799bce17c8cac Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Wed, 27 Nov 2013 12:31:08 -0500 Subject: [PATCH 20/37] [Fix #503] Prefix rails aliases with 'bundle exec' --- modules/rails/init.zsh | 64 +++++++++------------------- modules/ruby/README.md | 1 + modules/ruby/functions/ruby-app-root | 19 +++++++++ 3 files changed, 39 insertions(+), 45 deletions(-) create mode 100644 modules/ruby/functions/ruby-app-root diff --git a/modules/rails/init.zsh b/modules/rails/init.zsh index 69f5b8863b..70f50ce8ea 100644 --- a/modules/rails/init.zsh +++ b/modules/rails/init.zsh @@ -7,56 +7,30 @@ # Sorin Ionescu # +# Load dependencies. +pmodload 'ruby' + # Return if requirements are not found. -if (( ! $+commands[rails] )); then +if (( ! $+commands[bundle] )); then return 1 fi # -# Aliases (Compatible with Rails 2) -# - -alias ror='rails' -alias rorc='_rails-command console' -alias rordc='_rails-command dbconsole' -alias rordm='rake db:migrate' -alias rordM='rake db:migrate db:test:clone' -alias rordr='rake db:rollback' -alias rorg='_rails-command generate' -alias rorl='tail -f log/development.log' -alias rorlc='rake log:clear' -alias rorp='_rails-command plugin' -alias rorr='_rails-command runner' -alias rors='_rails-command server' -alias rorsd='_rails-command server --debugger' -alias rorx='_rails-command destroy' - -# -# Functions +# Aliases # -function _rails-command { - local root_dir="$PWD" - local rails_cmd - - while [[ "$root_dir" != '/' ]]; do - if [[ -d "$root_dir/.bundle" ]]; then - break - fi - root_dir="$root_dir:h" - done - - if [[ -e "$root_dir/bin/rails" ]]; then - rails_cmd='bin/rails' - elif [[ -e "$root_dir/script/rails" ]]; then - rails_cmd='script/rails' - elif [[ -e "$root_dir/script/server" ]]; then - rails_cmd='script/' - else - print "$0: not inside of a Rails application: $PWD" >&2 - return 1 - fi - - (cd "$root_dir" && ruby "$rails_cmd" "$@") -} +alias ror='bundle exec rails' +alias rorc='bundle exec rails console' +alias rordc='bundle exec rails dbconsole' +alias rordm='bundle exec rake db:migrate' +alias rordM='bundle exec rake db:migrate db:test:clone' +alias rordr='bundle exec rake db:rollback' +alias rorg='bundle exec rails generate' +alias rorl='tail -f "$(ruby-app-root)/log/development.log"' +alias rorlc='bundle exec rake log:clear' +alias rorp='bundle exec rails plugin' +alias rorr='bundle exec rails runner' +alias rors='bundle exec rails server' +alias rorsd='bundle exec rails server --debugger' +alias rorx='bundle exec rails destroy' diff --git a/modules/ruby/README.md b/modules/ruby/README.md index 42e63be6d1..e78d7576d6 100644 --- a/modules/ruby/README.md +++ b/modules/ruby/README.md @@ -59,6 +59,7 @@ Aliases Functions --------- + - `ruby-app-root` displays the path to the Ruby application root directory. - `ruby-info` exposes information about the Ruby environment via the `$ruby_info` associative array. diff --git a/modules/ruby/functions/ruby-app-root b/modules/ruby/functions/ruby-app-root new file mode 100644 index 0000000000..cff8966fc4 --- /dev/null +++ b/modules/ruby/functions/ruby-app-root @@ -0,0 +1,19 @@ +# +# Displays the path to the Ruby application root directory. +# +# Authors: +# Sorin Ionescu +# + +local root_dir="$PWD" + +while [[ "$root_dir" != '/' ]]; do + if [[ -f "$root_dir/Gemfile" ]]; then + print "$root_dir" + break + fi + root_dir="$root_dir:h" +done + +return 1 + From cdc4f36f25d0f0c83bed963f6a768c93f46586a9 Mon Sep 17 00:00:00 2001 From: Peter Jaros Date: Fri, 29 Nov 2013 17:34:34 -0500 Subject: [PATCH 21/37] Fix heading level for "zpreztorc" --- runcoms/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runcoms/README.md b/runcoms/README.md index 74030b878c..97824d8c01 100644 --- a/runcoms/README.md +++ b/runcoms/README.md @@ -48,7 +48,7 @@ zprofile and zlogin are not meant to be used concurrently but can be done so. This file is sourced by interactive shells. It should define aliases, functions, shell options, and key bindings. -## zpreztorc +### zpreztorc This file configures Prezto. From a57d545639ce0ceb46a8cdfe8c1f51e52ee990dd Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 29 Nov 2013 19:13:06 -0500 Subject: [PATCH 22/37] Update copyright --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 27076d96a5..5c5e932300 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ License (The MIT License) -Copyright (c) 2009-2012 Robby Russell, Sorin Ionescu, and contributors. +Copyright (c) 2009-2014 Sorin Ionescu and 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 in From 4e9553e896ab6e9344cc6d6f548ce16dbeed8e41 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 29 Nov 2013 20:36:07 -0500 Subject: [PATCH 23/37] 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 dbd27cb30a..f289a9f8e7 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit dbd27cb30a710809dd070669c331574fdc15b397 +Subproject commit f289a9f8e7a8a1752cd88f2366e6dacf8a0036e7 From eea1eea7dc33577e2630214756cba4482d377017 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 29 Nov 2013 20:36:33 -0500 Subject: [PATCH 24/37] 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 d9b28ed7f9..1e76804052 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit d9b28ed7f9c62d843c6f3e599ab4f3aa0bdd37b5 +Subproject commit 1e7680405239a835aa403a7457cad23750f98e72 From 2ebdbdcff5e20a95812bf8ee3762dd80cbf46239 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 29 Nov 2013 20:37:01 -0500 Subject: [PATCH 25/37] 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 662229f6f0..1d6a2aa024 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit 662229f6f0ce391ef7c1a41c398e28a31e847182 +Subproject commit 1d6a2aa024ea159229b3cfa6942cadaab1961ace From da1a837cd41dd868973a6eefd8decd4d38d96e27 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sat, 30 Nov 2013 19:25:11 -0500 Subject: [PATCH 26/37] Refactor Bundler aliases --- modules/ruby/init.zsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index e3238550f2..89b1345a08 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -43,14 +43,14 @@ alias rb='ruby' # Bundler if (( $+commands[bundle] )); then alias rbb='bundle' - alias rbbe='rbb exec' - alias rbbi='rbb install' - alias rbbl='rbb list' - alias rbbo='rbb open' - alias rbbp='rbb package' - alias rbbu='rbb update' + alias rbbe='bundle exec' + alias rbbi='bundle install --path vendor/bundle' + alias rbbl='bundle list' + alias rbbo='bundle open' + alias rbbp='bundle package' + alias rbbu='bundle update' alias rbbI='rbbi \ - && rbb package \ + && bundle package \ && print .bundle >>! .gitignore \ && print vendor/assets >>! .gitignore \ && print vendor/bundle >>! .gitignore \ From 347928193fc0a85ea7b06f71b39c051daa031493 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 6 Dec 2013 17:13:36 -0500 Subject: [PATCH 27/37] Update copyright --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c5e932300..3409e17ef1 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,8 @@ License (The MIT License) -Copyright (c) 2009-2014 Sorin Ionescu and contributors. +Copyright (c) 2009-2011 Robby Russell and contributors. +Copyright (c) 2011-2014 Sorin Ionescu and 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 in From 817dd3aa3aeba2d92af5860ffed1d6ee2377eaff Mon Sep 17 00:00:00 2001 From: Caleb Land Date: Tue, 10 Dec 2013 18:49:43 -0500 Subject: [PATCH 28/37] Allow functions in a module to be symlinks Add the '-' flag to the function glob which makes the other flag test against the target of the symlink, and not the symlink itself. When using rcm (https://github.com/thoughtbot/rcm), the function files are symlinked by default, but the current glob excludes them by targeting normal files (with the '.' flag). Signed-off-by: Sorin Ionescu --- init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.zsh b/init.zsh index fde7bcd33b..75adfe519d 100644 --- a/init.zsh +++ b/init.zsh @@ -25,7 +25,7 @@ unset min_zsh_version function pmodload { local -a pmodules local pmodule - local pfunction_glob='^([_.]*|prompt_*_setup|README*)(.N:t)' + local pfunction_glob='^([_.]*|prompt_*_setup|README*)(-.N:t)' # $argv is overridden in the anonymous function. pmodules=("$argv[@]") From e4e4f89c9fd4649263637051b4dfe4e22342243a Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 3 Jan 2014 13:37:36 -0500 Subject: [PATCH 29/37] [Fix #523] Ensure zprofile exists before sourcing it --- runcoms/zshenv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runcoms/zshenv b/runcoms/zshenv index 7b121203b0..2b13503a62 100644 --- a/runcoms/zshenv +++ b/runcoms/zshenv @@ -6,7 +6,7 @@ # # Ensure that a non-login, non-interactive shell has a defined environment. -if [[ "$SHLVL" -eq 1 && ! -o LOGIN ]]; then +if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then source "${ZDOTDIR:-$HOME}/.zprofile" fi From aefdce3fc31955e6c24636c8d624731c9107d6d9 Mon Sep 17 00:00:00 2001 From: Julien Stechele Date: Tue, 17 Dec 2013 01:17:31 +0100 Subject: [PATCH 30/37] Fix README.md: PATH was moved from .zshenv to .zprofile --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3409e17ef1..8799ee43c0 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ non-standard core utilities. ### Troubleshooting If you are not able to find certain commands after switching to *Prezto*, -modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal +modify the `PATH` variable in *~/.zprofile* then open a new Zsh terminal window or tab. Updating From 57b283facd8594a48757d04be79ef882d84ad9e8 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 3 Jan 2014 14:20:32 -0500 Subject: [PATCH 31/37] [Fix #514] Use /tmp when $TMPDIR is undefined --- modules/gpg/init.zsh | 2 +- modules/pacman/functions/pacman-list-disowned | 2 +- modules/ssh/init.zsh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/gpg/init.zsh b/modules/gpg/init.zsh index 2e4c4eab02..48f1715a83 100644 --- a/modules/gpg/init.zsh +++ b/modules/gpg/init.zsh @@ -12,7 +12,7 @@ fi # Set the default paths to gpg-agent files. _gpg_agent_conf="$HOME/.gnupg/gpg-agent.conf" -_gpg_agent_env="$TMPDIR/gpg-agent.env" +_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env" # Start gpg-agent if not started. if ! ps -U "$USER" -o ucomm | grep -q gpg-agent; then diff --git a/modules/pacman/functions/pacman-list-disowned b/modules/pacman/functions/pacman-list-disowned index 2cd8a92bbb..d6b6f289b2 100644 --- a/modules/pacman/functions/pacman-list-disowned +++ b/modules/pacman/functions/pacman-list-disowned @@ -6,7 +6,7 @@ # Sorin Ionescu # -local tmp="$TMPDIR/pacman-disowned-$UID-$$" +local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$" local db="$tmp/db" local fs="$tmp/fs" diff --git a/modules/ssh/init.zsh b/modules/ssh/init.zsh index daa4372f50..608e34e628 100644 --- a/modules/ssh/init.zsh +++ b/modules/ssh/init.zsh @@ -14,10 +14,10 @@ fi _ssh_dir="$HOME/.ssh" # Set the path to the environment file if not set by another module. -_ssh_agent_env="${_ssh_agent_env:-$TMPDIR/ssh-agent.env}" +_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env}" # Set the path to the persistent authentication socket. -_ssh_agent_sock="$TMPDIR/ssh-agent.sock" +_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock" # Start ssh-agent if not started. if [[ ! -S "$SSH_AUTH_SOCK" ]]; then From fa6723a5eef1811d68d6a43194ee23d573449757 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Mon, 9 Dec 2013 15:29:14 +0100 Subject: [PATCH 32/37] Don't use sudo if implicitly called by Pacman frontend Don't rely on alias expansion to handle Pacman because aliases are not expanded in sudo. Signed-off-by: Sorin Ionescu --- modules/pacman/init.zsh | 32 +++++++++++++++++--------------- modules/pacman/yaourt.zsh | 4 ++-- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/modules/pacman/init.zsh b/modules/pacman/init.zsh index bbbdcfb523..8b9a43305b 100644 --- a/modules/pacman/init.zsh +++ b/modules/pacman/init.zsh @@ -27,6 +27,8 @@ if (( $+commands[$_pacman_frontend] )); then if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then source "${0:h}/${_pacman_frontend}.zsh" fi +else + _pacman_sudo='sudo ' fi # @@ -34,49 +36,49 @@ fi # # Pacman. -alias pac='pacman' +alias pac= "${_pacman_frontend}" # Installs packages from repositories. -alias paci='sudo pacman --sync' +alias paci="${_pacman_sudo}${_pacman_frontend} --sync" # Installs packages from files. -alias pacI='sudo pacman --upgrade' +alias pacI="${_pacman_sudo}${_pacman_frontend} --upgrade" # Removes packages and unneeded dependencies. -alias pacx='sudo pacman --remove' +alias pacx="${_pacman_sudo}${_pacman_frontend} --remove" # Removes packages, their configuration, and unneeded dependencies. -alias pacX='sudo pacman --remove --nosave --recursive' +alias pacX="${_pacman_sudo}${_pacman_frontend} --remove --nosave --recursive" # Displays information about a package from the repositories. -alias pacq='pacman --sync --info' +alias pacq="${_pacman_frontend} --sync --info" # Displays information about a package from the local database. -alias pacQ='pacman --query --info' +alias pacQ="${_pacman_frontend} --query --info" # Searches for packages in the repositories. -alias pacs='pacman --sync --search' +alias pacs="${_pacman_frontend} --sync --search" # Searches for packages in the local database. -alias pacS='pacman --query --search' +alias pacS="${_pacman_frontend} --query --search" # Lists orphan packages. -alias pacman-list-orphans='sudo pacman --query --deps --unrequired' +alias pacman-list-orphans="${_pacman_sudo}${_pacman_frontend} --query --deps --unrequired" # Removes orphan packages. -alias pacman-remove-orphans='sudo pacman --remove --recursive $(pacman --quiet --query --deps --unrequired)' +alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)" # Synchronizes the local package and Arch Build System databases against the # repositories. if (( $+commands[abs] )); then - alias pacu='sudo pacman --sync --refresh && sudo abs' + alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && ${_pacman_sudo}abs" else - alias pacu='sudo pacman --sync --refresh' + alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh" fi # Synchronizes the local package database against the repositories then # upgrades outdated packages. -alias pacU='sudo pacman --sync --refresh --sysupgrade' +alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade" -unset _pacman_frontend +unset _pacman_{frontend,sudo} diff --git a/modules/pacman/yaourt.zsh b/modules/pacman/yaourt.zsh index fb2a8dc2a0..f4709e083e 100644 --- a/modules/pacman/yaourt.zsh +++ b/modules/pacman/yaourt.zsh @@ -11,9 +11,9 @@ # Disable color. if ! zstyle -t ':prezto:module:pacman:yaourt' color; then - alias pacman='pacman --nocolor' + alias pacman='yaourt --nocolor' fi # Manages .pac* files. -alias pacc='pacman -C' +alias pacc='yaourt -C' From 80ded5e33d9d7b583f51f8c9ef4392d612d64366 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 3 Jan 2014 14:46:30 -0500 Subject: [PATCH 33/37] Revert "Remove utility aliases for Cygwin" This reverts commit d368d0536b7e857b8bd98cb7f5f547bac8b96bac. --- modules/utility/init.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index c1beee138b..91c7809021 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -104,6 +104,10 @@ alias sl='ls' # I often screw this up. # Mac OS X Everywhere if [[ "$OSTYPE" == darwin* ]]; then alias o='open' +elif [[ "$OSTYPE" == cygwin* ]]; then + alias o='cygstart' + alias pbcopy='tee > /dev/clipboard' + alias pbpaste='cat /dev/clipboard' else alias o='xdg-open' From 391bc405d0378d092937f62944390b79edb13ad9 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Fri, 3 Jan 2014 14:46:35 -0500 Subject: [PATCH 34/37] Revert "Warn that Cygwin is not supported" This reverts commit b1abe7a84538097bf93e2c6677cedc7d7a980f68. --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 8799ee43c0..24445cb53f 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ Installation ------------ Prezto will work with any recent release of Zsh, but the minimum recommended -version is 4.3.11. Unfortunately, [Cygwin][9] is not supported due to -non-standard core utilities. +version is 4.3.11. 1. Launch Zsh: @@ -115,5 +114,4 @@ SOFTWARE. [6]: http://gitref.org [7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf [8]: http://grml.org/zsh/zsh-lovers.html -[9]: http://www.cygwin.com From e1974ad58db5efbc85e65c638703d54847540c79 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 9 Jan 2014 19:58:14 -0500 Subject: [PATCH 35/37] [Fix #516] Define ZLE functions separately --- modules/editor/init.zsh | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 0fe9885836..9a347a0948 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -107,31 +107,40 @@ function editor-info { } zle -N editor-info -# Ensures that $terminfo values are valid and updates editor information when -# the keymap changes. -function zle-keymap-select zle-line-init zle-line-finish { +# Updates editor information when the keymap changes. +function zle-keymap-select { + zle editor-info +} +zle -N zle-keymap-select + +# Enables terminal application mode and updates editor information. +function zle-line-init { # The terminal must be in application mode when ZLE is active for $terminfo # values to be valid. - if (( $+terminfo[smkx] && $+terminfo[rmkx] )); then - case "$0" in - (zle-line-init) - # Enable terminal application mode. - echoti smkx - ;; - (zle-line-finish) - # Disable terminal application mode. - echoti rmkx - ;; - esac + if (( $+terminfo[smkx] )); then + # Enable terminal application mode. + echoti smkx fi # Update editor information. zle editor-info } -zle -N zle-keymap-select -zle -N zle-line-finish zle -N zle-line-init +# Disables terminal application mode and updates editor information. +function zle-line-finish { + # The terminal must be in application mode when ZLE is active for $terminfo + # values to be valid. + if (( $+terminfo[rmkx] )); then + # Disable terminal application mode. + echoti rmkx + fi + + # Update editor information. + zle editor-info +} +zle -N zle-line-finish + # Toggles emacs overwrite mode and updates editor information. function overwrite-mode { zle .overwrite-mode From c091f71283eb12fe71b42f01c365175b29ea4b36 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 9 Jan 2014 20:07:40 -0500 Subject: [PATCH 36/37] [Fix #522] Do not load the terminal module in non-graphical terminals --- modules/terminal/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/terminal/init.zsh b/modules/terminal/init.zsh index eeca67e2ac..e35b77dbe5 100644 --- a/modules/terminal/init.zsh +++ b/modules/terminal/init.zsh @@ -6,7 +6,7 @@ # # Return if requirements are not found. -if [[ "$TERM" == 'dumb' ]]; then +if [[ "$TERM" == (dumb|linux|*bsd*) ]]; then return 1 fi From ad85c034cf9f1bc09dfe0232f4f0e646de9121ff Mon Sep 17 00:00:00 2001 From: Christian Autermann Date: Mon, 13 Jan 2014 20:36:49 +0100 Subject: [PATCH 37/37] updated externals --- prezto/modules/completion/external | 2 +- prezto/modules/history-substring-search/external | 2 +- prezto/modules/syntax-highlighting/external | 2 +- zshrc | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/prezto/modules/completion/external b/prezto/modules/completion/external index 662229f6f0..4ffedd4ac8 160000 --- a/prezto/modules/completion/external +++ b/prezto/modules/completion/external @@ -1 +1 @@ -Subproject commit 662229f6f0ce391ef7c1a41c398e28a31e847182 +Subproject commit 4ffedd4ac8ec5b5911046c93ed9f0bb017ead25f diff --git a/prezto/modules/history-substring-search/external b/prezto/modules/history-substring-search/external index d9b28ed7f9..1e76804052 160000 --- a/prezto/modules/history-substring-search/external +++ b/prezto/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit d9b28ed7f9c62d843c6f3e599ab4f3aa0bdd37b5 +Subproject commit 1e7680405239a835aa403a7457cad23750f98e72 diff --git a/prezto/modules/syntax-highlighting/external b/prezto/modules/syntax-highlighting/external index dbd27cb30a..c83e266888 160000 --- a/prezto/modules/syntax-highlighting/external +++ b/prezto/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit dbd27cb30a710809dd070669c331574fdc15b397 +Subproject commit c83e266888b9ea4db05dbdc8d1df57ca34818eea diff --git a/zshrc b/zshrc index e1d54c489c..29676f29e1 100644 --- a/zshrc +++ b/zshrc @@ -98,6 +98,4 @@ zstyle ':completion:*:complete:(cd|pushd):*' tag-order \ zstyle ':completion:*' group-name '' -export ZLE_RPROMPT_INDENT=0 - setopt localoptions nonomatch