mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 07:29:09 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			module/com
			...
			revision/z
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					f5f295cc99 | 
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							@@ -16,23 +16,28 @@ non-standard core utilities.
 | 
			
		||||
 | 
			
		||||
        zsh
 | 
			
		||||
 | 
			
		||||
  2. Clone the repository:
 | 
			
		||||
  2. Set the path to the Prezto installation directory:
 | 
			
		||||
 | 
			
		||||
        git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
 | 
			
		||||
      ZDOTDIR="${ZDOTDIR:-$HOME}"
 | 
			
		||||
      PREZTO="$ZDOTDIR/.zprezto"
 | 
			
		||||
 | 
			
		||||
  3. Create a new Zsh configuration by copying the Zsh configuration files
 | 
			
		||||
  3. Clone the repository:
 | 
			
		||||
 | 
			
		||||
        git clone --recursive https://github.com/sorin-ionescu/prezto.git "$PREZTO"
 | 
			
		||||
 | 
			
		||||
  4. Create a new Zsh configuration by copying the Zsh configuration files
 | 
			
		||||
     provided:
 | 
			
		||||
 | 
			
		||||
        setopt EXTENDED_GLOB
 | 
			
		||||
        for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
 | 
			
		||||
          ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
 | 
			
		||||
        for rcfile in "$PREZTO/runcoms/^README.md(.N); do
 | 
			
		||||
          ln -s "$rcfile" "${ZDOTDIR}/.${rcfile:t}"
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
  4. Set Zsh as your default shell:
 | 
			
		||||
  5. Set Zsh as your default shell:
 | 
			
		||||
 | 
			
		||||
        chsh -s /bin/zsh
 | 
			
		||||
 | 
			
		||||
  5. Open a new Zsh terminal window or tab.
 | 
			
		||||
  6. Open a new Zsh terminal window or tab.
 | 
			
		||||
 | 
			
		||||
