mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-01-23 07:12:17 +08:00
Merge branch 'master' into nixos-gpg-module-fix
This commit is contained in:
commit
2fc2920349
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -28,3 +28,8 @@
|
||||
[submodule "modules/prompt/external/powerlevel9k"]
|
||||
path = modules/prompt/external/powerlevel9k
|
||||
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
|
||||
|
12
init.zsh
12
init.zsh
@ -44,7 +44,7 @@ function zprezto-update {
|
||||
printf "There is an update available. Trying to pull.\n\n"
|
||||
if git pull --ff-only; then
|
||||
printf "Syncing submodules\n"
|
||||
git submodule update --recursive
|
||||
git submodule update --init --recursive
|
||||
return $?
|
||||
else
|
||||
cannot-fast-forward
|
||||
@ -98,18 +98,20 @@ function pmodload {
|
||||
else
|
||||
locations=(${pmodule_dirs:+${^pmodule_dirs}/$pmodule(-/FN)})
|
||||
if (( ${#locations} > 1 )); then
|
||||
print "$0: conflicting module locations: $locations"
|
||||
continue
|
||||
if ! zstyle -t ':prezto:load' pmodule-allow-overrides 'yes'; then
|
||||
print "$0: conflicting module locations: $locations"
|
||||
continue
|
||||
fi
|
||||
elif (( ${#locations} < 1 )); then
|
||||
print "$0: no such module: $pmodule"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Grab the full path to this module
|
||||
pmodule_location=${locations[1]}
|
||||
pmodule_location=${locations[-1]}
|
||||
|
||||
# Add functions to $fpath.
|
||||
fpath=(${pmodule_location}/functions(/FN) $fpath)
|
||||
fpath=(${pmodule_location}/functions(-/FN) $fpath)
|
||||
|
||||
function {
|
||||
local pfunction
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
# 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
|
||||
cat >&2 <<EOF
|
||||
@ -40,7 +40,15 @@ else
|
||||
_gzip_bin='gzip'
|
||||
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'
|
||||
else
|
||||
_bzip2_bin='bzip2'
|
||||
@ -49,7 +57,7 @@ fi
|
||||
case "${archive_name}" in
|
||||
(*.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.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) tar -cvf "${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_path
|
||||
local extract_dir
|
||||
local _gzip_bin _bzip2_bin _xz_bin
|
||||
|
||||
if (( $# == 0 )); then
|
||||
cat >&2 <<EOF
|
||||
@ -30,6 +31,29 @@ if [[ "$1" == "-r" || "$1" == "--remove" ]]; then
|
||||
shift
|
||||
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
|
||||
if [[ ! -s "$1" ]]; then
|
||||
print "$0: file not valid: $1" >&2
|
||||
@ -42,15 +66,13 @@ while (( $# > 0 )); do
|
||||
file_path="${1:A}"
|
||||
extract_dir="${file_name:r}"
|
||||
case "$1:l" in
|
||||
(*.tar.gz|*.tgz) tar xvzf "$1" ;;
|
||||
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
|
||||
(*.tar.xz|*.txz) tar --xz --help &> /dev/null \
|
||||
&& tar --xz -xvf "$1" \
|
||||
|| xzcat "$1" | tar xvf - ;;
|
||||
(*.tar.gz|*.tgz) tar -xvf "$1" --use-compress-program="${_gzip_bin}" ;;
|
||||
(*.tar.bz2|*.tbz|*.tbz2) tar -xvf "$1" --use-compress-program="${_bzip2_bin}" ;;
|
||||
(*.tar.xz|*.txz) tar -xvf "$1" --use-compress-program="${_xz_bin}" ;;
|
||||
(*.tar.zma|*.tlz) tar --lzma --help &> /dev/null \
|
||||
&& tar --lzma -xvf "$1" \
|
||||
|| lzcat "$1" | tar xvf - ;;
|
||||
(*.tar) tar xvf "$1" ;;
|
||||
|| lzcat "$1" | tar -xvf - ;;
|
||||
(*.tar) tar -xvf "$1" ;;
|
||||
(*.gz) gunzip "$1" ;;
|
||||
(*.bz2) bunzip2 "$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)
|
||||
)
|
||||
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" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
# brew command-not-found-init is slow; cache its output.
|
||||
brew command-not-found-init >! "$cache_file" 2> /dev/null
|
||||
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
|
||||
# shell is opened each day.
|
||||
autoload -Uz compinit
|
||||
_comp_files=(${ZDOTDIR:-$HOME}/.zcompdump(Nm-20))
|
||||
if (( $#_comp_files )); then
|
||||
compinit -i -C
|
||||
_comp_path="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
|
||||
# #q expands globs in conditional expressions
|
||||
if [[ $_comp_path(#qNmh-20) ]]; then
|
||||
# -C (skip function check) implies -i (skip security check).
|
||||
compinit -C -d "$_comp_path"
|
||||
else
|
||||
compinit -i
|
||||
mkdir -p "$_comp_path:h"
|
||||
compinit -i -d "$_comp_path"
|
||||
fi
|
||||
unset _comp_files
|
||||
unset _comp_path
|
||||
|
||||
#
|
||||
# Styles
|
||||
@ -46,7 +49,7 @@ unset _comp_files
|
||||
|
||||
# Use caching to make completion for commands such as dpkg and apt usable.
|
||||
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.
|
||||
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_TO_HOME` pushes to the home directory when no argument is given.
|
||||
- `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.
|
||||
- `EXTENDED_GLOB` uses extended globbing syntax.
|
||||
- `CLOBBER` does not overwrite existing files with `>` and `>>`. Use `>!` and
|
||||
|
@ -106,4 +106,4 @@ Authors
|
||||
|
||||
- [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,28 +91,32 @@ function bindkey-all {
|
||||
# Exposes information about the Zsh Line Editor via the $editor_info associative
|
||||
# array.
|
||||
function editor-info {
|
||||
# Clean up previous $editor_info.
|
||||
unset editor_info
|
||||
typeset -gA 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.
|
||||
unset editor_info
|
||||
typeset -gA editor_info
|
||||
|
||||
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
||||
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
|
||||
editor_info[keymap]="$REPLY"
|
||||
else
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
|
||||
editor_info[keymap]="$REPLY"
|
||||
|
||||
if [[ "$ZLE_STATE" == *overwrite* ]]; then
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
|
||||
editor_info[overwrite]="$REPLY"
|
||||
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
||||
zstyle -s ':prezto:module:editor:info:keymap:alternate' format 'REPLY'
|
||||
editor_info[keymap]="$REPLY"
|
||||
else
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
|
||||
editor_info[overwrite]="$REPLY"
|
||||
fi
|
||||
fi
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary' format 'REPLY'
|
||||
editor_info[keymap]="$REPLY"
|
||||
|
||||
unset REPLY
|
||||
zle zle-reset-prompt
|
||||
if [[ "$ZLE_STATE" == *overwrite* ]]; then
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary:overwrite' format 'REPLY'
|
||||
editor_info[overwrite]="$REPLY"
|
||||
else
|
||||
zstyle -s ':prezto:module:editor:info:keymap:primary:insert' format 'REPLY'
|
||||
editor_info[overwrite]="$REPLY"
|
||||
fi
|
||||
fi
|
||||
|
||||
unset REPLY
|
||||
zle zle-reset-prompt
|
||||
fi
|
||||
}
|
||||
zle -N editor-info
|
||||
|
||||
@ -269,9 +273,11 @@ bindkey -d
|
||||
# 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
|
||||
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
|
||||
|
||||
# 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'.
|
||||
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
|
||||
#
|
||||
|
@ -19,7 +19,7 @@ fi
|
||||
# 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" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -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)
|
||||
fi
|
||||
|
||||
mkdir -p "$cache_file:h"
|
||||
# Cache init code.
|
||||
fasd --init "$init_args[@]" >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
@ -97,7 +97,9 @@ if ! zstyle -t ':prezto:module:git:alias' skip 'yes'; then
|
||||
alias gfc='git clone'
|
||||
alias gfcr='git clone --recurse-submodules'
|
||||
alias gfm='git pull'
|
||||
alias gfma='git pull --autostash'
|
||||
alias gfr='git pull --rebase'
|
||||
alias gfra='git pull --rebase --autostash'
|
||||
|
||||
# Flow (F)
|
||||
alias gFi='git flow init'
|
||||
|
@ -12,7 +12,7 @@ fi
|
||||
|
||||
# Set the default paths to gpg-agent files.
|
||||
_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)"
|
||||
|
||||
# Load environment variables from previous run
|
||||
@ -22,13 +22,14 @@ source "$_gpg_agent_env" 2> /dev/null
|
||||
# Start gpg-agent if not started.
|
||||
if [[ -z "$GPG_AGENT_INFO" && ! -S "${_gpg_agent_socket}" ]]; then
|
||||
# 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")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Inform gpg-agent of the current TTY for user prompts.
|
||||
export GPG_TTY="$(tty)"
|
||||
export GPG_TTY=$TTY
|
||||
|
||||
# Integrate with the SSH module.
|
||||
if grep '^enable-ssh-support' "$_gpg_agent_conf" &> /dev/null; then
|
||||
|
@ -10,8 +10,11 @@ if (( ! $+commands[ghc] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
# 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)
|
||||
else
|
||||
path=($HOME/.cabal/bin(/N) $path)
|
||||
|
@ -29,3 +29,23 @@ function coalesce {
|
||||
done
|
||||
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'
|
||||
|
||||
# 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
|
||||
|
@ -3,6 +3,10 @@ History
|
||||
|
||||
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
|
||||
-------
|
||||
|
||||
|
@ -26,7 +26,7 @@ setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
# 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.
|
||||
SAVEHIST=10000 # The maximum number of events to save in the history file.
|
||||
|
||||
|
@ -18,8 +18,8 @@ Aliases
|
||||
### Homebrew
|
||||
|
||||
- `brewc` cleans outdated brews and their cached archives.
|
||||
- `brewC` cleans outdated brews, including keg-only, and their cached archives.
|
||||
- `brewi` installs a formula.
|
||||
- `brewL` lists installed formulae that are not dependencies of another installed formula.
|
||||
- `brewl` lists installed formulae.
|
||||
- `brewo` lists brews which have an update available.
|
||||
- `brews` searches for a formula.
|
||||
|
@ -5,8 +5,11 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ "$OSTYPE" != (darwin|linux)* ]]; then
|
||||
if ! is-darwin && ! is-linux; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -14,7 +17,7 @@ fi
|
||||
# Variables
|
||||
#
|
||||
|
||||
# Load standard Homebrew shellenv into the shell session.
|
||||
# Load standard Homebrew shellenv into the shell session.
|
||||
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
|
||||
# variables as they are already handled in standard zsh configuration.
|
||||
if (( $+commands[brew] )); then
|
||||
@ -27,8 +30,8 @@ fi
|
||||
|
||||
# Homebrew
|
||||
alias brewc='brew cleanup'
|
||||
alias brewC='brew cleanup --force'
|
||||
alias brewi='brew install'
|
||||
alias brewL='brew leaves'
|
||||
alias brewl='brew list'
|
||||
alias brewo='brew outdated'
|
||||
alias brews='brew search'
|
||||
|
@ -6,8 +6,11 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ "$OSTYPE" != darwin* ]]; then
|
||||
if ! is-darwin; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -10,6 +10,9 @@ nvm
|
||||
[nvm][5] allows for managing multiple, isolated Node.js installations in the
|
||||
home directory.
|
||||
|
||||
This will be loaded automatically if nvm is installed in `$NVM_DIR`,
|
||||
`~/.nvm`, or nvm is installed with homebrew.
|
||||
|
||||
nodenv
|
||||
------
|
||||
|
||||
@ -17,6 +20,9 @@ nodenv
|
||||
Node versions. It's simple and predictable, Just Works, and is rock solid in
|
||||
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
|
||||
---------
|
||||
|
||||
|
@ -23,7 +23,7 @@ elif (( $+commands[node] )) ; then
|
||||
version="${$(node -v)#v}"
|
||||
fi
|
||||
|
||||
if [[ "$version" != (none|) ]]; then
|
||||
if [[ "$version" != (none|system) ]]; then
|
||||
zstyle -s ':prezto:module:node:info:version' format 'version_format'
|
||||
zformat -f version_formatted "$version_format" "v:$version"
|
||||
node_info[version]="$version_formatted"
|
||||
|
@ -7,8 +7,8 @@
|
||||
#
|
||||
|
||||
# Load manually installed NVM into the shell session.
|
||||
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
if [[ -s "${NVM_DIR:=$HOME/.nvm}/nvm.sh" ]]; then
|
||||
source "${NVM_DIR}/nvm.sh"
|
||||
|
||||
# Load package manager installed NVM into the shell session.
|
||||
elif (( $+commands[brew] )) && \
|
||||
@ -17,8 +17,8 @@ elif (( $+commands[brew] )) && \
|
||||
unset nvm_prefix
|
||||
|
||||
# Load manually installed nodenv into the shell session.
|
||||
elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then
|
||||
path=("$HOME/.nodenv/bin" $path)
|
||||
elif [[ -s "${NODENV_ROOT:=$HOME/.nodenv}/bin/nodenv" ]]; then
|
||||
path=("${NODENV_ROOT}/bin" $path)
|
||||
eval "$(nodenv init - --no-rehash zsh)"
|
||||
|
||||
# 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
|
||||
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.
|
||||
if [[ "$commands[$compl_command]" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
command ${=compl_commands[$compl_command]} >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
|
@ -5,8 +5,11 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
# Return if requirements are not found.
|
||||
if [[ "$OSTYPE" != darwin* ]]; then
|
||||
if ! is-darwin; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
# 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 fs="$tmp/fs"
|
||||
|
||||
mkdir "$tmp"
|
||||
mkdir -p "$tmp"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
pacman --quiet --query --list | sort --unique > "$db"
|
||||
|
@ -10,6 +10,9 @@ if (( ! $+commands[perl] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
#
|
||||
# Load Perlbrew or plenv
|
||||
#
|
||||
@ -37,13 +40,14 @@ fi
|
||||
# Local Module Installation
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
if is-darwin; then
|
||||
# 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"
|
||||
|
||||
if [[ -f "$perl_path/lib/perl5/local/lib.pm" ]]; 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"
|
||||
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*
|
||||
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
|
||||
|
||||
There are three theme functions, a setup function, a help function, and
|
||||
|
2
modules/prompt/external/async
vendored
2
modules/prompt/external/async
vendored
@ -1 +1 @@
|
||||
Subproject commit 58f7ba70f05e75802299848e7e31c7d7a7fd0c97
|
||||
Subproject commit 95c2b1577f455728ec01cec001a86c216d0af2bd
|
1
modules/prompt/external/powerlevel10k
vendored
Submodule
1
modules/prompt/external/powerlevel10k
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 801bfbb2946b10527e75e77838a3657d78cb92e5
|
2
modules/prompt/external/pure
vendored
2
modules/prompt/external/pure
vendored
@ -1 +1 @@
|
||||
Subproject commit 7aade5fca2acae3f10e260d0c076af6356da9dc6
|
||||
Subproject commit 2e354b80deae105ea246699c49e65dcd4fe8b759
|
@ -28,3 +28,4 @@ unset current_pwd
|
||||
print "$ret_directory"
|
||||
|
||||
# }
|
||||
# vim: ft=zsh
|
||||
|
@ -104,6 +104,9 @@ function prompt_cloud_setup {
|
||||
# Add hook for calling git-info before each command.
|
||||
add-zsh-hook precmd prompt_cloud_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'yes'
|
||||
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 "$@"
|
||||
# vim: ft=zsh
|
||||
|
@ -40,6 +40,9 @@ function prompt_damoekri_setup {
|
||||
# Add hook for calling git-info and ruby-info before each command.
|
||||
add-zsh-hook precmd prompt_damoekri_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:keymap:primary' format ' %F{green}»%f'
|
||||
|
||||
@ -63,3 +66,4 @@ function 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-zsh-hook precmd prompt_giddie_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:completing' format '%F{green}...%f'
|
||||
zstyle ':prezto:module:editor:info:keymap:alternate' format '%F{yellow}--- COMMAND ---%f'
|
||||
@ -74,3 +77,4 @@ function 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-zsh-hook precmd prompt_kylewest_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
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"
|
||||
@ -63,3 +66,4 @@ function 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-zsh-hook precmd prompt_minimal_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set vcs_info parameters.
|
||||
zstyle ':vcs_info:*' enable bzr git hg svn
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
@ -57,3 +60,4 @@ function prompt_minimal_preview {
|
||||
}
|
||||
|
||||
prompt_minimal_setup "$@"
|
||||
# vim: ft=zsh
|
||||
|
@ -35,6 +35,9 @@ function prompt_nicoulaj_setup {
|
||||
# Add hook for calling vcs_info before each command.
|
||||
add-zsh-hook precmd prompt_nicoulaj_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Customizable parameters.
|
||||
local max_path_chars=30
|
||||
local user_char='❯'
|
||||
@ -58,3 +61,4 @@ function 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 precmd prompt_paradox_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
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'
|
||||
@ -154,3 +157,4 @@ ${(e)$(prompt_paradox_build_prompt)}
|
||||
}
|
||||
|
||||
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-zsh-hook precmd prompt_peepcode_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set git-info parameters.
|
||||
zstyle ':prezto:module:git:info' verbose 'no'
|
||||
zstyle ':prezto:module:git:info:action' format ' +%s'
|
||||
@ -83,3 +86,4 @@ function prompt_peepcode_preview {
|
||||
}
|
||||
|
||||
prompt_peepcode_setup "$@"
|
||||
# vim: ft=zsh
|
||||
|
1
modules/prompt/functions/prompt_powerlevel10k_setup
Symbolic link
1
modules/prompt/functions/prompt_powerlevel10k_setup
Symbolic link
@ -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-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.
|
||||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
|
||||
_prompt_skwp_colors=(
|
||||
@ -73,3 +76,4 @@ function 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-zsh-hook precmd prompt_smiley_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
zstyle ':prezto:module:editor:info:completing' format '%B%F{red}...%f%b'
|
||||
|
||||
@ -63,3 +66,4 @@ function prompt_smiley_setup {
|
||||
}
|
||||
|
||||
prompt_smiley_setup "$@"
|
||||
# vim: ft=zsh
|
||||
|
@ -54,6 +54,13 @@ function prompt_sorin_async_callback {
|
||||
zle && zle reset-prompt
|
||||
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
|
||||
}
|
||||
|
||||
@ -118,6 +125,9 @@ function prompt_sorin_setup {
|
||||
# Add hook for calling git-info before each command.
|
||||
add-zsh-hook precmd prompt_sorin_precmd
|
||||
|
||||
# Tell prezto we can manage this prompt
|
||||
zstyle ':prezto:module:prompt' managed 'yes'
|
||||
|
||||
# Set editor-info parameters.
|
||||
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'
|
||||
@ -176,3 +186,4 @@ function prompt_sorin_preview {
|
||||
}
|
||||
|
||||
prompt_sorin_setup "$@"
|
||||
# vim: ft=zsh
|
||||
|
@ -41,6 +41,9 @@ function prompt_steeef_setup {
|
||||
# Add hook for calling vcs_info before each command.
|
||||
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.
|
||||
if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then
|
||||
_prompt_steeef_colors=(
|
||||
@ -104,3 +107,4 @@ function prompt_steeef_preview {
|
||||
}
|
||||
|
||||
prompt_steeef_setup "$@"
|
||||
# vim: ft=zsh
|
||||
|
@ -35,6 +35,9 @@ execution of `pyenv`.
|
||||
|
||||
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
|
||||
--------------------------
|
||||
|
||||
|
@ -7,18 +7,16 @@
|
||||
# Patrick Bos <egpbos@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies
|
||||
pmodload 'helper'
|
||||
|
||||
# Load manually installed pyenv into the path
|
||||
if [[ -n "$PYENV_ROOT" && -s "$PYENV_ROOT/bin/pyenv" ]]; then
|
||||
path=("$PYENV_ROOT/bin" $path)
|
||||
elif [[ -s "$HOME/.pyenv/bin/pyenv" ]]; then
|
||||
path=("$HOME/.pyenv/bin" $path)
|
||||
fi
|
||||
if [[ -s "${PYENV_ROOT:=$HOME/.pyenv}/bin/pyenv" ]]; then
|
||||
path=("${PYENV_ROOT}/bin" $path)
|
||||
eval "$(pyenv init - --no-rehash zsh)"
|
||||
|
||||
# Load pyenv into the current python session
|
||||
if (( $+commands[pyenv] )); then
|
||||
if [[ -z "$PYENV_ROOT" ]]; then
|
||||
export PYENV_ROOT=$(pyenv root)
|
||||
fi
|
||||
elif (( $+commands[pyenv] )); then
|
||||
eval "$(pyenv init - --no-rehash zsh)"
|
||||
|
||||
# Prepend PEP 370 per user site packages directory, which defaults to
|
||||
@ -27,7 +25,7 @@ if (( $+commands[pyenv] )); then
|
||||
else
|
||||
if [[ -n "$PYTHONUSERBASE" ]]; then
|
||||
path=($PYTHONUSERBASE/bin $path)
|
||||
elif [[ "$OSTYPE" == darwin* ]]; then
|
||||
elif is-darwin; then
|
||||
path=($HOME/Library/Python/*/bin(N) $path)
|
||||
else
|
||||
# This is subject to change.
|
||||
@ -150,7 +148,7 @@ fi
|
||||
|
||||
# Load PIP completion.
|
||||
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
|
||||
pip_command="$commands[(i)pip(|[23])]"
|
||||
@ -158,6 +156,7 @@ if (( $#commands[(i)pip(|[23])] )); then
|
||||
if [[ "$pip_command" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants
|
||||
$pip_command completion --zsh \
|
||||
| sed -e "s/\(compctl -K [-_[:alnum:]]* pip\).*/\1{,2,3}{,.{0..9}}/" \
|
||||
|
@ -10,6 +10,9 @@ if (( ! $+commands[rsync] )); then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
@ -23,7 +26,7 @@ fi
|
||||
|
||||
# macOS and HFS+ Enhancements
|
||||
# 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"
|
||||
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
|
||||
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
|
||||
------
|
||||
|
||||
|
@ -15,8 +15,8 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
|
||||
source "$HOME/.rvm/scripts/rvm"
|
||||
|
||||
# Load manually installed rbenv into the shell session.
|
||||
elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then
|
||||
path=("$HOME/.rbenv/bin" $path)
|
||||
elif [[ -s "${RBENV_ROOT:=$HOME/.rbenv}/bin/rbenv" ]]; then
|
||||
path=("${RBENV_ROOT}/bin" $path)
|
||||
eval "$(rbenv init - --no-rehash zsh)"
|
||||
|
||||
# Load package manager installed rbenv into the shell session.
|
||||
|
@ -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:-/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.
|
||||
_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.
|
||||
if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
|
||||
@ -26,12 +26,14 @@ if [[ ! -S "$SSH_AUTH_SOCK" ]]; then
|
||||
|
||||
# Start ssh-agent if not started.
|
||||
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")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a persistent SSH authentication socket.
|
||||
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"
|
||||
fi
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1e34c4aa0bcbdde5173aab15600784edf0a212fd
|
||||
Subproject commit 932e29a0c75411cb618f02995b66c0a4a25699bc
|
@ -23,7 +23,7 @@ if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
|
||||
_tmux_iterm_integration='-CC'
|
||||
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 ) ||
|
||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||
); then
|
||||
|
@ -62,6 +62,12 @@ Aliases
|
||||
- `mysql`
|
||||
- `rm`
|
||||
|
||||
To disable all spelling corrections, add the following line to *zpreztorc*:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:utility' correct 'no'
|
||||
```
|
||||
|
||||
### Disabled File Globbing
|
||||
|
||||
- `bower`
|
||||
|
@ -11,7 +11,9 @@
|
||||
pmodload 'helper' 'spectrum'
|
||||
|
||||
# Correct commands.
|
||||
setopt CORRECT
|
||||
if zstyle -T ':prezto:module:utility' correct; then
|
||||
setopt CORRECT
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
@ -64,10 +66,10 @@ alias mvi="${aliases[mv]:-mv} -i"
|
||||
alias cpi="${aliases[cp]:-cp} -i"
|
||||
alias lni="${aliases[ln]:-ln} -i"
|
||||
if zstyle -T ':prezto:module:utility' safe-ops; then
|
||||
alias rm='rmi'
|
||||
alias mv='mvi'
|
||||
alias cp='cpi'
|
||||
alias ln='lni'
|
||||
alias rm="${aliases[rm]:-rm} -i"
|
||||
alias mv="${aliases[mv]:-mv} -i"
|
||||
alias cp="${aliases[cp]:-cp} -i"
|
||||
alias ln="${aliases[ln]:-ln} -i"
|
||||
fi
|
||||
|
||||
# ls
|
||||
@ -132,9 +134,9 @@ if zstyle -t ':prezto:module:utility:grep' color; then
|
||||
fi
|
||||
|
||||
# macOS Everywhere
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
if is-darwin; then
|
||||
alias o='open'
|
||||
elif [[ "$OSTYPE" == cygwin* ]]; then
|
||||
elif is-cygwin; then
|
||||
alias o='cygstart'
|
||||
alias pbcopy='tee > /dev/clipboard'
|
||||
alias pbpaste='cat /dev/clipboard'
|
||||
@ -164,7 +166,7 @@ fi
|
||||
alias df='df -kh'
|
||||
alias du='du -kh'
|
||||
|
||||
if [[ "$OSTYPE" == (darwin*|*bsd*) ]]; then
|
||||
if is-darwin || is-bsd; then
|
||||
alias topc='top -o cpu'
|
||||
alias topm='top -o vsize'
|
||||
else
|
||||
|
@ -8,14 +8,14 @@
|
||||
# Execute code that does not affect the current session in the background.
|
||||
{
|
||||
# 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
|
||||
zcompile "$zcompdump"
|
||||
fi
|
||||
} &!
|
||||
|
||||
# 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.
|
||||
if (( $+commands[fortune] )); then
|
||||
@ -23,4 +23,4 @@
|
||||
print
|
||||
fi
|
||||
|
||||
} >&2
|
||||
fi >&2
|
||||
|
@ -18,6 +18,9 @@ zstyle ':prezto:*:*' color 'yes'
|
||||
# Add additional directories to load prezto modules from
|
||||
# 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).
|
||||
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user