mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-02-02 21:12:16 +08:00
Merge branch 'sorin-ionescu:master' into master
This commit is contained in:
commit
f87530f2cd
10
README.md
10
README.md
@ -41,7 +41,7 @@ version is **4.3.11**.
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
|
||||||
export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"
|
[[ -d $XDG_CONFIG_HOME/zsh ]] && export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||||
source "$ZDOTDIR/.zshenv"
|
source "$ZDOTDIR/.zshenv"
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -73,14 +73,6 @@ version is **4.3.11**.
|
|||||||
|
|
||||||
05. Open a new Zsh terminal window or tab.
|
05. Open a new Zsh terminal window or tab.
|
||||||
|
|
||||||
### [Fig](https://fig.io)
|
|
||||||
|
|
||||||
Fig adds apps, shortcuts, and autocomplete to your existing terminal.
|
|
||||||
|
|
||||||
Install `prezto` in just one click.
|
|
||||||
|
|
||||||
<a href="https://fig.io/plugins/other/prezto" target="_blank"><img src="https://fig.io/badges/install-with-fig.svg" /></a>
|
|
||||||
|
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
If you are not able to find certain commands after switching to Prezto, modify
|
If you are not able to find certain commands after switching to Prezto, modify
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
|
Subproject commit c3d4e576c9c86eac62884bd47c01f6faed043fc5
|
@ -1 +1 @@
|
|||||||
Subproject commit 0331b2908f93556453e45fa5a899aa21e0a7f64d
|
Subproject commit 978e79e12c44b5b1d3e1e2920c537002087b82c2
|
@ -84,7 +84,7 @@ if zstyle -t ':prezto:module:completion:*' case-sensitive; then
|
|||||||
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
setopt CASE_GLOB
|
setopt CASE_GLOB
|
||||||
else
|
else
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'm:{[:upper:]}={[:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
unsetopt CASE_GLOB
|
unsetopt CASE_GLOB
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,6 +17,13 @@ Sets directory options and defines directory aliases.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:directory:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `d` prints the contents of the directory stack.
|
- `d` prints the contents of the directory stack.
|
||||||
- `1 ... 9` changes the directory to the **n** previous one.
|
- `1 ... 9` changes the directory to the **n** previous one.
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias -- -='cd -'
|
if ! zstyle -t ':prezto:module:directory:alias' skip; then
|
||||||
alias d='dirs -v'
|
alias -- -='cd -'
|
||||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
alias d='dirs -v'
|
||||||
|
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||||
|
fi
|
||||||
|
@ -12,6 +12,17 @@ Sets editor specific key bindings options and variables.
|
|||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
|
### Wordchars
|
||||||
|
|
||||||
|
To change what characters are considered part of a word, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:editor' wordchars <chars>
|
||||||
|
```
|
||||||
|
|
||||||
|
Defaults to `*?_-.[]~&;!#$%^(){}<>`.
|
||||||
|
|
||||||
### Key bindings
|
### Key bindings
|
||||||
|
|
||||||
To enable key bindings, add the following to _`${ZDOTDIR:-$HOME}/.zpreztorc`_,
|
To enable key bindings, add the following to _`${ZDOTDIR:-$HOME}/.zpreztorc`_,
|
||||||
|
@ -21,7 +21,8 @@ setopt BEEP # Beep on error in line editor.
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Treat these characters as part of a word.
|
# Treat these characters as part of a word.
|
||||||
WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
|
zstyle -s ':prezto:module:editor' wordchars 'WORDCHARS' \
|
||||||
|
|| WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
|
||||||
|
|
||||||
# Use human-friendly identifiers.
|
# Use human-friendly identifiers.
|
||||||
zmodload zsh/terminfo
|
zmodload zsh/terminfo
|
||||||
|
@ -12,6 +12,13 @@ execution of `carton`.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:emacs:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
### Carton
|
### Carton
|
||||||
|
|
||||||
- `cai` installs dependencies.
|
- `cai` installs dependencies.
|
||||||
|
@ -19,7 +19,9 @@ source "$HOME/.cask/etc/cask_completion.zsh" 2> /dev/null
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias cai='cask install'
|
if ! zstyle -t ':prezto:module:emacs:alias' skip; then
|
||||||
alias cau='cask update'
|
alias cai='cask install'
|
||||||
alias caI='cask init'
|
alias cau='cask update'
|
||||||
alias cae='cask exec'
|
alias caI='cask init'
|
||||||
|
alias cae='cask exec'
|
||||||
|
fi
|
||||||
|
@ -19,6 +19,13 @@ instead of the bundled version.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:fasd:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `j` changes the current working directory interactively.
|
- `j` changes the current working directory interactively.
|
||||||
|
|
||||||
## Completion
|
## Completion
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 48220241e764fdf46b075cd7fe723468aaadde58
|
Subproject commit 90b531a5daaa545c74c7d98974b54cbdb92659fc
|
@ -53,5 +53,7 @@ function fasd_cd {
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
# Changes the current working directory interactively.
|
if ! zstyle -t ':prezto:module:fasd:alias' skip; then
|
||||||
alias j='fasd_cd -i'
|
# Changes the current working directory interactively.
|
||||||
|
alias j='fasd_cd -i'
|
||||||
|
fi
|
||||||
|
@ -44,8 +44,7 @@ _gnu_utility_cmds=(
|
|||||||
'libtool' 'libtoolize'
|
'libtool' 'libtoolize'
|
||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
'egrep' 'fgrep' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units'
|
'awk' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'which'
|
||||||
'which'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Wrap GNU utilities in functions.
|
# Wrap GNU utilities in functions.
|
||||||
|
@ -65,6 +65,42 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
|||||||
zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Case sensitive search
|
||||||
|
|
||||||
|
To set the search case-sensitivity, add the following line to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fuzzy search
|
||||||
|
|
||||||
|
To enable search for fuzzy matches, add the following line to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Unique results
|
||||||
|
|
||||||
|
To enable unique results, add the following line to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:history-substring-search' unique 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Prefixed search
|
||||||
|
|
||||||
|
To enable prefixed search matches, add the following line to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
_The authors of this module should be contacted via the [issue tracker][5]._
|
_The authors of this module should be contacted via the [issue tracker][5]._
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 0f80b8eb3368b46e5e573c1d91ae69eb095db3fb
|
Subproject commit 8dd05bfcc12b0cd1ee9ea64be725b3d9f713cf64
|
@ -38,6 +38,18 @@ if ! zstyle -t ':prezto:module:history-substring-search' color; then
|
|||||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if zstyle -t ':prezto:module:history-substring-search' fuzzy; then
|
||||||
|
HISTORY_SUBSTRING_SEARCH_FUZZY=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if zstyle -t ':prezto:module:history-substring-search' unique; then
|
||||||
|
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if zstyle -t ':prezto:module:history-substring-search' prefixed; then
|
||||||
|
HISTORY_SUBSTRING_SEARCH_PREFIXED=1
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Key Bindings
|
# Key Bindings
|
||||||
#
|
#
|
||||||
|
@ -36,6 +36,13 @@ Alternately, you can set `HISTFILE` manually to _`${ZDOTDIR:-$HOME}/.zhistory`_.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:history:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `history-stat` lists the ten most used commands
|
- `history-stat` lists the ten most used commands
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
@ -10,58 +10,34 @@
|
|||||||
# Options
|
# Options
|
||||||
#
|
#
|
||||||
|
|
||||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||||
setopt SHARE_HISTORY # Share history between all sessions.
|
setopt SHARE_HISTORY # Share history between all sessions.
|
||||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
setopt HIST_EXPIRE_DUPS_FIRST # Expire a duplicate event first when trimming history.
|
||||||
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
setopt HIST_IGNORE_DUPS # Do not record an event that was just recorded again.
|
||||||
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
setopt HIST_IGNORE_ALL_DUPS # Delete an old recorded event if a new event is a duplicate.
|
||||||
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
setopt HIST_FIND_NO_DUPS # Do not display a previously found event.
|
||||||
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
setopt HIST_IGNORE_SPACE # Do not record an event starting with a space.
|
||||||
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history file.
|
||||||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||||
|
|
||||||
#
|
#
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
|
|
||||||
zstyle -s ':prezto:module:history' histfile '_pmh_histfile' || _pmh_histfile="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}"
|
zstyle -s ':prezto:module:history' histfile 'HISTFILE' \
|
||||||
zstyle -s ':prezto:module:history' histsize '_pmh_histsize' || _pmh_histsize=10000
|
|| HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # The path to the history file.
|
||||||
zstyle -s ':prezto:module:history' savehist '_pmh_savehist' || _pmh_savehist=${_pmh_histsize}
|
zstyle -s ':prezto:module:history' histsize 'HISTSIZE' \
|
||||||
HISTFILE="${_pmh_histfile}" # The path to the history file.
|
|| HISTSIZE=10000 # The maximum number of events to save in the internal history.
|
||||||
HISTSIZE="${_pmh_histsize}" # The maximum number of events to save in the internal history.
|
zstyle -s ':prezto:module:history' savehist 'SAVEHIST' \
|
||||||
SAVEHIST="${_pmh_savehist}" # The maximum number of events to save in the history file.
|
|| SAVEHIST=$HISTSIZE # The maximum number of events to save in the history file.
|
||||||
unset _pmh_{hist{file,size},savehist}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
# Lists the ten most used commands.
|
if ! zstyle -t ':prezto:module:history:alias' skip; then
|
||||||
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
|
# Lists the ten most used commands.
|
||||||
|
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
|
||||||
if [[ -s "${OLD_HISTFILE::=${HISTFILE:h}/.zhistory}" ]]; then
|
|
||||||
|
|
||||||
# New 'HISTFILE' doesn't exist yet, rename legacy one if available and notify.
|
|
||||||
if [[ ! -s "$HISTFILE" ]]; then
|
|
||||||
<<EON
|
|
||||||
NOTICE: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
|
|
||||||
to '${HISTFILE/#$HOME/~}'.
|
|
||||||
Attempting to rename the existing 'HISTFILE' ...
|
|
||||||
EON
|
|
||||||
command mv -v "$OLD_HISTFILE" "$HISTFILE"
|
|
||||||
|
|
||||||
# New 'HISTFILE' does exist and is older than legacy one, just warn.
|
|
||||||
elif [[ "$OLD_HISTFILE" -nt "$HISTFILE" ]]; then
|
|
||||||
<<EOW
|
|
||||||
WARNING: Default path of 'HISTFILE' has changed from '${OLD_HISTFILE/#$HOME/~}'
|
|
||||||
to '${HISTFILE/#$HOME/~}'.
|
|
||||||
Either set 'HISTFILE' in '${${0:h}/#$HOME/~}'
|
|
||||||
or move previous history from '${OLD_HISTFILE/#$HOME/~}' to
|
|
||||||
'${HISTFILE/#$HOME/~}'.
|
|
||||||
EOW
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset OLD_HISTFILE
|
|
||||||
fi
|
fi
|
||||||
|
@ -12,6 +12,13 @@ brew shellenv
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:homebrew:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
### Homebrew Core
|
### Homebrew Core
|
||||||
|
|
||||||
- `brewc` cleans outdated brews and their cached archives.
|
- `brewc` cleans outdated brews and their cached archives.
|
||||||
|
@ -21,7 +21,17 @@ fi
|
|||||||
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
|
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
|
||||||
# variables as they are already handled in standard zsh configuration.
|
# variables as they are already handled in standard zsh configuration.
|
||||||
if (( $+commands[brew] )); then
|
if (( $+commands[brew] )); then
|
||||||
eval "${(@M)${(f)"$(brew shellenv 2> /dev/null)"}:#export HOMEBREW*}"
|
cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/brew-shellenv-cache.zsh"
|
||||||
|
if [[ "$commands[brew]" -nt "$cache_file" \
|
||||||
|
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||||
|
|| ! -s "$cache_file" ]]; then
|
||||||
|
mkdir -p "$cache_file:h"
|
||||||
|
# Cache the result.
|
||||||
|
echo "${(@M)${(f)"$(brew shellenv 2> /dev/null)"}:#export HOMEBREW*}" >! "$cache_file" 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$cache_file"
|
||||||
|
unset cache_file
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -29,19 +39,21 @@ fi
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Homebrew
|
# Homebrew
|
||||||
alias brewc='brew cleanup'
|
if ! zstyle -t ':prezto:module:homebrew:alias' skip; then
|
||||||
alias brewi='brew install'
|
alias brewc='brew cleanup'
|
||||||
alias brewL='brew leaves'
|
alias brewi='brew install'
|
||||||
alias brewl='brew list'
|
alias brewL='brew leaves'
|
||||||
alias brewo='brew outdated'
|
alias brewl='brew list'
|
||||||
alias brews='brew search'
|
alias brewo='brew outdated'
|
||||||
alias brewu='brew upgrade'
|
alias brews='brew search'
|
||||||
alias brewx='brew uninstall'
|
alias brewu='brew upgrade'
|
||||||
|
alias brewx='brew uninstall'
|
||||||
|
|
||||||
# Homebrew Cask
|
# Homebrew Cask
|
||||||
alias caski='brew install --cask'
|
alias caski='brew install --cask'
|
||||||
alias caskl='brew list --cask'
|
alias caskl='brew list --cask'
|
||||||
alias casko='brew outdated --cask'
|
alias casko='brew outdated --cask'
|
||||||
alias casks='brew search --cask'
|
alias casks='brew search --cask'
|
||||||
alias casku='brew upgrade --cask'
|
alias casku='brew upgrade --cask'
|
||||||
alias caskx='brew uninstall --cask'
|
alias caskx='brew uninstall --cask'
|
||||||
|
fi
|
||||||
|
@ -4,6 +4,13 @@ Defines MacPorts aliases and adds MacPorts directories to path variables.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:macports:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `portc` cleans the files used to build ports.
|
- `portc` cleans the files used to build ports.
|
||||||
- `porti` installs a port.
|
- `porti` installs a port.
|
||||||
- `ports` searches for a port.
|
- `ports` searches for a port.
|
||||||
|
@ -28,10 +28,12 @@ path=(
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias portc='sudo port clean --all installed'
|
if ! zstyle -t ':prezto:module:macports:alias' skip; then
|
||||||
alias porti='sudo port install'
|
alias portc='sudo port clean --all installed'
|
||||||
alias ports='port search'
|
alias porti='sudo port install'
|
||||||
alias portU='sudo port selfupdate && sudo port upgrade outdated'
|
alias ports='port search'
|
||||||
alias portu='sudo port upgrade'
|
alias portU='sudo port selfupdate && sudo port upgrade outdated'
|
||||||
alias portX='sudo port -u uninstall'
|
alias portu='sudo port upgrade'
|
||||||
alias portx='sudo port uninstall'
|
alias portX='sudo port -u uninstall'
|
||||||
|
alias portx='sudo port uninstall'
|
||||||
|
fi
|
||||||
|
@ -29,6 +29,13 @@ _`$XDG_CONFIG_HOME/nvm`_, _`~/.nvm`_, or is installed with homebrew.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:node:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
### npm
|
### npm
|
||||||
|
|
||||||
- `npmi` install a package.
|
- `npmi` install a package.
|
||||||
|
@ -48,18 +48,20 @@ N_PREFIX="${XDG_CONFIG_HOME:-$HOME/.config}/n" # The path to 'n' cache.
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
# npm
|
if ! zstyle -t ':prezto:module:node:alias' skip; then
|
||||||
alias npmi='npm install'
|
# npm
|
||||||
alias npml='npm list'
|
alias npmi='npm install'
|
||||||
alias npmo='npm outdated'
|
alias npml='npm list'
|
||||||
alias npmp='npm publish'
|
alias npmo='npm outdated'
|
||||||
alias npmP='npm prune'
|
alias npmp='npm publish'
|
||||||
alias npmr='npm run'
|
alias npmP='npm prune'
|
||||||
alias npms='npm search'
|
alias npmr='npm run'
|
||||||
alias npmt='npm test'
|
alias npms='npm search'
|
||||||
alias npmu='npm update'
|
alias npmt='npm test'
|
||||||
alias npmx='npm uninstall'
|
alias npmu='npm update'
|
||||||
|
alias npmx='npm uninstall'
|
||||||
|
|
||||||
alias npmci='npm ci'
|
alias npmci='npm ci'
|
||||||
alias npmcit='npm cit'
|
alias npmcit='npm cit'
|
||||||
alias npmit='npm it'
|
alias npmit='npm it'
|
||||||
|
fi
|
||||||
|
@ -9,7 +9,7 @@ function manp {
|
|||||||
local page
|
local page
|
||||||
if (( $# > 0 )); then
|
if (( $# > 0 )); then
|
||||||
for page in "$@"; do
|
for page in "$@"; do
|
||||||
man -t "$page" | open -f -a Preview
|
mandoc -T pdf "$(/usr/bin/man -w $page)" | open -fa Preview
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
print 'What manual page do you want?' >&2
|
print 'What manual page do you want?' >&2
|
||||||
|
31
modules/osx/functions/trash
Normal file
31
modules/osx/functions/trash
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Moves files to the macOS trash.
|
||||||
|
#
|
||||||
|
|
||||||
|
# function trash {
|
||||||
|
|
||||||
|
emulate -L zsh
|
||||||
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||||
|
|
||||||
|
local file
|
||||||
|
local -a files=()
|
||||||
|
for file in $@; do
|
||||||
|
if [[ -e $file ]]; then
|
||||||
|
# ':a' gets the full path (do not use ':A', which would resolve symlinks)
|
||||||
|
files+=("the POSIX file \"${file:a}\"")
|
||||||
|
else
|
||||||
|
print "trash: No such file or directory '$file'." >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( $#files == 0 )); then
|
||||||
|
print 'usage: trash <files...>' >&2
|
||||||
|
return 64 # Match rm's return code.
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Join file list with commas, and tell Finder to trash that list.
|
||||||
|
local file_list="${(pj., .)files}"
|
||||||
|
osascript 2>&1 > /dev/null -e "tell app \"Finder\" to move { "${file_list}" } to trash"
|
||||||
|
|
||||||
|
# }
|
@ -40,6 +40,13 @@ The subcommands of _plenv_ is similar with _rbenv_.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:perl:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
||||||
- `pl` is short for `perl`.
|
- `pl` is short for `perl`.
|
||||||
|
@ -61,37 +61,39 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
# General
|
if ! zstyle -t ':prezto:module:perl:alias' skip; then
|
||||||
alias pl='perl'
|
# General
|
||||||
alias pld='perldoc'
|
alias pl='perl'
|
||||||
alias ple='perl -wlne'
|
alias pld='perldoc'
|
||||||
|
alias ple='perl -wlne'
|
||||||
|
|
||||||
# Perlbrew
|
# Perlbrew
|
||||||
if (( $+commands[perlbrew] )); then
|
if (( $+commands[perlbrew] )); then
|
||||||
alias plb='perlbrew'
|
alias plb='perlbrew'
|
||||||
alias plba='perlbrew available'
|
alias plba='perlbrew available'
|
||||||
alias plbi='perlbrew install'
|
alias plbi='perlbrew install'
|
||||||
alias plbl='perlbrew list'
|
alias plbl='perlbrew list'
|
||||||
alias plbo='perlbrew off'
|
alias plbo='perlbrew off'
|
||||||
alias plbO='perlbrew switch-off'
|
alias plbO='perlbrew switch-off'
|
||||||
alias plbs='perlbrew switch'
|
alias plbs='perlbrew switch'
|
||||||
alias plbu='perlbrew use'
|
alias plbu='perlbrew use'
|
||||||
alias plbx='perlbrew uninstall'
|
alias plbx='perlbrew uninstall'
|
||||||
|
|
||||||
elif (( $+commands[plenv] )); then
|
elif (( $+commands[plenv] )); then
|
||||||
alias plv='plenv'
|
alias plv='plenv'
|
||||||
alias plvc='plenv commands'
|
alias plvc='plenv commands'
|
||||||
alias plvl='plenv local'
|
alias plvl='plenv local'
|
||||||
alias plvg='plenv global'
|
alias plvg='plenv global'
|
||||||
alias plvs='plenv shell'
|
alias plvs='plenv shell'
|
||||||
alias plvi='plenv install'
|
alias plvi='plenv install'
|
||||||
alias plvu='plenv uninstall'
|
alias plvu='plenv uninstall'
|
||||||
alias plvr='plenv rehash'
|
alias plvr='plenv rehash'
|
||||||
alias plvv='plenv version'
|
alias plvv='plenv version'
|
||||||
alias plvV='plenv versions'
|
alias plvV='plenv versions'
|
||||||
alias plvw='plenv which'
|
alias plvw='plenv which'
|
||||||
alias plvW='plenv whence'
|
alias plvW='plenv whence'
|
||||||
alias plvm='plenv list-modules'
|
alias plvm='plenv list-modules'
|
||||||
alias plvM='plenv migrate-modules'
|
alias plvM='plenv migrate-modules'
|
||||||
alias plvI='plenv install-cpanm'
|
alias plvI='plenv install-cpanm'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
2
modules/prompt/external/async
vendored
2
modules/prompt/external/async
vendored
@ -1 +1 @@
|
|||||||
Subproject commit bbbc92bd01592513a6b7739a45b7911af18acaef
|
Subproject commit ee1d11b68c38dec24c22b1c51a45e8a815a79756
|
2
modules/prompt/external/powerlevel10k
vendored
2
modules/prompt/external/powerlevel10k
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8a676a9157d2b0e00e88d06456ac7317f11c0317
|
Subproject commit 35833ea15f14b71dbcebc7e54c104d8d56ca5268
|
2
modules/prompt/external/pure
vendored
2
modules/prompt/external/pure
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5b458ba5b75f49a8071d53c343f1a23631f7bced
|
Subproject commit a02209d36c8509c0e62f44324127632999c9c0cf
|
@ -10,18 +10,8 @@ autoload -Uz promptinit && promptinit
|
|||||||
|
|
||||||
# Load the prompt theme.
|
# Load the prompt theme.
|
||||||
zstyle -a ':prezto:module:prompt' theme 'prompt_argv'
|
zstyle -a ':prezto:module:prompt' theme 'prompt_argv'
|
||||||
if [[ "$TERM" == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then
|
if [[ $TERM == (dumb|linux|*bsd*) ]] || (( $#prompt_argv < 1 )); then
|
||||||
prompt 'off'
|
prompt 'off'
|
||||||
elif [[ "$prompt_argv[1]" == 'powerlevel9k' ]] ; then
|
|
||||||
<<EOW
|
|
||||||
WARNING: Prezto does not support 'powerlevel9k' anymore as it has
|
|
||||||
been deprecated and is not supported by its author.
|
|
||||||
Consider migrating to 'powerlevel10k' instead by setting:
|
|
||||||
zstyle ':prezto:module:prompt' theme 'powerlevel10k'
|
|
||||||
in ${${ZDOTDIR:-$HOME}/#$HOME/~}/.zpreztorc.
|
|
||||||
Switching to prezto default prompt 'sorin'..."
|
|
||||||
EOW
|
|
||||||
prompt 'sorin'
|
|
||||||
else
|
else
|
||||||
prompt "$prompt_argv[@]"
|
prompt "$prompt_argv[@]"
|
||||||
fi
|
fi
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
|
|
||||||
Enables local Python and local Python package installation.
|
Enables local Python and local Python package installation.
|
||||||
|
|
||||||
This module must be loaded _before_ the _`completion`_ module so that the
|
|
||||||
provided completion definitions are loaded.
|
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
This module supports virtual environments from conda and
|
This module supports virtual environments from conda and
|
||||||
@ -13,7 +10,7 @@ disable _virtualenvwrapper_, add the following to
|
|||||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
zstyle ':prezto:module:python' skip-virtualenvwrapper-init 'on'
|
zstyle ':prezto:module:python:virtualenv' initialize 'no'
|
||||||
```
|
```
|
||||||
|
|
||||||
Conda support can be enabled by adding the following to
|
Conda support can be enabled by adding the following to
|
||||||
@ -124,6 +121,13 @@ zstyle ':prezto:module:python:virtualenv' initialize 'no'
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:python:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `py` is short for `python`.
|
- `py` is short for `python`.
|
||||||
- `py2` is short for `python2`.
|
- `py2` is short for `python2`.
|
||||||
- `py3` is short for `python3`.
|
- `py3` is short for `python3`.
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#compdef -P pip[0-9.]#
|
|
||||||
#autoload
|
|
||||||
|
|
||||||
#
|
|
||||||
# Pip completion, delegating to pip to do all the completion work.
|
|
||||||
#
|
|
||||||
# Authors:
|
|
||||||
# Indrajit Raychaudhuri <irc@indrajit.com>
|
|
||||||
#
|
|
||||||
|
|
||||||
if (( $+commands[$words[1]] )); then
|
|
||||||
|
|
||||||
function _pip_completion {
|
|
||||||
compadd -- $( COMP_WORDS="$words[*]" COMP_CWORD=$(( CURRENT - 1 )) \
|
|
||||||
PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )
|
|
||||||
}
|
|
||||||
_pip_completion "$@"
|
|
||||||
|
|
||||||
fi
|
|
@ -25,12 +25,7 @@ if [[ -s "${local_pyenv::=${PYENV_ROOT:-$HOME/.pyenv}/bin/pyenv}" ]] \
|
|||||||
# Ensure manually installed pyenv is added to path when present.
|
# Ensure manually installed pyenv is added to path when present.
|
||||||
[[ -s $local_pyenv ]] && path=($local_pyenv:h $path)
|
[[ -s $local_pyenv ]] && path=($local_pyenv:h $path)
|
||||||
|
|
||||||
# pyenv 2+ requires shims to be added to path before being initialized.
|
# Load pyenv into the shell session.
|
||||||
autoload -Uz is-at-least
|
|
||||||
if is-at-least 2 ${"$(pyenv --version 2>&1)"[(w)2]}; then
|
|
||||||
eval "$(pyenv init --path zsh)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval "$(pyenv init - zsh)"
|
eval "$(pyenv init - zsh)"
|
||||||
|
|
||||||
# Prepend PEP 370 per user site packages directory, which defaults to
|
# Prepend PEP 370 per user site packages directory, which defaults to
|
||||||
@ -50,7 +45,7 @@ fi
|
|||||||
unset local_pyenv
|
unset local_pyenv
|
||||||
|
|
||||||
# Return if requirements are not found.
|
# Return if requirements are not found.
|
||||||
if (( ! $#commands[(i)python[23]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then
|
if (( ! $+commands[(i)python[0-9.]#] && ! $+functions[pyenv] && ! $+commands[conda] )); then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -136,8 +131,8 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
|
|||||||
|
|
||||||
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
|
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
|
||||||
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
|
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
|
||||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then
|
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $+commands[(i)python[0-9.]#] )); then
|
||||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#]
|
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[0-9.]#]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
virtualenvwrapper_sources=(
|
virtualenvwrapper_sources=(
|
||||||
@ -171,6 +166,8 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias py='python'
|
if ! zstyle -t ':prezto:module:python:alias' skip; then
|
||||||
alias py2='python2'
|
alias py='python'
|
||||||
alias py3='python3'
|
alias py2='python2'
|
||||||
|
alias py3='python3'
|
||||||
|
fi
|
||||||
|
@ -4,6 +4,13 @@ Defines [Ruby on Rails][1] aliases.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:rails:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `ror` is short for `rails`.
|
- `ror` is short for `rails`.
|
||||||
- `rorc` starts the Rails console.
|
- `rorc` starts the Rails console.
|
||||||
- `rordc` starts the Rails console connected to the database.
|
- `rordc` starts the Rails console connected to the database.
|
||||||
|
@ -19,17 +19,19 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias ror='bundle exec rails'
|
if ! zstyle -t ':prezto:module:rails:alias' skip; then
|
||||||
alias rorc='bundle exec rails console'
|
alias ror='bundle exec rails'
|
||||||
alias rordc='bundle exec rails dbconsole'
|
alias rorc='bundle exec rails console'
|
||||||
alias rordm='bundle exec rake db:migrate'
|
alias rordc='bundle exec rails dbconsole'
|
||||||
alias rordM='bundle exec rake db:migrate db:test:clone'
|
alias rordm='bundle exec rake db:migrate'
|
||||||
alias rordr='bundle exec rake db:rollback'
|
alias rordM='bundle exec rake db:migrate db:test:clone'
|
||||||
alias rorg='bundle exec rails generate'
|
alias rordr='bundle exec rake db:rollback'
|
||||||
alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
|
alias rorg='bundle exec rails generate'
|
||||||
alias rorlc='bundle exec rake log:clear'
|
alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
|
||||||
alias rorp='bundle exec rails plugin'
|
alias rorlc='bundle exec rake log:clear'
|
||||||
alias rorr='bundle exec rails runner'
|
alias rorp='bundle exec rails plugin'
|
||||||
alias rors='bundle exec rails server'
|
alias rorr='bundle exec rails runner'
|
||||||
alias rorsd='bundle exec rails server --debugger'
|
alias rors='bundle exec rails server'
|
||||||
alias rorx='bundle exec rails destroy'
|
alias rorsd='bundle exec rails server --debugger'
|
||||||
|
alias rorx='bundle exec rails destroy'
|
||||||
|
fi
|
||||||
|
@ -54,6 +54,13 @@ dependencies, with [Bundler][5].
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:ruby:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
### General
|
### General
|
||||||
|
|
||||||
- `rb` is short for `ruby`.
|
- `rb` is short for `ruby`.
|
||||||
|
@ -59,23 +59,25 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
# General
|
if ! zstyle -t ':prezto:module:ruby:alias' skip; then
|
||||||
alias rb='ruby'
|
# General
|
||||||
|
alias rb='ruby'
|
||||||
|
|
||||||
# Bundler
|
# Bundler
|
||||||
if (( $+commands[bundle] )); then
|
if (( $+commands[bundle] )); then
|
||||||
alias rbb='bundle'
|
alias rbb='bundle'
|
||||||
alias rbbc='bundle clean'
|
alias rbbc='bundle clean'
|
||||||
alias rbbe='bundle exec'
|
alias rbbe='bundle exec'
|
||||||
alias rbbi='bundle install --path vendor/bundle'
|
alias rbbi='bundle install --path vendor/bundle'
|
||||||
alias rbbl='bundle list'
|
alias rbbl='bundle list'
|
||||||
alias rbbo='bundle open'
|
alias rbbo='bundle open'
|
||||||
alias rbbp='bundle package'
|
alias rbbp='bundle package'
|
||||||
alias rbbu='bundle update'
|
alias rbbu='bundle update'
|
||||||
alias rbbI='rbbi \
|
alias rbbI='rbbi \
|
||||||
&& bundle package \
|
&& bundle package \
|
||||||
&& print .bundle >>! .gitignore \
|
&& print .bundle >>! .gitignore \
|
||||||
&& print vendor/assets >>! .gitignore \
|
&& print vendor/assets >>! .gitignore \
|
||||||
&& print vendor/bundle >>! .gitignore \
|
&& print vendor/bundle >>! .gitignore \
|
||||||
&& print vendor/cache >>! .gitignore'
|
&& print vendor/cache >>! .gitignore'
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -24,6 +24,13 @@ zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:screen:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `scr` is short for `screen`.
|
- `scr` is short for `screen`.
|
||||||
- `scrl` lists sessions/socket directory.
|
- `scrl` lists sessions/socket directory.
|
||||||
- `scrn` starts a new session.
|
- `scrn` starts a new session.
|
||||||
|
@ -22,7 +22,7 @@ if [[ -z "$STY" && -z "$EMACS" && -z "$VIM" ]] && ( \
|
|||||||
session="$(
|
session="$(
|
||||||
screen -list 2> /dev/null \
|
screen -list 2> /dev/null \
|
||||||
| sed '1d;$d' \
|
| sed '1d;$d' \
|
||||||
| awk '{print $1}' \
|
| awk '!/Dead/ {print $1}' \
|
||||||
| head -1)"
|
| head -1)"
|
||||||
|
|
||||||
if [[ -n "$session" ]]; then
|
if [[ -n "$session" ]]; then
|
||||||
@ -36,7 +36,9 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias scr='screen'
|
if ! zstyle -t ':prezto:module:screen:alias' skip; then
|
||||||
alias scrl='screen -list'
|
alias scr='screen'
|
||||||
alias scrn='screen -U -S'
|
alias scrl='screen -list'
|
||||||
alias scrr='screen -a -A -U -D -R'
|
alias scrn='screen -U -S'
|
||||||
|
alias scrr='screen -a -A -U -D -R'
|
||||||
|
fi
|
||||||
|
@ -16,8 +16,8 @@ _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:-${XDG_CACHE_HOME:-$HOME/.cache}/prezto/ssh-agent.env}"
|
_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 if not set by another module.
|
||||||
_ssh_agent_sock="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/ssh-agent.sock"
|
_ssh_agent_sock="${_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
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 932e29a0c75411cb618f02995b66c0a4a25699bc
|
Subproject commit db085e4661f6aafd24e5acb5b2e17e4dd5dddf3e
|
@ -53,6 +53,13 @@ Read [iTerm2 and tmux Integration][7] for more information.
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
|
Aliases are enabled by default. To disable them, add the following to
|
||||||
|
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
zstyle ':prezto:module:tmux:alias' skip 'yes'
|
||||||
|
```
|
||||||
|
|
||||||
- `tmuxa` attaches or switches to a tmux session.
|
- `tmuxa` attaches or switches to a tmux session.
|
||||||
- `tmuxl` lists sessions managed by the tmux server.
|
- `tmuxl` lists sessions managed by the tmux server.
|
||||||
|
|
||||||
|
@ -45,5 +45,7 @@ fi
|
|||||||
# Aliases
|
# Aliases
|
||||||
#
|
#
|
||||||
|
|
||||||
alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
|
if ! zstyle -t ':prezto:module:tmux:alias' skip; then
|
||||||
alias tmuxl='tmux list-sessions'
|
alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
|
||||||
|
alias tmuxl='tmux list-sessions'
|
||||||
|
fi
|
||||||
|
@ -140,7 +140,6 @@ zstyle ':prezto:module:utility' correct 'no'
|
|||||||
- `lt` lists sorted by date, most recent last.
|
- `lt` lists sorted by date, most recent last.
|
||||||
- `lc` lists sorted by date, most recent last, shows change time.
|
- `lc` lists sorted by date, most recent last, shows change time.
|
||||||
- `lu` lists sorted by date, most recent last, shows access time.
|
- `lu` lists sorted by date, most recent last, shows access time.
|
||||||
- `sl` lists directory contents (correction for `ls`).
|
|
||||||
|
|
||||||
### macOS Everywhere
|
### macOS Everywhere
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ if zstyle -T ':prezto:module:utility' safe-ops; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# ls
|
# ls
|
||||||
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then
|
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; then
|
||||||
# GNU Core Utilities
|
# GNU Core Utilities
|
||||||
|
|
||||||
if zstyle -T ':prezto:module:utility:ls' dirs-first; then
|
if zstyle -T ':prezto:module:utility:ls' dirs-first; then
|
||||||
@ -88,7 +88,7 @@ if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then
|
|||||||
if (( ! $+LS_COLORS )); then
|
if (( ! $+LS_COLORS )); then
|
||||||
# Try dircolors when available
|
# Try dircolors when available
|
||||||
if is-callable 'dircolors'; then
|
if is-callable 'dircolors'; then
|
||||||
eval "$(dircolors --sh $HOME/.dir_colors(.N))"
|
eval "$(dircolors --sh $HOME/.dir_colors(N))"
|
||||||
else
|
else
|
||||||
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'
|
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'
|
||||||
fi
|
fi
|
||||||
@ -122,7 +122,6 @@ alias lk='ll -Sr' # Lists sorted by size, largest last.
|
|||||||
alias lt='ll -tr' # Lists sorted by date, most recent last.
|
alias lt='ll -tr' # Lists sorted by date, most recent last.
|
||||||
alias lc='lt -c' # Lists sorted by date, most recent last, shows change time.
|
alias lc='lt -c' # Lists sorted by date, most recent last, shows change time.
|
||||||
alias lu='lt -u' # Lists sorted by date, most recent last, shows access time.
|
alias lu='lt -u' # Lists sorted by date, most recent last, shows access time.
|
||||||
alias sl='ls' # Correction for common spelling error.
|
|
||||||
|
|
||||||
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then
|
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then
|
||||||
alias lx='ll -XB' # Lists sorted by extension (GNU only).
|
alias lx='ll -XB' # Lists sorted by extension (GNU only).
|
||||||
|
@ -10,7 +10,10 @@
|
|||||||
# Compile the completion dump to increase startup speed.
|
# Compile the completion dump to increase startup speed.
|
||||||
zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/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"
|
if command mkdir "${zcompdump}.zwc.lock" 2>/dev/null; then
|
||||||
|
zcompile "$zcompdump"
|
||||||
|
command rmdir "${zcompdump}.zwc.lock" 2>/dev/null
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
} &!
|
} &!
|
||||||
|
|
||||||
|
@ -62,6 +62,9 @@ zstyle ':prezto:load' pmodule \
|
|||||||
# Editor
|
# Editor
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Set the characters that are considered to be part of a word.
|
||||||
|
# zstyle ':prezto:module:editor' wordchars '*?_-.[]~&;!#$%^(){}<>'
|
||||||
|
|
||||||
# Set the key mapping style to 'emacs' or 'vi'.
|
# Set the key mapping style to 'emacs' or 'vi'.
|
||||||
zstyle ':prezto:module:editor' key-bindings 'emacs'
|
zstyle ':prezto:module:editor' key-bindings 'emacs'
|
||||||
|
|
||||||
@ -111,6 +114,18 @@ zstyle ':prezto:module:history' histfile "${ZDOTDIR:-$HOME}/.zsh_history"
|
|||||||
# Set the search globbing flags.
|
# Set the search globbing flags.
|
||||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||||
|
|
||||||
|
# Enable search case-sensitivity.
|
||||||
|
# zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
||||||
|
|
||||||
|
# Enable search for fuzzy matches.
|
||||||
|
# zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||||
|
|
||||||
|
# Enable search uniqueness.
|
||||||
|
# zstyle ':prezto:module:history-substring-search' unique 'yes'
|
||||||
|
|
||||||
|
# Enable prefixed search.
|
||||||
|
# zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||||
|
|
||||||
#
|
#
|
||||||
# macOS
|
# macOS
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user