### Troubleshooting
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								init.zsh
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								init.zsh
									
									
									
									
									
								
							@@ -31,7 +31,7 @@ function pmodload {
 | 
			
		||||
  pmodules=("$argv[@]")
 | 
			
		||||
 | 
			
		||||
  # Add functions to $fpath.
 | 
			
		||||
  fpath=(${pmodules:+${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions(/FN)} $fpath)
 | 
			
		||||
  fpath=(${pmodules:+$PREZTO/modules/${^pmodules}/functions(/FN)} $fpath)
 | 
			
		||||
 | 
			
		||||
  function {
 | 
			
		||||
    local pfunction
 | 
			
		||||
@@ -40,7 +40,7 @@ function pmodload {
 | 
			
		||||
    setopt LOCAL_OPTIONS EXTENDED_GLOB
 | 
			
		||||
 | 
			
		||||
    # Load Prezto functions.
 | 
			
		||||
    for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/${^pmodules}/functions/$~pfunction_glob; do
 | 
			
		||||
    for pfunction in $PREZTO/modules/${^pmodules}/functions/$~pfunction_glob; do
 | 
			
		||||
      autoload -Uz "$pfunction"
 | 
			
		||||
    done
 | 
			
		||||
  }
 | 
			
		||||
@@ -49,19 +49,19 @@ function pmodload {
 | 
			
		||||
  for pmodule in "$pmodules[@]"; do
 | 
			
		||||
    if zstyle -t ":prezto:module:$pmodule" loaded 'yes' 'no'; then
 | 
			
		||||
      continue
 | 
			
		||||
    elif [[ ! -d "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule" ]]; then
 | 
			
		||||
    elif [[ ! -d "$PREZTO/modules/$pmodule" ]]; then
 | 
			
		||||
      print "$0: no such module: $pmodule" >&2
 | 
			
		||||
      continue
 | 
			
		||||
    else
 | 
			
		||||
      if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh" ]]; then
 | 
			
		||||
        source "${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/init.zsh"
 | 
			
		||||
      if [[ -s "$PREZTO/modules/$pmodule/init.zsh" ]]; then
 | 
			
		||||
        source "$PREZTO/modules/$pmodule/init.zsh"
 | 
			
		||||
      fi
 | 
			
		||||
 | 
			
		||||
      if (( $? == 0 )); then
 | 
			
		||||
        zstyle ":prezto:module:$pmodule" loaded 'yes'
 | 
			
		||||
      else
 | 
			
		||||
        # Remove the $fpath entry.
 | 
			
		||||
        fpath[(r)${ZDOTDIR:-$HOME}/.zprezto/modules/${pmodule}/functions]=()
 | 
			
		||||
        fpath[(r)$PREZTO/modules/${pmodule}/functions]=()
 | 
			
		||||
 | 
			
		||||
        function {
 | 
			
		||||
          local pfunction
 | 
			
		||||
@@ -71,7 +71,7 @@ function pmodload {
 | 
			
		||||
          setopt LOCAL_OPTIONS EXTENDED_GLOB
 | 
			
		||||
 | 
			
		||||
          # Unload Prezto functions.
 | 
			
		||||
          for pfunction in ${ZDOTDIR:-$HOME}/.zprezto/modules/$pmodule/functions/$~pfunction_glob; do
 | 
			
		||||
          for pfunction in $PREZTO/modules/$pmodule/functions/$~pfunction_glob; do
 | 
			
		||||
            unfunction "$pfunction"
 | 
			
		||||
          done
 | 
			
		||||
        }
 | 
			
		||||
@@ -87,8 +87,8 @@ function pmodload {
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Source the Prezto configuration file.
 | 
			
		||||
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
 | 
			
		||||
  source "${ZDOTDIR:-$HOME}/.zpreztorc"
 | 
			
		||||
if [[ -s "$ZDOTDIR/.zpreztorc" ]]; then
 | 
			
		||||
  source "$ZDOTDIR/.zpreztorc"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Disable color and theme in dumb terminals.
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ unsetopt FLOW_CONTROL      # Disable start/stop characters in shell editor.
 | 
			
		||||
 | 
			
		||||
# Use caching to make completion for cammands 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 "$ZDOTDIR/.zcompcache"
 | 
			
		||||
 | 
			
		||||
# Case-insensitive (all), partial-word, and then substring completion.
 | 
			
		||||
if zstyle -t ':prezto:module:completion:*' case-sensitive; then
 | 
			
		||||
@@ -61,44 +61,6 @@ zstyle ':completion:*' format ' %F{yellow}-- %d --%f'
 | 
			
		||||
zstyle ':completion:*' group-name ''
 | 
			
		||||
zstyle ':completion:*' verbose yes
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Don't autoexpand until nothing else has changed on line
 | 
			
		||||
zstyle ':completion:*' keep-prefix true
 | 
			
		||||
zstyle ':completion:*' expand prefix suffix
 | 
			
		||||
# zstyle ':completion:*' suffix true
 | 
			
		||||
 | 
			
		||||
# Complete ..
 | 
			
		||||
zstyle ':completion:*' special-dirs ..
 | 
			
		||||
 | 
			
		||||
# Do not select the current directory when executing cd ../<tab>.
 | 
			
		||||
zstyle ':completion:*:cd:*' ignore-parents parent pwd
 | 
			
		||||
 | 
			
		||||
# Do not perform completion on pastes containing tabs.
 | 
			
		||||
zstyle ':completion:*' insert-tab pending
 | 
			
		||||
 | 
			
		||||
# Some completion settings
 | 
			
		||||
# zstyle ':completion:*:match:*' match-original only
 | 
			
		||||
zstyle ':completion:*' insert-unambiguous true
 | 
			
		||||
 | 
			
		||||
# Expand partial paths.
 | 
			
		||||
# zstyle ':completion:*' squeeze-slashes true
 | 
			
		||||
 | 
			
		||||
# Rehash when failing to find the executable.
 | 
			
		||||
zstyle ':completion:*' rehash true
 | 
			
		||||
 | 
			
		||||
# Add a recent director listing completion using the cdr command
 | 
			
		||||
autoload -Uz chpwd_recent_dirs cdr add-zsh-hook
 | 
			
		||||
add-zsh-hook chpwd chpwd_recent_dirs
 | 
			
		||||
zstyle ':completion:*:*:cdr:*:*' menu selection
 | 
			
		||||
zstyle ':chpwd:*' recent-dirs-default true
 | 
			
		||||
zstyle ':completion:*' recent-dirs-insert both
 | 
			
		||||
zstyle ':chpwd:*' recent-dirs-prune parent
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Fuzzy match mistyped completions.
 | 
			
		||||
zstyle ':completion:*' completer _complete _match _approximate
 | 
			
		||||
zstyle ':completion:*:match:*' original only
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@
 | 
			
		||||
# Variables
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
HISTFILE="${ZDOTDIR:-$HOME}/.zhistory"       # The path to the history file.
 | 
			
		||||
HISTFILE="$ZDOTDIR/.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.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
# 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="$ZDOTDIR/.zcompdump"
 | 
			
		||||
  if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
 | 
			
		||||
    zcompile "$zcompdump"
 | 
			
		||||
  fi
 | 
			
		||||
 
 | 
			
		||||
@@ -10,3 +10,10 @@ if [[ "$SHLVL" -eq 1 && ! -o LOGIN ]]; then
 | 
			
		||||
  source "${ZDOTDIR:-$HOME}/.zprofile"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Zsh
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
ZDOTDIR="${ZDOTDIR:-$HOME}"
 | 
			
		||||
PREZTO="$ZDOTDIR/.zprezto"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,8 +6,8 @@
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Source Prezto.
 | 
			
		||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
 | 
			
		||||
  source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
 | 
			
		||||
if [[ -s "$PREZTO/init.zsh" ]]; then
 | 
			
		||||
  source "$PREZTO/init.zsh"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Customize to your needs...
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user