1
0
Fork 0

Merge branch 'master' into nixos-gpg-module-fix

pull/1732/head
Vonfry 4 years ago
commit 2fc2920349
No known key found for this signature in database
GPG Key ID: 7CEA08AE02E6F76F

5
.gitmodules vendored

@ -28,3 +28,8 @@
[submodule "modules/prompt/external/powerlevel9k"] [submodule "modules/prompt/external/powerlevel9k"]
path = modules/prompt/external/powerlevel9k path = modules/prompt/external/powerlevel9k
url = https://github.com/bhilburn/powerlevel9k.git url = https://github.com/bhilburn/powerlevel9k.git
shallow = true
[submodule "modules/prompt/external/powerlevel10k"]
path = modules/prompt/external/powerlevel10k
url = https://github.com/romkatv/powerlevel10k.git
shallow = true

@ -44,7 +44,7 @@ function zprezto-update {
printf "There is an update available. Trying to pull.\n\n" printf "There is an update available. Trying to pull.\n\n"
if git pull --ff-only; then if git pull --ff-only; then
printf "Syncing submodules\n" printf "Syncing submodules\n"
git submodule update --recursive git submodule update --init --recursive
return $? return $?
else else
cannot-fast-forward cannot-fast-forward
@ -98,18 +98,20 @@ function pmodload {
else else
locations=(${pmodule_dirs:+${^pmodule_dirs}/$pmodule(-/FN)}) locations=(${pmodule_dirs:+${^pmodule_dirs}/$pmodule(-/FN)})
if (( ${#locations} > 1 )); then if (( ${#locations} > 1 )); then
if ! zstyle -t ':prezto:load' pmodule-allow-overrides 'yes'; then
print "$0: conflicting module locations: $locations" print "$0: conflicting module locations: $locations"
continue continue
fi
elif (( ${#locations} < 1 )); then elif (( ${#locations} < 1 )); then
print "$0: no such module: $pmodule" print "$0: no such module: $pmodule"
continue continue
fi fi
# Grab the full path to this module # Grab the full path to this module
pmodule_location=${locations[1]} pmodule_location=${locations[-1]}
# Add functions to $fpath. # Add functions to $fpath.
fpath=(${pmodule_location}/functions(/FN) $fpath) fpath=(${pmodule_location}/functions(-/FN) $fpath)
function { function {
local pfunction local pfunction

@ -8,7 +8,7 @@
# function archive { # function archive {
local archive_name path_to_archive _gzip_bin _bzip2_bin local archive_name path_to_archive _gzip_bin _bzip2_bin _xz_bin
if (( $# < 2 )); then if (( $# < 2 )); then
cat >&2 <<EOF cat >&2 <<EOF
@ -40,7 +40,15 @@ else
_gzip_bin='gzip' _gzip_bin='gzip'
fi fi
if (( $+commands[pbzip2] )); then if (( $+commands[pixz] )); then
_xz_bin='pixz'
else
_xz_bin='xz'
fi
if (( $+commands[lbzip2] )); then
_bzip2_bin='lbzip2'
elif (( $+commands[pbzip2] )); then
_bzip2_bin='pbzip2' _bzip2_bin='pbzip2'
else else
_bzip2_bin='bzip2' _bzip2_bin='bzip2'
@ -49,7 +57,7 @@ fi
case "${archive_name}" in case "${archive_name}" in
(*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${=path_to_archive}" ;; (*.tar.gz|*.tgz) tar -cvf "${archive_name}" --use-compress-program="${_gzip_bin}" "${=path_to_archive}" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${=path_to_archive}" ;; (*.tar.bz2|*.tbz|*.tbz2) tar -cvf "${archive_name}" --use-compress-program="${_bzip2_bin}" "${=path_to_archive}" ;;
(*.tar.xz|*.txz) tar -cvJf "${archive_name}" "${=path_to_archive}" ;; (*.tar.xz|*.txz) tar -cvf "${archive_name}" --use-compress-program="${_xz_bin}" "${=path_to_archive}" ;;
(*.tar.lzma|*.tlz) tar -cvf "${archive_name}" --lzma "${=path_to_archive}" ;; (*.tar.lzma|*.tlz) tar -cvf "${archive_name}" --lzma "${=path_to_archive}" ;;
(*.tar) tar -cvf "${archive_name}" "${=path_to_archive}" ;; (*.tar) tar -cvf "${archive_name}" "${=path_to_archive}" ;;
(*.zip|*.jar) zip -r "${archive_name}" "${=path_to_archive}" ;; (*.zip|*.jar) zip -r "${archive_name}" "${=path_to_archive}" ;;

@ -12,6 +12,7 @@ local success
local file_name local file_name
local file_path local file_path
local extract_dir local extract_dir
local _gzip_bin _bzip2_bin _xz_bin
if (( $# == 0 )); then if (( $# == 0 )); then
cat >&2 <<EOF cat >&2 <<EOF
@ -30,6 +31,29 @@ if [[ "$1" == "-r" || "$1" == "--remove" ]]; then
shift shift
fi fi
# here, we check for dropin/multi-threaded replacements
# this should eventually be moved to modules/archive/init.zsh
# as a global alias
if (( $+commands[pigz] )); then
_gzip_bin='pigz'
else
_gzip_bin='gzip'
fi
if (( $+commands[pixz] )); then
_xz_bin='pixz'
else
_xz_bin='xz'
fi
if (( $+commands[lbzip2] )); then
_bzip2_bin='lbzip2'
elif (( $+commands[pbzip2] )); then
_bzip2_bin='pbzip2'
else
_bzip2_bin='bzip2'
fi
while (( $# > 0 )); do while (( $# > 0 )); do
if [[ ! -s "$1" ]]; then if [[ ! -s "$1" ]]; then
print "$0: file not valid: $1" >&2 print "$0: file not valid: $1" >&2
@ -42,15 +66,13 @@ while (( $# > 0 )); do
file_path="${1:A}" file_path="${1:A}"
extract_dir="${file_name:r}" extract_dir="${file_name:r}"
case "$1:l" in case "$1:l" in
(*.tar.gz|*.tgz) tar xvzf "$1" ;; (*.tar.gz|*.tgz) tar -xvf "$1" --use-compress-program="${_gzip_bin}" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;; (*.tar.bz2|*.tbz|*.tbz2) tar -xvf "$1" --use-compress-program="${_bzip2_bin}" ;;
(*.tar.xz|*.txz) tar --xz --help &> /dev/null \ (*.tar.xz|*.txz) tar -xvf "$1" --use-compress-program="${_xz_bin}" ;;
&& tar --xz -xvf "$1" \
|| xzcat "$1" | tar xvf - ;;
(*.tar.zma|*.tlz) tar --lzma --help &> /dev/null \ (*.tar.zma|*.tlz) tar --lzma --help &> /dev/null \
&& tar --lzma -xvf "$1" \ && tar --lzma -xvf "$1" \
|| lzcat "$1" | tar xvf - ;; || lzcat "$1" | tar -xvf - ;;
(*.tar) tar xvf "$1" ;; (*.tar) tar -xvf "$1" ;;
(*.gz) gunzip "$1" ;; (*.gz) gunzip "$1" ;;
(*.bz2) bunzip2 "$1" ;; (*.bz2) bunzip2 "$1" ;;
(*.xz) unxz "$1" ;; (*.xz) unxz "$1" ;;

@ -1 +1 @@
Subproject commit a7f0106b31c2538a36cab30428e6ca65d9a2ae60 Subproject commit ae315ded4dba10685dbbafbfa2ff3c1aefeb490d

@ -21,11 +21,12 @@ elif (( $+commands[brew] )); then
"$(brew --repository 2> /dev/null)"/Library/Taps/*/*/cmd/brew-command-not-found-init(|.rb)(.N) "$(brew --repository 2> /dev/null)"/Library/Taps/*/*/cmd/brew-command-not-found-init(|.rb)(.N)
) )
if (( $#cnf_command )); then if (( $#cnf_command )); then
cache_file="${TMPDIR:-/tmp}/prezto-brew-command-not-found-cache.$UID.zsh" cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/brew-command-not-found-cache.zsh"
if [[ "${${(@o)cnf_command}[1]}" -nt "$cache_file" \ if [[ "${${(@o)cnf_command}[1]}" -nt "$cache_file" \
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \ || "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|| ! -s "$cache_file" ]]; then || ! -s "$cache_file" ]]; then
mkdir -p "$cache_file:h"
# brew command-not-found-init is slow; cache its output. # brew command-not-found-init is slow; cache its output.
brew command-not-found-init >! "$cache_file" 2> /dev/null brew command-not-found-init >! "$cache_file" 2> /dev/null
fi fi

@ -32,13 +32,16 @@ unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
# cache time of 20 hours, so it should almost always regenerate the first time a # cache time of 20 hours, so it should almost always regenerate the first time a
# shell is opened each day. # shell is opened each day.
autoload -Uz compinit autoload -Uz compinit
_comp_files=(${ZDOTDIR:-$HOME}/.zcompdump(Nm-20)) _comp_path="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
if (( $#_comp_files )); then # #q expands globs in conditional expressions
compinit -i -C if [[ $_comp_path(#qNmh-20) ]]; then
# -C (skip function check) implies -i (skip security check).
compinit -C -d "$_comp_path"
else else
compinit -i mkdir -p "$_comp_path:h"
compinit -i -d "$_comp_path"
fi fi
unset _comp_files unset _comp_path
# #
# Styles # Styles
@ -46,7 +49,7 @@ unset _comp_files
# Use caching to make completion for commands such as dpkg and apt usable. # Use caching to make completion for commands such as dpkg and apt usable.
zstyle ':completion::complete:*' use-cache on zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path "${ZDOTDIR:-$HOME}/.zcompcache" zstyle ':completion::complete:*' cache-path "${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompcache"
# Case-insensitive (all), partial-word, and then substring completion. # Case-insensitive (all), partial-word, and then substring completion.
if zstyle -t ':prezto:module:completion:*' case-sensitive; then if zstyle -t ':prezto:module:completion:*' case-sensitive; then

@ -12,7 +12,6 @@ Options
- `PUSHD_SILENT` does not print the directory stack after `pushd` or `popd`. - `PUSHD_SILENT` does not print the directory stack after `pushd` or `popd`.
- `PUSHD_TO_HOME` pushes to the home directory when no argument is given. - `PUSHD_TO_HOME` pushes to the home directory when no argument is given.
- `CDABLE_VARS` changes directory to a path stored in a variable. - `CDABLE_VARS` changes directory to a path stored in a variable.
- `AUTO_NAME_DIRS` auto adds variable-stored paths to `~` list.
- `MULTIOS` writes to multiple descriptors. - `MULTIOS` writes to multiple descriptors.
- `EXTENDED_GLOB` uses extended globbing syntax. - `EXTENDED_GLOB` uses extended globbing syntax.
- `CLOBBER` does not overwrite existing files with `>` and `>>`. Use `>!` and - `CLOBBER` does not overwrite existing files with `>` and `>>`. Use `>!` and

@ -106,4 +106,4 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu) - [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues [1]: https://github.com/sorin-ionescu/prezto/issues

@ -91,6 +91,9 @@ function bindkey-all {
# Exposes information about the Zsh Line Editor via the $editor_info associative # Exposes information about the Zsh Line Editor via the $editor_info associative
# array. # array.
function editor-info { function editor-info {
# Ensure that we're going to set the editor-info for prompts that
# are prezto managed and/or compatible.
if zstyle -t ':prezto:module:prompt' managed; then
# Clean up previous $editor_info. # Clean up previous $editor_info.
unset editor_info unset editor_info
typeset -gA editor_info typeset -gA editor_info
@ -113,6 +116,7 @@ function editor-info {
unset REPLY unset REPLY
zle zle-reset-prompt zle zle-reset-prompt
fi
} }
zle -N editor-info zle -N editor-info
@ -269,9 +273,11 @@ bindkey -d
# Emacs Key Bindings # Emacs Key Bindings
# #
for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}" \
"${key_info[Escape]}${key_info[Left]}"
bindkey -M emacs "$key" emacs-backward-word bindkey -M emacs "$key" emacs-backward-word
for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}" \
"${key_info[Escape]}${key_info[Right]}"
bindkey -M emacs "$key" emacs-forward-word bindkey -M emacs "$key" emacs-forward-word
# Kill to the beginning of the line. # Kill to the beginning of the line.

@ -38,6 +38,9 @@ setopt INTERACTIVE_COMMENTS # Enable comments in interactive shell.
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'. setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed. unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
# Allow mapping Ctrl+S and Ctrl+Q shortcuts
[[ -r ${TTY:-} && -w ${TTY:-} && $+commands[stty] == 1 ]] && stty -ixon <$TTY >$TTY
# #
# Jobs # Jobs
# #

@ -19,7 +19,7 @@ fi
# Initialization # Initialization
# #
cache_file="${TMPDIR:-/tmp}/prezto-fasd-cache.$UID.zsh" cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/fasd-cache.zsh"
if [[ "${commands[fasd]}" -nt "$cache_file" \ if [[ "${commands[fasd]}" -nt "$cache_file" \
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \ || "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|| ! -s "$cache_file" ]]; then || ! -s "$cache_file" ]]; then
@ -31,6 +31,7 @@ if [[ "${commands[fasd]}" -nt "$cache_file" \
init_args+=(zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install) init_args+=(zsh-ccomp zsh-ccomp-install zsh-wcomp zsh-wcomp-install)
fi fi
mkdir -p "$cache_file:h"
# Cache init code. # Cache init code.
fasd --init "$init_args[@]" >! "$cache_file" 2> /dev/null fasd --init "$init_args[@]" >! "$cache_file" 2> /dev/null
fi fi

@ -97,7 +97,9 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
alias gfc='git clone' alias gfc='git clone'
alias gfcr='git clone --recurse-submodules' alias gfcr='git clone --recurse-submodules'
alias gfm='git pull' alias gfm='git pull'
alias gfma='git pull --autostash'
alias gfr='git pull --rebase' alias gfr='git pull --rebase'
alias gfra='git pull --rebase --autostash'
# Flow (F) # Flow (F)
alias gFi='git flow init' alias gFi='git flow init'

@ -12,7 +12,7 @@ fi
# Set the default paths to gpg-agent files. # Set the default paths to gpg-agent files.
_gpg_agent_conf="$(gpgconf --list-dir homedir)/gpg-agent.conf" _gpg_agent_conf="$(gpgconf --list-dir homedir)/gpg-agent.conf"
_gpg_agent_env="${TMPDIR:-/tmp}/gpg-agent.env.$UID" _gpg_agent_env="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/gpg-agent.env"
_gpg_agent_socket="$(gpgconf --list-dir agent-socket)" _gpg_agent_socket="$(gpgconf --list-dir agent-socket)"
# Load environment variables from previous run # Load environment variables from previous run
@ -22,13 +22,14 @@ source "$_gpg_agent_env" 2> /dev/null
# Start gpg-agent if not started. # Start gpg-agent if not started.
if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then
# Start gpg-agent if not started. # Start gpg-agent if not started.
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "^ *[0-9]* gpg-agent$"; then if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${${${(s.:.)GPG_AGENT_INFO}[2]}:--1} gpg-agent"; then
mkdir -p "$_gpg_agent_env:h"
eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")" eval "$(gpg-agent --daemon | tee "$_gpg_agent_env")"
fi fi
fi fi
# Inform gpg-agent of the current TTY for user prompts. # Inform gpg-agent of the current TTY for user prompts.
export GPG_TTY="$(tty)" export GPG_TTY=$TTY
# Integrate with the SSH module. # Integrate with the SSH module.
if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then

@ -10,8 +10,11 @@ if (( ! $+commands[ghc] )); then
return 1 return 1
fi fi
# Load dependencies.
pmodload 'helper'
# Prepend Cabal per user directories to PATH. # Prepend Cabal per user directories to PATH.
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path) path=($HOME/Library/Haskell/bin(/N) $path)
else else
path=($HOME/.cabal/bin(/N) $path) path=($HOME/.cabal/bin(/N) $path)

@ -29,3 +29,23 @@ function coalesce {
done done
return 1 return 1
} }
# is true on MacOS Darwin
function is-darwin {
[[ "$OSTYPE" == darwin* ]]
}
# is true on Linux's
function is-linux {
[[ "$OSTYPE" == linux* ]]
}
# is true on BSD's
function is-bsd {
[[ "$OSTYPE" == *bsd* ]]
}
# is true on Cygwin (Windows)
function is-cygwin {
[[ "$OSTYPE" == cygwin* ]]
}

@ -10,7 +10,9 @@
pmodload 'editor' pmodload 'editor'
# Source module files. # Source module files.
source "${0:h}/external/zsh-history-substring-search.zsh" || return 1 if (( ! $+functions[history-substring-search-up] )); then
source "${0:h}/external/zsh-history-substring-search.zsh" || return 1
fi
# #
# Search # Search

@ -3,6 +3,10 @@ History
Sets [history][1] options and defines history aliases. Sets [history][1] options and defines history aliases.
**Note:** If you are migrating from oh-my-zsh and want to keep your history, you
will either need to set HISTFILE manually to `$HOME/.zsh_history` or rename
`~/.zsh_history` to ~/.zhistory`.
Options Options
------- -------

@ -26,7 +26,7 @@ setopt HIST_BEEP # Beep when accessing non-existent history.
# Variables # Variables
# #
HISTFILE="${ZDOTDIR:-$HOME}/.zhistory" # The path to the history file. HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zhistory}" # The path to the history file.
HISTSIZE=10000 # The maximum number of events to save in the internal history. 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. SAVEHIST=10000 # The maximum number of events to save in the history file.

@ -18,8 +18,8 @@ Aliases
### Homebrew ### Homebrew
- `brewc` cleans outdated brews and their cached archives. - `brewc` cleans outdated brews and their cached archives.
- `brewC` cleans outdated brews, including keg-only, and their cached archives.
- `brewi` installs a formula. - `brewi` installs a formula.
- `brewL` lists installed formulae that are not dependencies of another installed formula.
- `brewl` lists installed formulae. - `brewl` lists installed formulae.
- `brewo` lists brews which have an update available. - `brewo` lists brews which have an update available.
- `brews` searches for a formula. - `brews` searches for a formula.

@ -5,8 +5,11 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# Load dependencies.
pmodload 'helper'
# Return if requirements are not found. # Return if requirements are not found.
if [[ "$OSTYPE" != (darwin|linux)* ]]; then if ! is-darwin && ! is-linux; then
return 1 return 1
fi fi
@ -27,8 +30,8 @@ fi
# Homebrew # Homebrew
alias brewc='brew cleanup' alias brewc='brew cleanup'
alias brewC='brew cleanup --force'
alias brewi='brew install' alias brewi='brew install'
alias brewL='brew leaves'
alias brewl='brew list' alias brewl='brew list'
alias brewo='brew outdated' alias brewo='brew outdated'
alias brews='brew search' alias brews='brew search'

@ -6,8 +6,11 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# Load dependencies.
pmodload 'helper'
# Return if requirements are not found. # Return if requirements are not found.
if [[ "$OSTYPE" != darwin* ]]; then if ! is-darwin; then
return 1 return 1
fi fi

@ -10,6 +10,9 @@ nvm
[nvm][5] allows for managing multiple, isolated Node.js installations in the [nvm][5] allows for managing multiple, isolated Node.js installations in the
home directory. home directory.
This will be loaded automatically if nvm is installed in `$NVM_DIR`,
`~/.nvm`, or nvm is installed with homebrew.
nodenv nodenv
------ ------
@ -17,6 +20,9 @@ nodenv
Node versions. It's simple and predictable, Just Works, and is rock solid in Node versions. It's simple and predictable, Just Works, and is rock solid in
production. nodenv is forked from the popular [rbenv][7]. production. nodenv is forked from the popular [rbenv][7].
This will be loaded automatically if nodenv is installed in `$NODENV_ROOT`,
`~/.nodenv`, or `nodenv` is on the path.
Functions Functions
--------- ---------

@ -23,7 +23,7 @@ elif (( $+commands[node] )) ; then
version="${$(node -v)#v}" version="${$(node -v)#v}"
fi fi
if [[ "$version" != (none|) ]]; then if [[ "$version" != (none|system) ]]; then
zstyle -s ':prezto:module:node:info:version' format 'version_format' zstyle -s ':prezto:module:node:info:version' format 'version_format'
zformat -f version_formatted "$version_format" "v:$version" zformat -f version_formatted "$version_format" "v:$version"
node_info[version]="$version_formatted" node_info[version]="$version_formatted"

@ -7,8 +7,8 @@
# #
# Load manually installed NVM into the shell session. # Load manually installed NVM into the shell session.
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then if [[ -s "${NVM_DIR:=$HOME/.nvm}/nvm.sh" ]]; then
source "$HOME/.nvm/nvm.sh" source "${NVM_DIR}/nvm.sh"
# Load package manager installed NVM into the shell session. # Load package manager installed NVM into the shell session.
elif (( $+commands[brew] )) && \ elif (( $+commands[brew] )) && \
@ -17,8 +17,8 @@ elif (( $+commands[brew] )) && \
unset nvm_prefix unset nvm_prefix
# Load manually installed nodenv into the shell session. # Load manually installed nodenv into the shell session.
elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then elif [[ -s "${NODENV_ROOT:=$HOME/.nodenv}/bin/nodenv" ]]; then
path=("$HOME/.nodenv/bin" $path) path=("${NODENV_ROOT}/bin" $path)
eval "$(nodenv init - --no-rehash zsh)" eval "$(nodenv init - --no-rehash zsh)"
# Load package manager installed nodenv into the shell session. # Load package manager installed nodenv into the shell session.
@ -39,12 +39,13 @@ typeset -A compl_commands=(
for compl_command in "${(k)compl_commands[@]}"; do for compl_command in "${(k)compl_commands[@]}"; do
if (( $+commands[$compl_command] )); then if (( $+commands[$compl_command] )); then
cache_file="${TMPDIR:-/tmp}/prezto-$compl_command-cache.$UID.zsh" cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/$compl_command-cache.zsh"
# Completion commands are slow; cache their output if old or missing. # Completion commands are slow; cache their output if old or missing.
if [[ "$commands[$compl_command]" -nt "$cache_file" \ if [[ "$commands[$compl_command]" -nt "$cache_file" \
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \ || "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|| ! -s "$cache_file" ]]; then || ! -s "$cache_file" ]]; then
mkdir -p "$cache_file:h"
command ${=compl_commands[$compl_command]} >! "$cache_file" 2> /dev/null command ${=compl_commands[$compl_command]} >! "$cache_file" 2> /dev/null
fi fi

@ -5,8 +5,11 @@
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# Load dependencies.
pmodload 'helper'
# Return if requirements are not found. # Return if requirements are not found.
if [[ "$OSTYPE" != darwin* ]]; then if ! is-darwin; then
return 1 return 1
fi fi

@ -8,11 +8,11 @@
# function pacman-list-disowned { # function pacman-list-disowned {
local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$" local tmp="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/pacman-disowned-$$"
local db="$tmp/db" local db="$tmp/db"
local fs="$tmp/fs" local fs="$tmp/fs"
mkdir "$tmp" mkdir -p "$tmp"
trap 'rm -rf "$tmp"' EXIT trap 'rm -rf "$tmp"' EXIT
pacman --quiet --query --list | sort --unique > "$db" pacman --quiet --query --list | sort --unique > "$db"

@ -10,6 +10,9 @@ if (( ! $+commands[perl] )); then
return 1 return 1
fi fi
# Load dependencies.
pmodload 'helper'
# #
# Load Perlbrew or plenv # Load Perlbrew or plenv
# #
@ -37,13 +40,14 @@ fi
# Local Module Installation # Local Module Installation
# #
if [[ "$OSTYPE" == darwin* ]]; then if is-darwin; then
# Perl is slow; cache its output. # Perl is slow; cache its output.
cache_file="${TMPDIR:-/tmp}/prezto-perl-cache.$UID.zsh" cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/perl-cache.zsh"
perl_path="$HOME/Library/Perl/5.12" perl_path="$HOME/Library/Perl/5.12"
if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; then
if [[ "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" || ! -s "$cache_file" ]]; then if [[ "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" || ! -s "$cache_file" ]]; then
mkdir -p "$cache_file:h"
perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file" perl -I$perl_path/lib/perl5 -Mlocal::lib=$perl_path >! "$cache_file"
fi fi

@ -43,6 +43,22 @@ A prompt theme is an autoloadable function file with a special name,
project, themes **should** be placed in the *modules/prompt/functions* project, themes **should** be placed in the *modules/prompt/functions*
directory. directory.
### Required Variables
To ensure that your function works with the editor-info module you'll need to
set the following variable:
```
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
```
This is to ensure compatibility with outside prompts, while allowing prezto
and prezto-compatible prompts to take full advantage of the editor module.
This should be set in the `prompt_name_setup` function after you've added
any additional hooks with `add-zsh-hook precmd prompt_name_precmd`. See below
for additional information about functions and hooks.
### Theme Functions ### Theme Functions
There are three theme functions, a setup function, a help function, and There are three theme functions, a setup function, a help function, and

@ -1 +1 @@
Subproject commit 58f7ba70f05e75802299848e7e31c7d7a7fd0c97 Subproject commit 95c2b1577f455728ec01cec001a86c216d0af2bd

@ -0,0 +1 @@
Subproject commit 801bfbb2946b10527e75e77838a3657d78cb92e5

@ -1 +1 @@
Subproject commit 7aade5fca2acae3f10e260d0c076af6356da9dc6 Subproject commit 2e354b80deae105ea246699c49e65dcd4fe8b759

@ -28,3 +28,4 @@ unset current_pwd
print "$ret_directory" print "$ret_directory"
# } # }
# vim: ft=zsh

@ -104,6 +104,9 @@ function prompt_cloud_setup {
# Add hook for calling git-info before each command. # Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_cloud_precmd add-zsh-hook precmd prompt_cloud_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set git-info parameters. # Set git-info parameters.
zstyle ':prezto:module:git:info' verbose 'yes' zstyle ':prezto:module:git:info' verbose 'yes'
zstyle ':prezto:module:git:info:dirty' format "%%B%F{$secondary_color}]%f%%b %F{yellow}⚡%f" zstyle ':prezto:module:git:info:dirty' format "%%B%F{$secondary_color}]%f%%b %F{yellow}⚡%f"
@ -119,3 +122,4 @@ function prompt_cloud_setup {
} }
prompt_cloud_setup "$@" prompt_cloud_setup "$@"
# vim: ft=zsh

@ -40,6 +40,9 @@ function prompt_damoekri_setup {
# Add hook for calling git-info and ruby-info before each command. # Add hook for calling git-info and ruby-info before each command.
add-zsh-hook precmd prompt_damoekri_precmd add-zsh-hook precmd prompt_damoekri_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:keymap:primary' format ' %F{green}»%f' zstyle ':prezto:module:editor:info:keymap:primary' format ' %F{green}»%f'
@ -63,3 +66,4 @@ function prompt_damoekri_setup {
} }
prompt_damoekri_setup "$@" prompt_damoekri_setup "$@"
# vim: ft=zsh

@ -47,6 +47,9 @@ function prompt_giddie_setup {
# Add hook to set up prompt parameters before each command. # Add hook to set up prompt parameters before each command.
add-zsh-hook precmd prompt_giddie_precmd add-zsh-hook precmd prompt_giddie_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:completing' format '%F{green}...%f' zstyle ':prezto:module:editor:info:completing' format '%F{green}...%f'
zstyle ':prezto:module:editor:info:keymap:alternate' format '%F{yellow}--- COMMAND ---%f' zstyle ':prezto:module:editor:info:keymap:alternate' format '%F{yellow}--- COMMAND ---%f'
@ -74,3 +77,4 @@ function prompt_giddie_setup {
} }
prompt_giddie_setup "$@" prompt_giddie_setup "$@"
# vim: ft=zsh

@ -40,6 +40,9 @@ function prompt_kylewest_setup {
# Add hook for calling git-info before each command. # Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_kylewest_precmd add-zsh-hook precmd prompt_kylewest_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b' zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
zstyle ':prezto:module:editor:info:keymap:primary' format "%B%F{green}%f%b" zstyle ':prezto:module:editor:info:keymap:primary' format "%B%F{green}%f%b"
@ -63,3 +66,4 @@ function prompt_kylewest_setup {
} }
prompt_kylewest_setup "$@" prompt_kylewest_setup "$@"
# vim: ft=zsh

@ -32,6 +32,9 @@ function prompt_minimal_setup {
# Add hook for calling vcs_info before each command. # Add hook for calling vcs_info before each command.
add-zsh-hook precmd prompt_minimal_precmd add-zsh-hook precmd prompt_minimal_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set vcs_info parameters. # Set vcs_info parameters.
zstyle ':vcs_info:*' enable bzr git hg svn zstyle ':vcs_info:*' enable bzr git hg svn
zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
@ -57,3 +60,4 @@ function prompt_minimal_preview {
} }
prompt_minimal_setup "$@" prompt_minimal_setup "$@"
# vim: ft=zsh

@ -35,6 +35,9 @@ function prompt_nicoulaj_setup {
# Add hook for calling vcs_info before each command. # Add hook for calling vcs_info before each command.
add-zsh-hook precmd prompt_nicoulaj_precmd add-zsh-hook precmd prompt_nicoulaj_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Customizable parameters. # Customizable parameters.
local max_path_chars=30 local max_path_chars=30
local user_char='' local user_char=''
@ -58,3 +61,4 @@ function prompt_nicoulaj_setup {
} }
prompt_nicoulaj_setup "$@" prompt_nicoulaj_setup "$@"
# vim: ft=zsh

@ -116,6 +116,9 @@ function prompt_paradox_setup {
add-zsh-hook preexec prompt_paradox_preexec add-zsh-hook preexec prompt_paradox_preexec
add-zsh-hook precmd prompt_paradox_precmd add-zsh-hook precmd prompt_paradox_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b' zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
zstyle ':prezto:module:editor:info:keymap:primary' format '%B%F{blue}%f%b' zstyle ':prezto:module:editor:info:keymap:primary' format '%B%F{blue}%f%b'
@ -154,3 +157,4 @@ ${(e)$(prompt_paradox_build_prompt)}
} }
prompt_paradox_setup "$@" prompt_paradox_setup "$@"
# vim: ft=zsh

@ -34,6 +34,9 @@ function prompt_peepcode_setup {
# Add a hook for calling info functions before each command. # Add a hook for calling info functions before each command.
add-zsh-hook precmd prompt_peepcode_precmd add-zsh-hook precmd prompt_peepcode_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set git-info parameters. # Set git-info parameters.
zstyle ':prezto:module:git:info' verbose 'no' zstyle ':prezto:module:git:info' verbose 'no'
zstyle ':prezto:module:git:info:action' format ' +%s' zstyle ':prezto:module:git:info:action' format ' +%s'
@ -83,3 +86,4 @@ function prompt_peepcode_preview {
} }
prompt_peepcode_setup "$@" prompt_peepcode_setup "$@"
# vim: ft=zsh

@ -0,0 +1 @@
../external/powerlevel10k/powerlevel10k.zsh-theme

@ -36,6 +36,9 @@ function prompt_skwp_setup {
# Add hook to set up prompt parameters before each command. # Add hook to set up prompt parameters before each command.
add-zsh-hook precmd prompt_skwp_precmd add-zsh-hook precmd prompt_skwp_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Use extended color pallete if available. # Use extended color pallete if available.
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
_prompt_skwp_colors=( _prompt_skwp_colors=(
@ -73,3 +76,4 @@ function prompt_skwp_setup {
} }
prompt_skwp_setup "$@" prompt_skwp_setup "$@"
# vim: ft=zsh

@ -41,6 +41,9 @@ function prompt_smiley_setup {
# Add hook for calling git-info before each command. # Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_smiley_precmd add-zsh-hook precmd prompt_smiley_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b' zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
@ -63,3 +66,4 @@ function prompt_smiley_setup {
} }
prompt_smiley_setup "$@" prompt_smiley_setup "$@"
# vim: ft=zsh

@ -54,6 +54,13 @@ function prompt_sorin_async_callback {
zle && zle reset-prompt zle && zle reset-prompt
fi fi
;; ;;
"[async]")
# Code is 1 for corrupted worker output and 2 for dead worker.
if [[ $2 -eq 2 ]]; then
# Our worker died unexpectedly.
typeset -g prompt_prezto_async_init=0
fi
;;
esac esac
} }
@ -118,6 +125,9 @@ function prompt_sorin_setup {
# Add hook for calling git-info before each command. # Add hook for calling git-info before each command.
add-zsh-hook precmd prompt_sorin_precmd add-zsh-hook precmd prompt_sorin_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Set editor-info parameters. # Set editor-info parameters.
zstyle ':prezto:module:editor:info:completing' format '%B%F{7}...%f%b' zstyle ':prezto:module:editor:info:completing' format '%B%F{7}...%f%b'
zstyle ':prezto:module:editor:info:keymap:primary' format ' %B%F{1}%F{3}%F{2}%f%b' zstyle ':prezto:module:editor:info:keymap:primary' format ' %B%F{1}%F{3}%F{2}%f%b'
@ -176,3 +186,4 @@ function prompt_sorin_preview {
} }
prompt_sorin_setup "$@" prompt_sorin_setup "$@"
# vim: ft=zsh

@ -41,6 +41,9 @@ function prompt_steeef_setup {
# Add hook for calling vcs_info before each command. # Add hook for calling vcs_info before each command.
add-zsh-hook precmd prompt_steeef_precmd add-zsh-hook precmd prompt_steeef_precmd
# Tell prezto we can manage this prompt
zstyle ':prezto:module:prompt' managed 'yes'
# Use extended color pallete if available. # Use extended color pallete if available.
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
_prompt_steeef_colors=( _prompt_steeef_colors=(
@ -104,3 +107,4 @@ function prompt_steeef_preview {
} }
prompt_steeef_setup "$@" prompt_steeef_setup "$@"
# vim: ft=zsh

@ -35,6 +35,9 @@ execution of `pyenv`.
Install Python versions with `pyenv install` into `~/.pyenv/versions`. Install Python versions with `pyenv install` into `~/.pyenv/versions`.
This will be loaded automatically if pyenv is installed to `$PYENV_ROOT`,
`~/.pyenv`, or if the `pyenv` command is on the path.
Local Package Installation Local Package Installation
-------------------------- --------------------------

@ -7,18 +7,16 @@
# Patrick Bos <egpbos@gmail.com> # Patrick Bos <egpbos@gmail.com>
# #
# Load dependencies
pmodload 'helper'
# Load manually installed pyenv into the path # Load manually installed pyenv into the path
if [[ -n "$PYENV_ROOT" && -s "$PYENV_ROOT/bin/pyenv" ]]; then if [[ -s "${PYENV_ROOT:=$HOME/.pyenv}/bin/pyenv" ]]; then
path=("$PYENV_ROOT/bin" $path) path=("${PYENV_ROOT}/bin" $path)
elif [[ -s "$HOME/.pyenv/bin/pyenv" ]]; then eval "$(pyenv init - --no-rehash zsh)"
path=("$HOME/.pyenv/bin" $path)
fi
# Load pyenv into the current python session # Load pyenv into the current python session
if (( $+commands[pyenv] )); then elif (( $+commands[pyenv] )); then
if [[ -z "$PYENV_ROOT" ]]; then
export PYENV_ROOT=$(pyenv root)
fi
eval "$(pyenv init - --no-rehash zsh)" eval "$(pyenv init - --no-rehash zsh)"
# Prepend PEP 370 per user site packages directory, which defaults to # Prepend PEP 370 per user site packages directory, which defaults to
@ -27,7 +25,7 @@ if (( $+commands[pyenv] )); then
else else
if [[ -n "$PYTHONUSERBASE" ]]; then if [[ -n "$PYTHONUSERBASE" ]]; then
path=($PYTHONUSERBASE/bin $path) path=($PYTHONUSERBASE/bin $path)
elif [[ "$OSTYPE" == darwin* ]]; then elif is-darwin; then
path=($HOME/Library/Python/*/bin(N) $path) path=($HOME/Library/Python/*/bin(N) $path)
else else
# This is subject to change. # This is subject to change.
@ -150,7 +148,7 @@ fi
# Load PIP completion. # Load PIP completion.
if (( $#commands[(i)pip(|[23])] )); then if (( $#commands[(i)pip(|[23])] )); then
cache_file="${TMPDIR:-/tmp}/prezto-pip-cache.$UID.zsh" cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/pip-cache.zsh"
# Detect and use one available from among 'pip', 'pip2', 'pip3' variants # Detect and use one available from among 'pip', 'pip2', 'pip3' variants
pip_command="$commands[(i)pip(|[23])]" pip_command="$commands[(i)pip(|[23])]"
@ -158,6 +156,7 @@ if (( $#commands[(i)pip(|[23])] )); then
if [[ "$pip_command" -nt "$cache_file" \ if [[ "$pip_command" -nt "$cache_file" \
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \ || "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|| ! -s "$cache_file" ]]; then || ! -s "$cache_file" ]]; then
mkdir -p "$cache_file:h"
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants # pip is slow; cache its output. And also support 'pip2', 'pip3' variants
$pip_command completion --zsh \ $pip_command completion --zsh \
| sed -e "s/\(compctl -K [-_[:alnum:]]* pip\).*/\1{,2,3}{,.{0..9}}/" \ | sed -e "s/\(compctl -K [-_[:alnum:]]* pip\).*/\1{,2,3}{,.{0..9}}/" \

@ -10,6 +10,9 @@ if (( ! $+commands[rsync] )); then
return 1 return 1
fi fi
# Load dependencies.
pmodload 'helper'
# #
# Aliases # Aliases
# #
@ -23,7 +26,7 @@ fi
# macOS and HFS+ Enhancements # macOS and HFS+ Enhancements
# https://bombich.com/kb/ccc5/credits # https://bombich.com/kb/ccc5/credits
if [[ "$OSTYPE" == darwin* ]] && grep -q 'file-flags' <(rsync --help 2>&1); then if is-darwin && grep -q 'file-flags' <(rsync --help 2>&1); then
_rsync_cmd="${_rsync_cmd} --crtimes --fileflags --protect-decmpfs --force-change" _rsync_cmd="${_rsync_cmd} --crtimes --fileflags --protect-decmpfs --force-change"
fi fi

@ -32,6 +32,9 @@ multiple, isolated Ruby installations in the home directory.
While it is not as feature rich as RVM, it is not loaded into the shell and is While it is not as feature rich as RVM, it is not loaded into the shell and is
not known to cause conflicts with shell scripts. not known to cause conflicts with shell scripts.
This will be loaded automatically if rbenv is installed to `$RBENV_ROOT`,
`~/.rbenv`, or if the `rbenv` command is on the path.
chruby chruby
------ ------

@ -15,8 +15,8 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
source "$HOME/.rvm/scripts/rvm" source "$HOME/.rvm/scripts/rvm"
# Load manually installed rbenv into the shell session. # Load manually installed rbenv into the shell session.
elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then elif [[ -s "${RBENV_ROOT:=$HOME/.rbenv}/bin/rbenv" ]]; then
path=("$HOME/.rbenv/bin" $path) path=("${RBENV_ROOT}/bin" $path)
eval "$(rbenv init - --no-rehash zsh)" eval "$(rbenv init - --no-rehash zsh)"
# Load package manager installed rbenv into the shell session. # Load package manager installed rbenv into the shell session.

@ -14,10 +14,10 @@ fi
_ssh_dir="$HOME/.ssh" _ssh_dir="$HOME/.ssh"
# Set the path to the environment file if not set by another module. # Set the path to the environment file if not set by another module.
_ssh_agent_env="${_ssh_agent_env:-${TMPDIR:-/tmp}/ssh-agent.env.$UID}" _ssh_agent_env="${_ssh_agent_env:-${XDG_CACHE_HOME:-$HOME/.cache}/prezto/ssh-agent.env}"
# Set the path to the persistent authentication socket. # Set the path to the persistent authentication socket.
_ssh_agent_sock="${TMPDIR:-/tmp}/ssh-agent.sock.$UID" _ssh_agent_sock="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/ssh-agent.sock"
# Start ssh-agent if not started. # Start ssh-agent if not started.
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
@ -26,12 +26,14 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
# Start ssh-agent if not started. # Start ssh-agent if not started.
if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then if ! ps -U "$LOGNAME" -o pid,ucomm | grep -q -- "${SSH_AGENT_PID:--1} ssh-agent"; then
mkdir -p "$_ssh_agent_env:h"
eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")" eval "$(ssh-agent | sed '/^echo /d' | tee "$_ssh_agent_env")"
fi fi
fi fi
# Create a persistent SSH authentication socket. # Create a persistent SSH authentication socket.
if [[ -S "$SSH_AUTH_SOCK" && "$SSH_AUTH_SOCK" != "$_ssh_agent_sock" ]]; then if [[ -S "$SSH_AUTH_SOCK" && "$SSH_AUTH_SOCK" != "$_ssh_agent_sock" ]]; then
mkdir -p "$_ssh_agent_sock:h"
ln -sf "$SSH_AUTH_SOCK" "$_ssh_agent_sock" ln -sf "$SSH_AUTH_SOCK" "$_ssh_agent_sock"
fi fi

@ -1 +1 @@
Subproject commit 1e34c4aa0bcbdde5173aab15600784edf0a212fd Subproject commit 932e29a0c75411cb618f02995b66c0a4a25699bc

@ -23,7 +23,7 @@ if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
_tmux_iterm_integration='-CC' _tmux_iterm_integration='-CC'
fi fi
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && -z "$VSCODE_PID" ]] && ( \ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" ]] && ( \
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) || ( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \ ( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
); then ); then

@ -62,6 +62,12 @@ Aliases
- `mysql` - `mysql`
- `rm` - `rm`
To disable all spelling corrections, add the following line to *zpreztorc*:
```sh
zstyle ':prezto:module:utility' correct 'no'
```
### Disabled File Globbing ### Disabled File Globbing
- `bower` - `bower`

@ -11,7 +11,9 @@
pmodload 'helper' 'spectrum' pmodload 'helper' 'spectrum'
# Correct commands. # Correct commands.
setopt CORRECT if zstyle -T ':prezto:module:utility' correct; then
setopt CORRECT
fi
# #
# Aliases # Aliases
@ -64,10 +66,10 @@ alias mvi="${aliases[mv]:-mv} -i"
alias cpi="${aliases[cp]:-cp} -i" alias cpi="${aliases[cp]:-cp} -i"
alias lni="${aliases[ln]:-ln} -i" alias lni="${aliases[ln]:-ln} -i"
if zstyle -T ':prezto:module:utility' safe-ops; then if zstyle -T ':prezto:module:utility' safe-ops; then
alias rm='rmi' alias rm="${aliases[rm]:-rm} -i"
alias mv='mvi' alias mv="${aliases[mv]:-mv} -i"
alias cp='cpi' alias cp="${aliases[cp]:-cp} -i"
alias ln='lni' alias ln="${aliases[ln]:-ln} -i"
fi fi
# ls # ls
@ -132,9 +134,9 @@ if zstyle -t ':prezto:module:utility:grep' color; then
fi fi
# macOS Everywhere # macOS Everywhere
if [[ "$OSTYPE" == darwin* ]]; then if is-darwin; then
alias o='open' alias o='open'
elif [[ "$OSTYPE" == cygwin* ]]; then elif is-cygwin; then
alias o='cygstart' alias o='cygstart'
alias pbcopy='tee > /dev/clipboard' alias pbcopy='tee > /dev/clipboard'
alias pbpaste='cat /dev/clipboard' alias pbpaste='cat /dev/clipboard'
@ -164,7 +166,7 @@ fi
alias df='df -kh' alias df='df -kh'
alias du='du -kh' alias du='du -kh'
if [[ "$OSTYPE" == (darwin*|*bsd*) ]]; then if is-darwin || is-bsd; then
alias topc='top -o cpu' alias topc='top -o cpu'
alias topm='top -o vsize' alias topm='top -o vsize'
else else

@ -8,14 +8,14 @@
# Execute code that does not affect the current session in the background. # Execute code that does not affect the current session in the background.
{ {
# Compile the completion dump to increase startup speed. # Compile the completion dump to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zcompile "$zcompdump" zcompile "$zcompdump"
fi fi
} &! } &!
# Execute code only if STDERR is bound to a TTY. # Execute code only if STDERR is bound to a TTY.
[[ -o INTERACTIVE && -t 2 ]] && { if [[ -o INTERACTIVE && -t 2 ]]; then
# Print a random, hopefully interesting, adage. # Print a random, hopefully interesting, adage.
if (( $+commands[fortune] )); then if (( $+commands[fortune] )); then
@ -23,4 +23,4 @@
print print
fi fi
} >&2 fi >&2

@ -18,6 +18,9 @@ zstyle ':prezto:*:*' color 'yes'
# Add additional directories to load prezto modules from # Add additional directories to load prezto modules from
# zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib # zstyle ':prezto:load' pmodule-dirs $HOME/.zprezto-contrib
# Allow module overrides when pmodule-dirs causes module name collisions
# zstyle ':prezto:load' pmodule-allow-overrides 'yes'
# Set the Zsh modules to load (man zshmodules). # Set the Zsh modules to load (man zshmodules).
# zstyle ':prezto:load' zmodule 'attr' 'stat' # zstyle ':prezto:load' zmodule 'attr' 'stat'

Loading…
Cancel
Save