diff --git a/README.md b/README.md index bcbe159..552784b 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,11 @@ version is 4.3.11. done ``` - Note: If you already have any of the given config files, ln will error. In - simple cases you can add `source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"` to - the bottom of your `.zshrc` to load prezto but keep your config intact. For - more complicated setups, it is recommended that you back up your original + Note: If you already have any of the given configuration files, `ln` will + cause error. In simple cases you can load prezto by adding the line + `source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"` to the bottom of your + `.zshrc` and keep the rest of your Zsh configuration intact. For more + complicated setups, it is recommended that you back up your original configs and replace them with the provided prezto runcoms. 4. Set Zsh as your default shell: @@ -88,8 +89,12 @@ accompanying README files to learn of what is available. 3. Load the theme you like in *~/.zpreztorc* then open a new Zsh terminal window or tab. - ![sorin theme][2] - Note that the 'git' module may be required for special symbols to appear, such as those on the right of the above image. Add `'git'` to the list under `zstyle ':prezto:load' pmodule \ ` in your `.zpreztorc` to enable this module. + ![sorin theme][2] + Note that the 'git' module may be required for special symbols to appear, + such as those on the right of the above image. Add `'git'` to the `pmodule` + list (under `zstyle ':prezto:load' pmodule \` in your *~/.zpreztorc*) to + enable this module. + ### External Modules 1. By default modules will be loaded from */modules* and */contrib*. @@ -99,7 +104,7 @@ accompanying README files to learn of what is available. Note that module names need to be unique or they will cause an error when loading. - ```console + ```sh zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib ``` diff --git a/modules/archive/README.md b/modules/archive/README.md index 600ff15..c9806ea 100644 --- a/modules/archive/README.md +++ b/modules/archive/README.md @@ -31,9 +31,9 @@ installed: - *.7z* requires `7za`. - *.deb* requires `ar`, `tar`. -Additionally, if `pigz` and/or `pbzip2` are installed, `archive` will use them over -their traditional counterparts, `gzip` and `bzip2` respectively, to take full advantage -of all available CPU cores for compression. +Additionally, if `pigz` and/or `pbzip2` are installed, `archive` will use them +over their traditional counterparts, `gzip` and `bzip2` respectively, to take +full advantage of all available CPU cores for compression. Alternatives ------------ diff --git a/modules/autosuggestions/README.md b/modules/autosuggestions/README.md index c3e90a4..48f9852 100644 --- a/modules/autosuggestions/README.md +++ b/modules/autosuggestions/README.md @@ -1,8 +1,3 @@ -Autosuggestions ---------------- - -Integrates zsh-autosuggestions into Prezto. - Autosuggestions =============== diff --git a/modules/command-not-found/README.md b/modules/command-not-found/README.md index 7775c92..ee5a94d 100644 --- a/modules/command-not-found/README.md +++ b/modules/command-not-found/README.md @@ -3,11 +3,12 @@ Command-Not-Found When you try to use a command that is not available locally, searches the package manager for a package offering that command and suggests -the proper install command. +the proper install command. -Debian-based and Arch Linux-based distributions use the [`command-not-found`][1] tool. +Debian and Arch Linux based distributions use the [`command-not-found`][1] tool. -macOS uses Homebrew's [`command-not-found` clone][2]. Note that you also need to [follow the instructions to tap the `command-not-found` homebrew repository][3]. +macOS uses Homebrew's [`command-not-found` clone][2]. Note that you also need to +[follow the instructions][3] to tap the `command-not-found` homebrew repository. Authors diff --git a/modules/completion/README.md b/modules/completion/README.md index 7efb3d9..dc2b9b8 100644 --- a/modules/completion/README.md +++ b/modules/completion/README.md @@ -6,6 +6,19 @@ the [zsh-completions][1] project. This module must be loaded **after** the *utility* module. +Options +------- + + - `COMPLETE_IN_WORD` complete from both ends of a word. + - `ALWAYS_TO_END` move cursor to the end of a completed word. + - `PATH_DIRS` perform path search even on command names with slashes. + - `AUTO_MENU` show completion menu on a successive tab press. + - `AUTO_LIST` automatically list choices on ambiguous completion. + - `AUTO_PARAM_SLASH` if completed parameter is a directory, add a trailing slash. + - `EXTENDED_GLOB` needed for file modification glob modifiers with compinit. + - `MENU_COMPLETE` do not autoselect the first completion entry. + - `FLOW_CONTROL` disable start/stop characters in shell editor. + Settings -------- diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index 48202f3..07acf13 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -99,7 +99,7 @@ zstyle ':completion:*:history-words' remove-all-dups yes zstyle ':completion:*:history-words' list false zstyle ':completion:*:history-words' menu yes -# Environmental Variables +# Environment Variables zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-value-*]#*,}%%,*}:#-*-} # Populate hostname completion. But allow ignoring custom entries from static diff --git a/modules/editor/README.md b/modules/editor/README.md index c27e864..d5280c4 100644 --- a/modules/editor/README.md +++ b/modules/editor/README.md @@ -1,7 +1,17 @@ Editor ====== -Sets key bindings. +Sets editor specific key bindings options and variables. + +Options +------- + + - `BEEP` beep on error in line editor. + +Variables +--------- + + - `WORDCHARS` treat a given set of characters as part of a word. Settings -------- diff --git a/modules/environment/README.md b/modules/environment/README.md index b0d579b..15ee959 100644 --- a/modules/environment/README.md +++ b/modules/environment/README.md @@ -5,9 +5,6 @@ Sets general shell options and defines environment variables. This module must be loaded first. -Environment Variables ---------------------- - Contributors ------------ @@ -15,6 +12,39 @@ This module **MUST NOT** rely on any command not built in Zsh. Non-interactive environment variables should be defined in [`zshenv`][1]. +Options +------- + +### General + + - `COMBINING_CHARS` combine zero-length punctuation characters (accents) with + the base character. + - `INTERACTIVE_COMMENTS` enable comments in interactive shell. + - `RC_QUOTES` allow 'Henry''s Garage' instead of 'Henry'\''s Garage'. + - `MAIL_WARNING` don't print a warning message if a mail file has been accessed. + +### Jobs + + - `LONG_LIST_JOBS` list jobs in the long format by default. + - `AUTO_RESUME` attempt to resume existing job before creating a new process. + - `NOTIFY` report status of background jobs immediately. + - `BG_NICE` don't run all background jobs at a lower priority. + - `HUP` don't kill jobs on shell exit. + - `CHECK_JOBS` don't report on jobs when shell exit. + +Variables +--------- + +### Termcap + + - `LESS_TERMCAP_mb` begins blinking. + - `LESS_TERMCAP_md` begins bold. + - `LESS_TERMCAP_me` ends mode. + - `LESS_TERMCAP_se` ends standout-mode. + - `LESS_TERMCAP_so` begins standout-mode. + - `LESS_TERMCAP_ue` ends underline. + - `LESS_TERMCAP_us` begins underline. + Authors ------- diff --git a/modules/history-substring-search/external b/modules/history-substring-search/external index aae3388..47a7d41 160000 --- a/modules/history-substring-search/external +++ b/modules/history-substring-search/external @@ -1 +1 @@ -Subproject commit aae3388491c2312c4efb2e86bcb999927bb2900e +Subproject commit 47a7d416c652a109f6e8856081abc042b50125f4 diff --git a/modules/history/README.md b/modules/history/README.md index 3dc9a26..d020688 100644 --- a/modules/history/README.md +++ b/modules/history/README.md @@ -3,13 +3,6 @@ History Sets [history][1] options and defines history aliases. -Variables ---------- - - - `HISTFILE` stores the path to the history file. - - `HISTSIZE` stores the maximum number of events to save in the internal history. - - `SAVEHIST` stores the maximum number of events to save in the history file. - Options ------- @@ -26,6 +19,13 @@ Options - `HIST_VERIFY` does not execute immediately upon history expansion. - `HIST_BEEP` beeps when accessing non-existent history. +Variables +--------- + + - `HISTFILE` stores the path to the history file. + - `HISTSIZE` stores the maximum number of events to save in the internal history. + - `SAVEHIST` stores the maximum number of events to save in the history file. + Aliases ------- diff --git a/modules/history/init.zsh b/modules/history/init.zsh index 31db4c5..db357b0 100644 --- a/modules/history/init.zsh +++ b/modules/history/init.zsh @@ -6,14 +6,6 @@ # Sorin Ionescu # -# -# Variables -# - -HISTFILE="${ZDOTDIR:-$HOME}/.zhistory" # The path to the history file. -HISTSIZE=10000 # The maximum number of events to save in the internal history. -SAVEHIST=10000 # The maximum number of events to save in the history file. - # # Options # @@ -31,6 +23,14 @@ setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history setopt HIST_VERIFY # Do not execute immediately upon history expansion. setopt HIST_BEEP # Beep when accessing non-existent history. +# +# Variables +# + +HISTFILE="${ZDOTDIR:-$HOME}/.zhistory" # The path to the history file. +HISTSIZE=10000 # The maximum number of events to save in the internal history. +SAVEHIST=10000 # The maximum number of events to save in the history file. + # # Aliases # diff --git a/modules/homebrew/README.md b/modules/homebrew/README.md index 3046f98..2a37553 100644 --- a/modules/homebrew/README.md +++ b/modules/homebrew/README.md @@ -1,10 +1,10 @@ Homebrew ======== -Defines Homebrew specific shell environment variables and aliases. +Defines Homebrew specific environment variables and aliases. -Environment Variables ---------------------- +Variables +--------- Execute the following to list the environment variables loaded in the shell: diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index cd1e5f7..d078b7a 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -11,7 +11,7 @@ if [[ "$OSTYPE" != (darwin|linux)* ]]; then fi # -# Environmental Variables +# Variables # # Load standard Homebrew shellenv into the shell session. diff --git a/modules/prompt/external/async b/modules/prompt/external/async index 5248bd8..58f7ba7 160000 --- a/modules/prompt/external/async +++ b/modules/prompt/external/async @@ -1 +1 @@ -Subproject commit 5248bd85bf2c522ebfa2b8d18ee7bc736d10c791 +Subproject commit 58f7ba70f05e75802299848e7e31c7d7a7fd0c97 diff --git a/modules/prompt/functions/prompt_minimal_setup b/modules/prompt/functions/prompt_minimal_setup index 7456ffd..b600768 100644 --- a/modules/prompt/functions/prompt_minimal_setup +++ b/modules/prompt/functions/prompt_minimal_setup @@ -47,4 +47,13 @@ function prompt_minimal_setup { RPROMPT='' } +function prompt_minimal_preview { + local +h PROMPT='' + local +h RPROMPT='' + local +h SPROMPT='' + + editor-info 2> /dev/null + prompt_preview_theme 'minimal' +} + prompt_minimal_setup "$@" diff --git a/modules/prompt/functions/prompt_sorin_setup b/modules/prompt/functions/prompt_sorin_setup index 30e71a9..14f8858 100644 --- a/modules/prompt/functions/prompt_sorin_setup +++ b/modules/prompt/functions/prompt_sorin_setup @@ -144,16 +144,17 @@ function prompt_sorin_setup { zstyle ':prezto:module:git:info:keys' format \ 'status' '%b %p %c:%s%A%B%S%a%d%m%r%U%u' + # Set python-info parameters. + zstyle ':prezto:module:python:info:virtualenv' format '%f%F{3}(%v)%F{7} ' + # Set up non-zero return value display local show_return="✘ " # Default is to show the return value if zstyle -T ':prezto:module:prompt' show-return-val; then show_return+='%? ' fi - # Set python-info format - zstyle ':prezto:module:python:info:virtualenv' format '%f%F{3}(%v)%F{7} ' - # Get the async worker set up + # Get the async worker set up. _sorin_cur_git_root='' _prompt_sorin_git='' diff --git a/modules/prompt/functions/prompt_steeef_setup b/modules/prompt/functions/prompt_steeef_setup index b241f9a..ca39f93 100644 --- a/modules/prompt/functions/prompt_steeef_setup +++ b/modules/prompt/functions/prompt_steeef_setup @@ -72,6 +72,9 @@ function prompt_steeef_setup { local unstaged_format="${_prompt_steeef_colors[2]}●%f" local staged_format="${_prompt_steeef_colors[5]}●%f" + # Set editor-info parameters. + zstyle ':prezto:module:editor:info:keymap:primary' format '$' + # Set vcs_info parameters. zstyle ':vcs_info:*' enable bzr git hg svn zstyle ':vcs_info:*:prompt:*' check-for-changes true @@ -87,8 +90,17 @@ function prompt_steeef_setup { # Define prompts. PROMPT=" ${_prompt_steeef_colors[3]}%n%f at ${_prompt_steeef_colors[2]}%m%f in ${_prompt_steeef_colors[5]}%~%f "'${vcs_info_msg_0_}'" -"'$python_info[virtualenv]'"$ " +"'$python_info[virtualenv]${editor_info[keymap]} ' RPROMPT='' } +function prompt_steeef_preview { + local +h PROMPT='' + local +h RPROMPT='' + local +h SPROMPT='' + + editor-info 2> /dev/null + prompt_preview_theme 'steeef' +} + prompt_steeef_setup "$@" diff --git a/modules/python/README.md b/modules/python/README.md index e7b72c4..121ea37 100644 --- a/modules/python/README.md +++ b/modules/python/README.md @@ -6,7 +6,9 @@ Enables local Python and local Python package installation. Settings -------- -This module supports virtual environments from conda and virtualenvwrapper. By default, only virtualenvwrapper is enabled. To disable virtualenvwrapper, add the following to *zpreztorc*. +This module supports virtual environments from conda and virtualenvwrapper. By +default, only virtualenvwrapper is enabled. To disable virtualenvwrapper, add +the following to *zpreztorc*. ```sh zstyle ':prezto:module:python' skip-virtualenvwrapper-init 'on' @@ -52,8 +54,8 @@ virtualenvwrapper [`virtualenvwrapper`][2] is a frontend to the popular [`virtualenv`][3] utility. -`virtualenv` creates isolated Python environments and `virtualenvwrapper` provides -convenient shell functions to create, switch, and manage them. +`virtualenv` creates isolated Python environments and `virtualenvwrapper` +provides convenient shell functions to create, switch, and manage them. ### Usage diff --git a/modules/rsync/init.zsh b/modules/rsync/init.zsh index a802222..3618812 100644 --- a/modules/rsync/init.zsh +++ b/modules/rsync/init.zsh @@ -14,7 +14,8 @@ fi # Aliases # -_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system' +_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive \ + --hard-links --one-file-system' if grep -q 'xattrs' <(rsync --help 2>&1); then _rsync_cmd="${_rsync_cmd} --acls --xattrs" diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index 42d396d..d6586e2 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit 42d396d8190b93ae0bb45ed22039589b4840ab82 +Subproject commit d6586e2a4f54a66808aba3c325a614d5166342f8 diff --git a/modules/utility/README.md b/modules/utility/README.md index 84e81f5..3b25b3a 100644 --- a/modules/utility/README.md +++ b/modules/utility/README.md @@ -8,8 +8,8 @@ Settings ### Highlighting -If you have enabled color globally in *zpreztorc*, you may disable it for certain -commands. +If you have enabled color globally in *zpreztorc*, you may disable it for +certain commands. To disable `ls` color, add the following line to *zpreztorc*; when coloring is disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries. @@ -18,6 +18,12 @@ disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries. zstyle ':prezto:module:utility:ls' color 'no' ``` +To disable GNU coreutils `ls` to list directories grouped first, add the following line to *zpreztorc*: + +```sh +zstyle ':prezto:module:utility:ls' dirs-first 'no' +``` + To disable `diff` highlighting, add the following line to *zpreztorc*: ```sh @@ -109,7 +115,8 @@ Aliases ### Resource Usage - - `df` displays free disk space using human readable units (aliases to `pydf`, if installed). + - `df` displays free disk space using human readable units (aliases to `pydf`, + if installed). - `du` displays disk usage using human readable units. - `top` displays information about processes. - `topc` displays information about processes sorted by CPU usage. diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 942090d..6b07bf0 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -73,7 +73,10 @@ fi # ls if is-callable 'dircolors'; then # GNU Core Utilities - alias ls='ls --group-directories-first' + + if zstyle -T ':prezto:module:utility:ls' dirs-first; then + alias ls="${aliases[ls]:-ls} --group-directories-first" + fi if zstyle -t ':prezto:module:utility:ls' color; then # Call dircolors to define colors if they're missing diff --git a/runcoms/README.md b/runcoms/README.md index 9df890e..29d9f8a 100644 --- a/runcoms/README.md +++ b/runcoms/README.md @@ -10,7 +10,7 @@ in */etc* by default. User-local configuration files have the same name as their global counterparts but are prefixed with a dot (hidden). Zsh looks for these files in the path -stored in the `$ZDOTDIR` environmental variable. However, if said variable is +stored in the `$ZDOTDIR` environment variable. However, if said variable is not defined, Zsh will use the user's home directory. File Descriptions