mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 06:58:01 +00:00
Merge upstream/master
This commit is contained in:
commit
59e6ecbaaa
@ -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 400e58a87f72ecec14f783fbd29bc6be4ff1641c
|
Subproject commit 8dd05bfcc12b0cd1ee9ea64be725b3d9f713cf64
|
@ -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
|
||||||
|
|
||||||
#
|
#
|
||||||
|
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"
|
||||||
|
|
||||||
|
# }
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -88,7 +88,7 @@ if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; 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
|
||||||
|
Loading…
Reference in New Issue
Block a user