mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 12:09:08 +00:00 
			
		
		
		
	Integrate z
The z alias has been replaced with j.
This commit is contained in:
		
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@@ -7,3 +7,6 @@
 | 
				
			|||||||
[submodule "modules/completion/external"]
 | 
					[submodule "modules/completion/external"]
 | 
				
			||||||
	path = modules/completion/external
 | 
						path = modules/completion/external
 | 
				
			||||||
	url = https://github.com/zsh-users/zsh-completions.git
 | 
						url = https://github.com/zsh-users/zsh-completions.git
 | 
				
			||||||
 | 
					[submodule "modules/z/external"]
 | 
				
			||||||
 | 
						path = modules/z/external
 | 
				
			||||||
 | 
						url = https://github.com/rupa/z.git
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,23 +1,21 @@
 | 
				
			|||||||
Z
 | 
					Z
 | 
				
			||||||
=
 | 
					=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Maintains a frequently used directory list for fast directory changes. For more
 | 
					Integrates [z][1] into Oh My Zsh, which maintains a frequently used directory
 | 
				
			||||||
information see [z][1].
 | 
					list for fast directory changes.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Aliases
 | 
					Aliases
 | 
				
			||||||
-------
 | 
					-------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - `z` changes the directory to most *frecent* match.
 | 
					  - `j` changes the current working directory to the most *frecent* match.
 | 
				
			||||||
  - `j` is the same as `z` for [autojump][2] converts.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
Authors
 | 
					Authors
 | 
				
			||||||
-------
 | 
					-------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
*The authors of this module should be contacted via the [issue tracker][3].*
 | 
					*The authors of this module should be contacted via the [issue tracker][2].*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  - [Sorin Ionescu](https://github.com/sorin-ionescu)
 | 
					  - [Sorin Ionescu](https://github.com/sorin-ionescu)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[1]: https://github.com/rupa/z
 | 
					[1]: https://github.com/rupa/z
 | 
				
			||||||
[2]: https://github.com/joelthelion/autojump
 | 
					[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
 | 
				
			||||||
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								modules/z/external
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								modules/z/external
									
									
									
									
									
										Submodule
									
								
							 Submodule modules/z/external added at 9bf5feb86a
									
								
							@@ -5,36 +5,15 @@
 | 
				
			|||||||
#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
					#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_z_prefixes=(
 | 
					# Set the directory changing command.
 | 
				
			||||||
  ''
 | 
					_Z_CMD='j'
 | 
				
			||||||
  '/usr/local'
 | 
					 | 
				
			||||||
  '/opt/local'
 | 
					 | 
				
			||||||
  "$(brew --prefix 2> /dev/null)"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
for _z_prefix in "$_z_prefixes[@]"; do
 | 
					# Prevent symbolic link resolution.
 | 
				
			||||||
  _z_sh="${_z_prefix}/etc/profile.d/z.sh"
 | 
					_Z_NO_RESOLVE_SYMLINKS=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [[ -s "$_z_sh" ]]; then
 | 
					# Source module files.
 | 
				
			||||||
    source "$_z_sh"
 | 
					source "${0:h}/external/z.sh"
 | 
				
			||||||
    break
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
done
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
unset _z_prefix{es,} _z_sh
 | 
					# Cleanup.
 | 
				
			||||||
 | 
					unset _Z_{CMD,NO_RESOLVE_SYMLINKS}
 | 
				
			||||||
# Return if requirements are not found.
 | 
					 | 
				
			||||||
if (( ! $+functions[_z] )); then
 | 
					 | 
				
			||||||
  return 1
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function _z-precmd {
 | 
					 | 
				
			||||||
  _z --add "${PWD:A}"
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
autoload -Uz add-zsh-hook
 | 
					 | 
				
			||||||
add-zsh-hook precmd _z-precmd
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias z='nocorrect _z'
 | 
					 | 
				
			||||||
alias j='nocorrect _z'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user