Merge branch 'master' into feat/history-substring-search/prefixed
This commit is contained in:
commit
53d650e19d
49 changed files with 455 additions and 270 deletions
README.md
modules
archive/functions
command-not-found
completion
directory
docker
emacs
fasd
git/functions
gnu-utility
history-substring-search
history
homebrew
macports
node
osx/functions
perl
prompt
python
rails
ruby
screen
ssh
tmux
utility
runcoms
12
README.md
12
README.md
|
@ -6,6 +6,8 @@ and prompt themes.
|
|||
|
||||
## Installation
|
||||
|
||||
### Manual
|
||||
|
||||
Prezto will work with any recent release of Zsh, but the minimum required
|
||||
version is **4.3.11**.
|
||||
|
||||
|
@ -35,7 +37,7 @@ version is **4.3.11**.
|
|||
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-${XDG_CONFIG_HOME:-$HOME/.config}/zsh}/.zprezto"
|
||||
```
|
||||
|
||||
- Configure `$XDG_CONFIG_HOME` and `$ZDOTDIR` in _`${$HOME}/.zshenv`_:
|
||||
- Configure `$XDG_CONFIG_HOME` and `$ZDOTDIR` in _`$HOME/.zshenv`_:
|
||||
|
||||
```sh
|
||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}"
|
||||
|
@ -71,6 +73,14 @@ version is **4.3.11**.
|
|||
|
||||
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
|
||||
|
||||
If you are not able to find certain commands after switching to Prezto, modify
|
||||
|
|
|
@ -34,24 +34,24 @@ 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'
|
||||
if (( $+commands[unpigz] )); then
|
||||
_gzip_bin='unpigz'
|
||||
else
|
||||
_gzip_bin='gzip'
|
||||
_gzip_bin='gunzip'
|
||||
fi
|
||||
|
||||
if (( $+commands[pixz] )); then
|
||||
_xz_bin='pixz'
|
||||
_xz_bin='pixz -d'
|
||||
else
|
||||
_xz_bin='xz'
|
||||
fi
|
||||
|
||||
if (( $+commands[lbzip2] )); then
|
||||
_bzip2_bin='lbzip2'
|
||||
elif (( $+commands[pbzip2] )); then
|
||||
_bzip2_bin='pbzip2'
|
||||
if (( $+commands[lbunzip2] )); then
|
||||
_bzip2_bin='lbunzip2'
|
||||
elif (( $+commands[pbunzip2] )); then
|
||||
_bzip2_bin='pbunzip2'
|
||||
else
|
||||
_bzip2_bin='bzip2'
|
||||
_bzip2_bin='bunzip2'
|
||||
fi
|
||||
|
||||
_zstd_bin='zstd'
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
#
|
||||
|
||||
# Load command-not-found on Debian-based distributions.
|
||||
if [[ -s '/etc/zsh_command_not_found' ]]; then
|
||||
source '/etc/zsh_command_not_found'
|
||||
if [[ -s /etc/zsh_command_not_found ]]; then
|
||||
source /etc/zsh_command_not_found
|
||||
# Load command-not-found on Arch Linux-based distributions.
|
||||
elif [[ -s '/usr/share/doc/pkgfile/command-not-found.zsh' ]]; then
|
||||
source '/usr/share/doc/pkgfile/command-not-found.zsh'
|
||||
elif [[ -s /usr/share/doc/pkgfile/command-not-found.zsh ]]; then
|
||||
source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||
# Load command-not-found on macOS when Homebrew tap is configured.
|
||||
elif (( $+commands[brew] )) \
|
||||
&& [[ -s "${hb_cnf_handler::="$(brew --repository 2> /dev/null)"/Library/Taps/homebrew/homebrew-command-not-found/handler.sh}" ]]; then
|
||||
&& [[ -s ${hb_cnf_handler::="${HOMEBREW_REPOSITORY:-$commands[brew]:A:h:h}/Library/Taps/homebrew/homebrew-command-not-found/handler.sh"} ]]; then
|
||||
source "$hb_cnf_handler"
|
||||
unset hb_cnf_handler
|
||||
# Return if requirements are not found.
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 11ad0a45ff1695cac00e86c687cce6fa1fd1cdbd
|
||||
Subproject commit 67921bc12502c1e7b0f156533fbac2cb51f6943d
|
|
@ -14,12 +14,16 @@ fi
|
|||
# Add zsh-completions to $fpath.
|
||||
fpath=(${0:h}/external/src $fpath)
|
||||
|
||||
# Add completion for keg-only brewed curl when available.
|
||||
if (( $+commands[brew] )) \
|
||||
&& [[ -d "${curl_prefix::="$(brew --prefix 2> /dev/null)"/opt/curl}" ]]; then
|
||||
fpath=($curl_prefix/share/zsh/site-functions $fpath)
|
||||
# Add completion for keg-only brewed curl on macOS when available.
|
||||
if (( $+commands[brew] )); then
|
||||
brew_prefix=${HOMEBREW_PREFIX:-${HOMEBREW_REPOSITORY:-$commands[brew]:A:h:h}}
|
||||
# $HOMEBREW_PREFIX defaults to $HOMEBREW_REPOSITORY but is explicitly set to
|
||||
# /usr/local when $HOMEBREW_REPOSITORY is /usr/local/Homebrew.
|
||||
# https://github.com/Homebrew/brew/blob/2a850e02d8f2dedcad7164c2f4b95d340a7200bb/bin/brew#L66-L69
|
||||
[[ $brew_prefix == '/usr/local/Homebrew' ]] && brew_prefix=$brew_prefix:h
|
||||
fpath=($brew_prefix/opt/curl/share/zsh/site-functions(/N) $fpath)
|
||||
unset brew_prefix
|
||||
fi
|
||||
unset curl_prefix
|
||||
|
||||
#
|
||||
# Options
|
||||
|
|
|
@ -17,6 +17,13 @@ Sets directory options and defines directory 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.
|
||||
- `1 ... 9` changes the directory to the **n** previous one.
|
||||
|
||||
|
|
|
@ -25,5 +25,8 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||
if ! zstyle -t ':prezto:module:directory:alias' skip; then
|
||||
alias -- -='cd -'
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||
fi
|
||||
|
|
|
@ -152,26 +152,26 @@ alias dkmv='docker-machine version'
|
|||
alias dkmx='docker-machine stop'
|
||||
|
||||
# Docker Compose (c)
|
||||
alias dkc='docker-compose'
|
||||
alias dkcb='docker-compose build'
|
||||
alias dkcB='docker-compose build --no-cache'
|
||||
alias dkcd='docker-compose down'
|
||||
alias dkce='docker-compose exec'
|
||||
alias dkck='docker-compose kill'
|
||||
alias dkcl='docker-compose logs'
|
||||
alias dkcls='docker-compose ps'
|
||||
alias dkcp='docker-compose pause'
|
||||
alias dkcP='docker-compose unpause'
|
||||
alias dkcpl='docker-compose pull'
|
||||
alias dkcph='docker-compose push'
|
||||
alias dkcps='docker-compose ps'
|
||||
alias dkcr='docker-compose run'
|
||||
alias dkcR='docker-compose run --rm'
|
||||
alias dkcrm='docker-compose rm'
|
||||
alias dkcs='docker-compose start'
|
||||
alias dkcsc='docker-compose scale'
|
||||
alias dkcS='docker-compose restart'
|
||||
alias dkcu='docker-compose up'
|
||||
alias dkcU='docker-compose up -d'
|
||||
alias dkcv='docker-compose version'
|
||||
alias dkcx='docker-compose stop'
|
||||
alias dkc='docker compose'
|
||||
alias dkcb='docker compose build'
|
||||
alias dkcB='docker compose build --no-cache'
|
||||
alias dkcd='docker compose down'
|
||||
alias dkce='docker compose exec'
|
||||
alias dkck='docker compose kill'
|
||||
alias dkcl='docker compose logs'
|
||||
alias dkcls='docker compose ps'
|
||||
alias dkcp='docker compose pause'
|
||||
alias dkcP='docker compose unpause'
|
||||
alias dkcpl='docker compose pull'
|
||||
alias dkcph='docker compose push'
|
||||
alias dkcps='docker compose ps'
|
||||
alias dkcr='docker compose run'
|
||||
alias dkcR='docker compose run --rm'
|
||||
alias dkcrm='docker compose rm'
|
||||
alias dkcs='docker compose start'
|
||||
alias dkcsc='docker compose scale'
|
||||
alias dkcS='docker compose restart'
|
||||
alias dkcu='docker compose up'
|
||||
alias dkcU='docker compose up -d'
|
||||
alias dkcv='docker compose version'
|
||||
alias dkcx='docker compose stop'
|
||||
|
|
|
@ -12,6 +12,13 @@ execution of `carton`.
|
|||
|
||||
## 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
|
||||
|
||||
- `cai` installs dependencies.
|
||||
|
|
|
@ -19,7 +19,9 @@ source "$HOME/.cask/etc/cask_completion.zsh" 2> /dev/null
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias cai='cask install'
|
||||
alias cau='cask update'
|
||||
alias caI='cask init'
|
||||
alias cae='cask exec'
|
||||
if ! zstyle -t ':prezto:module:emacs:alias' skip; then
|
||||
alias cai='cask install'
|
||||
alias cau='cask update'
|
||||
alias caI='cask init'
|
||||
alias cae='cask exec'
|
||||
fi
|
||||
|
|
|
@ -19,6 +19,13 @@ instead of the bundled version.
|
|||
|
||||
## 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.
|
||||
|
||||
## Completion
|
||||
|
|
|
@ -53,5 +53,7 @@ function fasd_cd {
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# Changes the current working directory interactively.
|
||||
alias j='fasd_cd -i'
|
||||
if ! zstyle -t ':prezto:module:fasd:alias' skip; then
|
||||
# Changes the current working directory interactively.
|
||||
alias j='fasd_cd -i'
|
||||
fi
|
||||
|
|
|
@ -47,7 +47,7 @@ file="$3"
|
|||
if [[ -n "$url" ]]; then
|
||||
url="$url/tree/$reference/$file"
|
||||
|
||||
if [[ -z "$BROWSER" ]]; then
|
||||
if [[ -n "$BROWSER" ]]; then
|
||||
"$BROWSER" "$url"
|
||||
return 0
|
||||
else
|
||||
|
|
|
@ -417,6 +417,11 @@ function git-info {
|
|||
if (( dirty > 0 )); then
|
||||
zstyle -s ':prezto:module:git:info:dirty' format 'dirty_format'
|
||||
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
|
||||
# Overwrite branch format to use dirty-branch format
|
||||
zstyle -s ':prezto:module:git:info:dirty-branch' format 'branch_format'
|
||||
if [[ -n "$branch" && -n "$branch_format" ]]; then
|
||||
zformat -f branch_formatted "$branch_format" "b:$branch"
|
||||
fi
|
||||
else
|
||||
zstyle -s ':prezto:module:git:info:clean' format 'clean_formatted'
|
||||
fi
|
||||
|
|
|
@ -44,8 +44,7 @@ _gnu_utility_cmds=(
|
|||
'libtool' 'libtoolize'
|
||||
|
||||
# Miscellaneous
|
||||
'egrep' 'fgrep' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units'
|
||||
'which'
|
||||
'awk' 'getopt' 'grep' 'indent' 'make' 'sed' 'tar' 'time' 'units' 'which'
|
||||
)
|
||||
|
||||
# Wrap GNU utilities in functions.
|
||||
|
|
|
@ -71,6 +71,24 @@ _`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
|||
zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||
```
|
||||
|
||||
### Fuzzy search
|
||||
|
||||
To enable fuzzy search add the following line to
|
||||
`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||
```
|
||||
|
||||
### Unique results
|
||||
|
||||
To retrieve only unique results (remove duplicates) add the following line to
|
||||
`${ZDOTDIR:-$HOME}/.zpreztorc`_:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history-substring-search' ensure-unique 'yes'
|
||||
```
|
||||
|
||||
## Authors
|
||||
|
||||
_The authors of this module should be contacted via the [issue tracker][5]._
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0f80b8eb3368b46e5e573c1d91ae69eb095db3fb
|
||||
Subproject commit 400e58a87f72ecec14f783fbd29bc6be4ff1641c
|
|
@ -42,6 +42,14 @@ if ! zstyle -t ':prezto:module:history-substring-search' color; then
|
|||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
||||
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' ensure-unique; then
|
||||
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1
|
||||
fi
|
||||
|
||||
#
|
||||
# Key Bindings
|
||||
#
|
||||
|
|
|
@ -36,8 +36,44 @@ Alternately, you can set `HISTFILE` manually to _`${ZDOTDIR:-$HOME}/.zhistory`_.
|
|||
|
||||
## 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
|
||||
|
||||
## Settings
|
||||
|
||||
### histfile
|
||||
|
||||
Can be configured either by setting HISTFILE manually before loading this
|
||||
module or by using zstyle:
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history' histfile "<file_name>"
|
||||
```
|
||||
|
||||
defaults to "${ZDOTDIR:-$HOME}/.zsh_history".
|
||||
|
||||
### histsize
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history' histsize <number>
|
||||
```
|
||||
|
||||
defaults to 10000.
|
||||
|
||||
### savehist
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:history' savehist <number>
|
||||
```
|
||||
|
||||
defaults to histsize
|
||||
|
||||
## Authors
|
||||
|
||||
_The authors of this module should be contacted via the [issue tracker][2]._
|
||||
|
|
|
@ -10,54 +10,34 @@
|
|||
# Options
|
||||
#
|
||||
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
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_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_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_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
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_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_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_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # 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.
|
||||
zstyle -s ':prezto:module:history' histfile 'HISTFILE' \
|
||||
|| HISTFILE="${HISTFILE:-${ZDOTDIR:-$HOME}/.zsh_history}" # The path to the history file.
|
||||
zstyle -s ':prezto:module:history' histsize 'HISTSIZE' \
|
||||
|| HISTSIZE=10000 # The maximum number of events to save in the internal history.
|
||||
zstyle -s ':prezto:module:history' savehist 'SAVEHIST' \
|
||||
|| SAVEHIST=$HISTSIZE # The maximum number of events to save in the history file.
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# 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
|
||||
if ! zstyle -t ':prezto:module:history:alias' skip; then
|
||||
# Lists the ten most used commands.
|
||||
alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
|
||||
fi
|
||||
|
|
|
@ -12,6 +12,13 @@ brew shellenv
|
|||
|
||||
## 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
|
||||
|
||||
- `brewc` cleans outdated brews and their cached archives.
|
||||
|
|
|
@ -29,19 +29,21 @@ fi
|
|||
#
|
||||
|
||||
# Homebrew
|
||||
alias brewc='brew cleanup'
|
||||
alias brewi='brew install'
|
||||
alias brewL='brew leaves'
|
||||
alias brewl='brew list'
|
||||
alias brewo='brew outdated'
|
||||
alias brews='brew search'
|
||||
alias brewu='brew upgrade'
|
||||
alias brewx='brew uninstall'
|
||||
if ! zstyle -t ':prezto:module:homebrew:alias' skip; then
|
||||
alias brewc='brew cleanup'
|
||||
alias brewi='brew install'
|
||||
alias brewL='brew leaves'
|
||||
alias brewl='brew list'
|
||||
alias brewo='brew outdated'
|
||||
alias brews='brew search'
|
||||
alias brewu='brew upgrade'
|
||||
alias brewx='brew uninstall'
|
||||
|
||||
# Homebrew Cask
|
||||
alias caski='brew install --cask'
|
||||
alias caskl='brew list --cask'
|
||||
alias casko='brew outdated --cask'
|
||||
alias casks='brew search --cask'
|
||||
alias casku='brew upgrade --cask'
|
||||
alias caskx='brew uninstall --cask'
|
||||
# Homebrew Cask
|
||||
alias caski='brew install --cask'
|
||||
alias caskl='brew list --cask'
|
||||
alias casko='brew outdated --cask'
|
||||
alias casks='brew search --cask'
|
||||
alias casku='brew upgrade --cask'
|
||||
alias caskx='brew uninstall --cask'
|
||||
fi
|
||||
|
|
|
@ -4,6 +4,13 @@ Defines MacPorts aliases and adds MacPorts directories to path variables.
|
|||
|
||||
## 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.
|
||||
- `porti` installs a port.
|
||||
- `ports` searches for a port.
|
||||
|
|
|
@ -28,10 +28,12 @@ path=(
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias portc='sudo port clean --all installed'
|
||||
alias porti='sudo port install'
|
||||
alias ports='port search'
|
||||
alias portU='sudo port selfupdate && sudo port upgrade outdated'
|
||||
alias portu='sudo port upgrade'
|
||||
alias portX='sudo port -u uninstall'
|
||||
alias portx='sudo port uninstall'
|
||||
if ! zstyle -t ':prezto:module:macports:alias' skip; then
|
||||
alias portc='sudo port clean --all installed'
|
||||
alias porti='sudo port install'
|
||||
alias ports='port search'
|
||||
alias portU='sudo port selfupdate && sudo port upgrade outdated'
|
||||
alias portu='sudo port upgrade'
|
||||
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 are enabled by default. To disable them, add the following to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:node:alias' skip 'yes'
|
||||
```
|
||||
|
||||
### npm
|
||||
|
||||
- `npmi` install a package.
|
||||
|
|
|
@ -48,18 +48,20 @@ N_PREFIX="${XDG_CONFIG_HOME:-$HOME/.config}/n" # The path to 'n' cache.
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# npm
|
||||
alias npmi='npm install'
|
||||
alias npml='npm list'
|
||||
alias npmo='npm outdated'
|
||||
alias npmp='npm publish'
|
||||
alias npmP='npm prune'
|
||||
alias npmr='npm run'
|
||||
alias npms='npm search'
|
||||
alias npmt='npm test'
|
||||
alias npmu='npm update'
|
||||
alias npmx='npm uninstall'
|
||||
if ! zstyle -t ':prezto:module:node:alias' skip; then
|
||||
# npm
|
||||
alias npmi='npm install'
|
||||
alias npml='npm list'
|
||||
alias npmo='npm outdated'
|
||||
alias npmp='npm publish'
|
||||
alias npmP='npm prune'
|
||||
alias npmr='npm run'
|
||||
alias npms='npm search'
|
||||
alias npmt='npm test'
|
||||
alias npmu='npm update'
|
||||
alias npmx='npm uninstall'
|
||||
|
||||
alias npmci='npm ci'
|
||||
alias npmcit='npm cit'
|
||||
alias npmit='npm it'
|
||||
alias npmci='npm ci'
|
||||
alias npmcit='npm cit'
|
||||
alias npmit='npm it'
|
||||
fi
|
||||
|
|
|
@ -9,7 +9,7 @@ function manp {
|
|||
local page
|
||||
if (( $# > 0 )); then
|
||||
for page in "$@"; do
|
||||
man -t "$page" | open -f -a Preview
|
||||
mandoc -T pdf "$(/usr/bin/man -w $page)" | open -fa Preview
|
||||
done
|
||||
else
|
||||
print 'What manual page do you want?' >&2
|
||||
|
|
|
@ -40,6 +40,13 @@ The subcommands of _plenv_ is similar with _rbenv_.
|
|||
|
||||
## 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
|
||||
|
||||
- `pl` is short for `perl`.
|
||||
|
|
|
@ -61,37 +61,39 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# General
|
||||
alias pl='perl'
|
||||
alias pld='perldoc'
|
||||
alias ple='perl -wlne'
|
||||
if ! zstyle -t ':prezto:module:perl:alias' skip; then
|
||||
# General
|
||||
alias pl='perl'
|
||||
alias pld='perldoc'
|
||||
alias ple='perl -wlne'
|
||||
|
||||
# Perlbrew
|
||||
if (( $+commands[perlbrew] )); then
|
||||
alias plb='perlbrew'
|
||||
alias plba='perlbrew available'
|
||||
alias plbi='perlbrew install'
|
||||
alias plbl='perlbrew list'
|
||||
alias plbo='perlbrew off'
|
||||
alias plbO='perlbrew switch-off'
|
||||
alias plbs='perlbrew switch'
|
||||
alias plbu='perlbrew use'
|
||||
alias plbx='perlbrew uninstall'
|
||||
# Perlbrew
|
||||
if (( $+commands[perlbrew] )); then
|
||||
alias plb='perlbrew'
|
||||
alias plba='perlbrew available'
|
||||
alias plbi='perlbrew install'
|
||||
alias plbl='perlbrew list'
|
||||
alias plbo='perlbrew off'
|
||||
alias plbO='perlbrew switch-off'
|
||||
alias plbs='perlbrew switch'
|
||||
alias plbu='perlbrew use'
|
||||
alias plbx='perlbrew uninstall'
|
||||
|
||||
elif (( $+commands[plenv] )); then
|
||||
alias plv='plenv'
|
||||
alias plvc='plenv commands'
|
||||
alias plvl='plenv local'
|
||||
alias plvg='plenv global'
|
||||
alias plvs='plenv shell'
|
||||
alias plvi='plenv install'
|
||||
alias plvu='plenv uninstall'
|
||||
alias plvr='plenv rehash'
|
||||
alias plvv='plenv version'
|
||||
alias plvV='plenv versions'
|
||||
alias plvw='plenv which'
|
||||
alias plvW='plenv whence'
|
||||
alias plvm='plenv list-modules'
|
||||
alias plvM='plenv migrate-modules'
|
||||
alias plvI='plenv install-cpanm'
|
||||
elif (( $+commands[plenv] )); then
|
||||
alias plv='plenv'
|
||||
alias plvc='plenv commands'
|
||||
alias plvl='plenv local'
|
||||
alias plvg='plenv global'
|
||||
alias plvs='plenv shell'
|
||||
alias plvi='plenv install'
|
||||
alias plvu='plenv uninstall'
|
||||
alias plvr='plenv rehash'
|
||||
alias plvv='plenv version'
|
||||
alias plvV='plenv versions'
|
||||
alias plvw='plenv which'
|
||||
alias plvW='plenv whence'
|
||||
alias plvm='plenv list-modules'
|
||||
alias plvM='plenv migrate-modules'
|
||||
alias plvI='plenv install-cpanm'
|
||||
fi
|
||||
fi
|
||||
|
|
2
modules/prompt/external/async
vendored
2
modules/prompt/external/async
vendored
|
@ -1 +1 @@
|
|||
Subproject commit bbbc92bd01592513a6b7739a45b7911af18acaef
|
||||
Subproject commit a66d76f8404bd9e7a26037640e6c892cf5871ff4
|
2
modules/prompt/external/powerlevel10k
vendored
2
modules/prompt/external/powerlevel10k
vendored
|
@ -1 +1 @@
|
|||
Subproject commit f5d61840ae3a4f8c2765e1a67d94d9a96de71601
|
||||
Subproject commit 017395a266aa15011c09e64e44a1c98ed91c478c
|
2
modules/prompt/external/pure
vendored
2
modules/prompt/external/pure
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 2e354b80deae105ea246699c49e65dcd4fe8b759
|
||||
Subproject commit 87e6f5dd4c793f6d980532205aaefe196780606f
|
|
@ -10,18 +10,8 @@ autoload -Uz promptinit && promptinit
|
|||
|
||||
# Load the prompt theme.
|
||||
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'
|
||||
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
|
||||
prompt "$prompt_argv[@]"
|
||||
fi
|
||||
|
|
|
@ -124,6 +124,13 @@ zstyle ':prezto:module:python:virtualenv' initialize 'no'
|
|||
|
||||
## 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`.
|
||||
- `py2` is short for `python2`.
|
||||
- `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
|
|
@ -8,6 +8,12 @@
|
|||
# Indrajit Raychaudhuri <irc@indrajit.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
|
@ -44,7 +50,7 @@ fi
|
|||
unset local_pyenv
|
||||
|
||||
# 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
|
||||
fi
|
||||
|
||||
|
@ -110,37 +116,42 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) \
|
|||
# look for plugins of interest. Scanning shell '$path' isn't enough as they
|
||||
# can exist in 'pyenv' synthesized paths (e.g., '~/.pyenv/plugins') instead.
|
||||
local -a pyenv_plugins
|
||||
local pyenv_virtualenvwrapper_plugin_found
|
||||
if (( $+commands[pyenv] )); then
|
||||
pyenv_plugins=(${(@oM)${(f)"$(pyenv commands --no-sh 2> /dev/null)"}:#virtualenv*})
|
||||
fi
|
||||
|
||||
if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then
|
||||
# Enable 'virtualenv' with 'pyenv'.
|
||||
eval "$(pyenv virtualenv-init - zsh)"
|
||||
# Optionally activate 'virtualenv-init' plugin when available.
|
||||
if (( $pyenv_plugins[(i)virtualenv-init] <= $#pyenv_plugins )); then
|
||||
eval "$(pyenv virtualenv-init - zsh)"
|
||||
fi
|
||||
|
||||
# Optionally activate 'virtualenvwrapper' plugin when available.
|
||||
if (( $pyenv_plugins[(i)virtualenvwrapper(_lazy|)] <= $#pyenv_plugins )); then
|
||||
pyenv "$pyenv_plugins[(R)virtualenvwrapper(_lazy|)]"
|
||||
fi
|
||||
else
|
||||
# Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if 'python' is
|
||||
# available in '$path'.
|
||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $#commands[(i)python[23]#] )); then
|
||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[23]#]
|
||||
pyenv_virtualenvwrapper_plugin_found="true"
|
||||
fi
|
||||
|
||||
virtenv_sources=(
|
||||
unset pyenv_plugins
|
||||
fi
|
||||
|
||||
if [[ $pyenv_virtualenvwrapper_plugin_found != "true" ]]; then
|
||||
# Fallback to standard 'virtualenvwrapper' if 'python' is available in '$path'.
|
||||
if (( ! $+VIRTUALENVWRAPPER_PYTHON )) && (( $+commands[(i)python[0-9.]#] )); then
|
||||
VIRTUALENVWRAPPER_PYTHON=$commands[(i)python[0-9.]#]
|
||||
fi
|
||||
|
||||
virtualenvwrapper_sources=(
|
||||
${(@Ov)commands[(I)virtualenvwrapper(_lazy|).sh]}
|
||||
/usr/share/virtualenvwrapper/virtualenvwrapper(_lazy|).sh(OnN)
|
||||
)
|
||||
if (( $#virtenv_sources )); then
|
||||
source "$virtenv_sources[1]"
|
||||
if (( $#virtualenvwrapper_sources )); then
|
||||
source "$virtualenvwrapper_sources[1]"
|
||||
fi
|
||||
|
||||
unset virtenv_sources
|
||||
unset virtualenvwrapper_sources
|
||||
fi
|
||||
|
||||
unset pyenv_plugins
|
||||
unset pyenv_virtualenvwrapper_plugin_found
|
||||
fi
|
||||
|
||||
# Load conda into the shell session, if requested.
|
||||
|
@ -160,6 +171,8 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias py='python'
|
||||
alias py2='python2'
|
||||
alias py3='python3'
|
||||
if ! zstyle -t ':prezto:module:python:alias' skip; then
|
||||
alias py='python'
|
||||
alias py2='python2'
|
||||
alias py3='python3'
|
||||
fi
|
||||
|
|
|
@ -4,6 +4,13 @@ Defines [Ruby on Rails][1] 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`.
|
||||
- `rorc` starts the Rails console.
|
||||
- `rordc` starts the Rails console connected to the database.
|
||||
|
|
|
@ -19,17 +19,19 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias ror='bundle exec rails'
|
||||
alias rorc='bundle exec rails console'
|
||||
alias rordc='bundle exec rails dbconsole'
|
||||
alias rordm='bundle exec rake db:migrate'
|
||||
alias rordM='bundle exec rake db:migrate db:test:clone'
|
||||
alias rordr='bundle exec rake db:rollback'
|
||||
alias rorg='bundle exec rails generate'
|
||||
alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
|
||||
alias rorlc='bundle exec rake log:clear'
|
||||
alias rorp='bundle exec rails plugin'
|
||||
alias rorr='bundle exec rails runner'
|
||||
alias rors='bundle exec rails server'
|
||||
alias rorsd='bundle exec rails server --debugger'
|
||||
alias rorx='bundle exec rails destroy'
|
||||
if ! zstyle -t ':prezto:module:rails:alias' skip; then
|
||||
alias ror='bundle exec rails'
|
||||
alias rorc='bundle exec rails console'
|
||||
alias rordc='bundle exec rails dbconsole'
|
||||
alias rordm='bundle exec rake db:migrate'
|
||||
alias rordM='bundle exec rake db:migrate db:test:clone'
|
||||
alias rordr='bundle exec rake db:rollback'
|
||||
alias rorg='bundle exec rails generate'
|
||||
alias rorl='tail -f "$(ruby-app-root)/log/development.log"'
|
||||
alias rorlc='bundle exec rake log:clear'
|
||||
alias rorp='bundle exec rails plugin'
|
||||
alias rorr='bundle exec rails runner'
|
||||
alias rors='bundle exec rails server'
|
||||
alias rorsd='bundle exec rails server --debugger'
|
||||
alias rorx='bundle exec rails destroy'
|
||||
fi
|
||||
|
|
|
@ -54,6 +54,13 @@ dependencies, with [Bundler][5].
|
|||
|
||||
## 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
|
||||
|
||||
- `rb` is short for `ruby`.
|
||||
|
|
|
@ -59,23 +59,25 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
# General
|
||||
alias rb='ruby'
|
||||
if ! zstyle -t ':prezto:module:ruby:alias' skip; then
|
||||
# General
|
||||
alias rb='ruby'
|
||||
|
||||
# Bundler
|
||||
if (( $+commands[bundle] )); then
|
||||
alias rbb='bundle'
|
||||
alias rbbc='bundle clean'
|
||||
alias rbbe='bundle exec'
|
||||
alias rbbi='bundle install --path vendor/bundle'
|
||||
alias rbbl='bundle list'
|
||||
alias rbbo='bundle open'
|
||||
alias rbbp='bundle package'
|
||||
alias rbbu='bundle update'
|
||||
alias rbbI='rbbi \
|
||||
&& bundle package \
|
||||
&& print .bundle >>! .gitignore \
|
||||
&& print vendor/assets >>! .gitignore \
|
||||
&& print vendor/bundle >>! .gitignore \
|
||||
&& print vendor/cache >>! .gitignore'
|
||||
# Bundler
|
||||
if (( $+commands[bundle] )); then
|
||||
alias rbb='bundle'
|
||||
alias rbbc='bundle clean'
|
||||
alias rbbe='bundle exec'
|
||||
alias rbbi='bundle install --path vendor/bundle'
|
||||
alias rbbl='bundle list'
|
||||
alias rbbo='bundle open'
|
||||
alias rbbp='bundle package'
|
||||
alias rbbu='bundle update'
|
||||
alias rbbI='rbbi \
|
||||
&& bundle package \
|
||||
&& print .bundle >>! .gitignore \
|
||||
&& print vendor/assets >>! .gitignore \
|
||||
&& print vendor/bundle >>! .gitignore \
|
||||
&& print vendor/cache >>! .gitignore'
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -24,6 +24,13 @@ zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
|||
|
||||
## 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`.
|
||||
- `scrl` lists sessions/socket directory.
|
||||
- `scrn` starts a new session.
|
||||
|
|
|
@ -36,7 +36,9 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias scr='screen'
|
||||
alias scrl='screen -list'
|
||||
alias scrn='screen -U -S'
|
||||
alias scrr='screen -a -A -U -D -R'
|
||||
if ! zstyle -t ':prezto:module:screen:alias' skip; then
|
||||
alias scr='screen'
|
||||
alias scrl='screen -list'
|
||||
alias scrn='screen -U -S'
|
||||
alias scrr='screen -a -A -U -D -R'
|
||||
fi
|
||||
|
|
|
@ -52,9 +52,9 @@ if ssh-add -l 2>&1 | grep -q 'The agent has no identities'; then
|
|||
# program specified by SSH_ASKPASS and open an X11 window to read the
|
||||
# passphrase.
|
||||
if [[ -n "$DISPLAY" && -x "$SSH_ASKPASS" ]]; then
|
||||
ssh-add ${_ssh_identities:+$_ssh_dir/${^_ssh_identities[@]}} < /dev/null 2> /dev/null
|
||||
ssh-add ${_ssh_identities:+$_ssh_dir/${^~_ssh_identities[@]}} < /dev/null 2> /dev/null
|
||||
else
|
||||
ssh-add ${_ssh_identities:+$_ssh_dir/${^_ssh_identities[@]}} 2> /dev/null
|
||||
ssh-add ${_ssh_identities:+$_ssh_dir/${^~_ssh_identities[@]}} 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -53,6 +53,13 @@ Read [iTerm2 and tmux Integration][7] for more information.
|
|||
|
||||
## 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.
|
||||
- `tmuxl` lists sessions managed by the tmux server.
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ if ([[ "$TERM_PROGRAM" = 'iTerm.app' ]] && \
|
|||
_tmux_iterm_integration='-CC'
|
||||
fi
|
||||
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" ]] && ( \
|
||||
if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && "$TERM_PROGRAM" != "vscode" && "$TERMINAL_EMULATOR" != "JetBrains-JediTerm" ]] && ( \
|
||||
( [[ -n "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' remote ) ||
|
||||
( [[ -z "$SSH_TTY" ]] && zstyle -t ':prezto:module:tmux:auto-start' local ) \
|
||||
); then
|
||||
|
@ -45,5 +45,7 @@ fi
|
|||
# Aliases
|
||||
#
|
||||
|
||||
alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
|
||||
alias tmuxl='tmux list-sessions'
|
||||
if ! zstyle -t ':prezto:module:tmux:alias' skip; then
|
||||
alias tmuxa="tmux $_tmux_iterm_integration new-session -A"
|
||||
alias tmuxl='tmux list-sessions'
|
||||
fi
|
||||
|
|
|
@ -76,7 +76,7 @@ if zstyle -T ':prezto:module:utility' safe-ops; then
|
|||
fi
|
||||
|
||||
# ls
|
||||
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*GNU *} ]]; then
|
||||
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; then
|
||||
# GNU Core Utilities
|
||||
|
||||
if zstyle -T ':prezto:module:utility:ls' dirs-first; then
|
||||
|
@ -196,12 +196,14 @@ fi
|
|||
# Serves a directory via HTTP.
|
||||
if (( $#commands[(i)python(|[23])] )); then
|
||||
autoload -Uz is-at-least
|
||||
if is-at-least 3 ${"$(python --version 2>&1)"[(w)2]}; then
|
||||
alias http-serve='python -m http.server'
|
||||
elif (( $+commands[python3] )); then
|
||||
if (( $+commands[python3] )); then
|
||||
alias http-serve='python3 -m http.server'
|
||||
elif (( $+commands[python2] )); then
|
||||
alias http-serve='python2 -m SimpleHTTPServer'
|
||||
elif is-at-least 3 ${"$(python --version 2>&1)"[(w)2]}; then
|
||||
alias http-serve='python -m http.server'
|
||||
else
|
||||
alias http-serve='$commands[(i)python(|2)] -m SimpleHTTPServer'
|
||||
alias http-serve='python -m SimpleHTTPServer'
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
# Compile the completion dump to increase startup speed.
|
||||
zcompdump="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/zcompdump"
|
||||
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
|
||||
} &!
|
||||
|
||||
|
|
|
@ -83,6 +83,19 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
|
|||
# Set the command prefix on non-GNU systems.
|
||||
# zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||
|
||||
#
|
||||
# History
|
||||
#
|
||||
|
||||
# Set the file to save the history in when an interactive shell exits.
|
||||
# zstyle ':prezto:module:history' histfile "${ZDOTDIR:-$HOME}/.zsh_history"
|
||||
|
||||
# Set the maximum number of events stored in the internal history list.
|
||||
# zstyle ':prezto:module:history' histsize 10000
|
||||
|
||||
# Set the maximum number of history events to save in the history file.
|
||||
# zstyle ':prezto:module:history' savehist 10000
|
||||
|
||||
#
|
||||
# History Substring Search
|
||||
#
|
||||
|
@ -99,6 +112,12 @@ zstyle ':prezto:module:editor' key-bindings 'emacs'
|
|||
# Set the search prefixed.
|
||||
# zstyle ':prezto:module:history-substring-search' prefixed 'yes'
|
||||
|
||||
# Enable fuzzy search
|
||||
# zstyle ':prezto:module:history-substring-search' fuzzy 'yes'
|
||||
|
||||
# Retrieve only unique results (removes duplicates)
|
||||
# zstyle ':prezto:module:history-substring-search' ensure-unique 'yes'
|
||||
|
||||
#
|
||||
# macOS
|
||||
#
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# Browser
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
if [[ -z "$BROWSER" && "$OSTYPE" == darwin* ]]; then
|
||||
export BROWSER='open'
|
||||
fi
|
||||
|
||||
|
@ -17,9 +17,15 @@ fi
|
|||
# Editors
|
||||
#
|
||||
|
||||
export EDITOR='nano'
|
||||
export VISUAL='nano'
|
||||
export PAGER='less'
|
||||
if [[ -z "$EDITOR" ]]; then
|
||||
export EDITOR='nano'
|
||||
fi
|
||||
if [[ -z "$VISUAL" ]]; then
|
||||
export VISUAL='nano'
|
||||
fi
|
||||
if [[ -z "$PAGER" ]]; then
|
||||
export PAGER='less'
|
||||
fi
|
||||
|
||||
#
|
||||
# Language
|
||||
|
@ -43,7 +49,9 @@ typeset -gU cdpath fpath mailpath path
|
|||
|
||||
# Set the list of directories that Zsh searches for programs.
|
||||
path=(
|
||||
/usr/local/{bin,sbin}
|
||||
$HOME/{,s}bin(N)
|
||||
/opt/{homebrew,local}/{,s}bin(N)
|
||||
/usr/local/{,s}bin(N)
|
||||
$path
|
||||
)
|
||||
|
||||
|
@ -54,10 +62,12 @@ path=(
|
|||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
# Remove -X to enable it.
|
||||
export LESS='-g -i -M -R -S -w -X -z-4'
|
||||
if [[ -z "$LESS" ]]; then
|
||||
export LESS='-g -i -M -R -S -w -X -z-4'
|
||||
fi
|
||||
|
||||
# Set the Less input preprocessor.
|
||||
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||
if [[ -z "$LESSOPEN" ]] && (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue