mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	merging rc branch
This commit is contained in:
		
						commit
						1ab78ae91c
					
				
							
								
								
									
										142
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										142
									
								
								ChangeLog
									
									
									
									
									
								
							| @ -4,111 +4,117 @@ | ||||
| 
 | ||||
| * Release v21: | ||||
| 
 | ||||
|  - New mailing list for developer discussion and announcements: | ||||
|   - New mailing list for developer discussion and announcements: | ||||
| 
 | ||||
|    https://groups.google.com/forum/?fromgroups%5C#!forum/autojump | ||||
|   https://groups.google.com/forum/?fromgroups%5C#!forum/autojump | ||||
| 
 | ||||
|  - Switch to semantic versioning (http://semver.org/): major.minor.micro | ||||
|   - Switch to semantic versioning (http://semver.org/): major.minor.micro | ||||
| 
 | ||||
|    major = breaks backwards compatibility | ||||
|    minor = new features with backwards compatibility | ||||
|    micro = bug fixes with backwards compatibility | ||||
|   major = breaks backwards compatibility | ||||
|   minor = new features with backwards compatibility | ||||
|   micro = bug fixes with backwards compatibility | ||||
| 
 | ||||
|  - Migration code for v17 or older users has been removed. | ||||
|   - Migration code for v17 or older users has been removed. | ||||
| 
 | ||||
|    During testing, it was apparent that the migration code wasn't working to | ||||
|    begin with. The major distros (Debian, RedHat) have already moved to v18+ for | ||||
|    LTS. Rolling release distros and Homebrew / Macports are regularly kept up to | ||||
|    date. | ||||
|   During testing, it was apparent that the migration code wasn't working to | ||||
|   begin with. The major distros (Debian, RedHat) have already moved to v18+ for | ||||
|   LTS. Rolling release distros and Homebrew / Macports are regularly kept up to | ||||
|   date. | ||||
| 
 | ||||
|    Users upgrading from v17 or older will start with a new database. | ||||
|   Users upgrading from v17 or older will start with a new database. | ||||
| 
 | ||||
|  - Approximate matching introduced. | ||||
|   - Approximate matching introduced. | ||||
| 
 | ||||
|    Matching priority is now: | ||||
|    1. exact match | ||||
|    2. case insensitive match | ||||
|    3. approximate match | ||||
|   Matching priority is now: | ||||
|   1. exact match | ||||
|   2. case insensitive match | ||||
|   3. approximate match | ||||
| 
 | ||||
|  - The `j` function now accepts autojump arguments (e.g. --help, --stat). | ||||
|   - The `j` function now accepts autojump arguments (e.g. --help, --stat). | ||||
| 
 | ||||
|    As a result, the `jumpstat` alias is now removed. The preferred method is `j | ||||
|    --stat` or `j -s`. Consequently, autojump cannot jump to directories | ||||
|    beginning with a hyphen '-'. | ||||
|   As a result, the `jumpstat` alias is now removed. The preferred method is `j | ||||
|   --stat` or `j -s`. Consequently, autojump cannot jump to directories | ||||
|   beginning with a hyphen '-'. | ||||
| 
 | ||||
|  - Always use case insensitive search with AUTOJUMP_IGNORE_CASE=1 | ||||
|   - Always use case insensitive search with AUTOJUMP_IGNORE_CASE=1 | ||||
| 
 | ||||
|    As mentioned earlier, normal priority is to prefer exact match and then check | ||||
|    for case insensitive match. For users who prefer case insensitivity can now | ||||
|    modify the program behavior. | ||||
|   As mentioned earlier, normal priority is to prefer exact match and then check | ||||
|   for case insensitive match. For users who prefer case insensitivity can now | ||||
|   modify the program behavior. | ||||
| 
 | ||||
|  - Prevent database decay with AUTOJUMP_KEEP_ALL_ENTRIES=1 | ||||
|   - Prevent database decay with AUTOJUMP_KEEP_ALL_ENTRIES=1 | ||||
| 
 | ||||
|    The database is regularly trimmed for performance reasons. However users can | ||||
|    prevent database maintenance with the above environmental variable. | ||||
|   The database is regularly trimmed for performance reasons. However users can | ||||
|   prevent database maintenance with the above environmental variable. | ||||
| 
 | ||||
|  - ZSH tab completion fixed. | ||||
|   - ZSH tab completion fixed. | ||||
| 
 | ||||
|    ZSH behavior now matches Bash behavior. To use type: | ||||
|   ZSH behavior now matches Bash behavior. However it requires the `compinit` | ||||
|   module to be loaded. Add the following line to ~/.zshrc: | ||||
| 
 | ||||
| 	   j<space><tab><tab> | ||||
|   autoload -U compinit; compinit | ||||
| 
 | ||||
|    A menu showing the top database entries will be displayed. Type in any number | ||||
|    followed by <tab> to complete the entry. | ||||
|   To use type: | ||||
| 
 | ||||
|  - Database entry weight growth changed form linear to logarithmic scale. | ||||
|   j<space><tab><tab> | ||||
| 
 | ||||
|    A combination of low total weight ceiling and linear growth resulted in | ||||
|    a few, commonly used directories to be responsible for 50%+ of the total | ||||
|    database weight. This caused unnecessary trimming of long tail entries. | ||||
|   A menu showing the top database entries will be displayed. Type in any number | ||||
|   followed by <tab> to complete the entry. | ||||
| 
 | ||||
|    Switching to logarithmic growth combined with regular decay meant that | ||||
|    commonly used directories still climbed database ranking appropriately with a | ||||
|    more even weight distribution. | ||||
|   - Database entry weight growth changed form linear to logarithmic scale. | ||||
| 
 | ||||
|  - Unit testing suite added. | ||||
|   A combination of low total weight ceiling and linear growth resulted in | ||||
|   a few, commonly used directories to be responsible for 50%+ of the total | ||||
|   database weight. This caused unnecessary trimming of long tail entries. | ||||
| 
 | ||||
|  - Miscellaneous refactoring, bug fixes, documentation updates. | ||||
|   Switching to logarithmic growth combined with regular decay meant that | ||||
|   commonly used directories still climbed database ranking appropriately with a | ||||
|   more even weight distribution. | ||||
| 
 | ||||
|   - Unit testing suite added. | ||||
| 
 | ||||
|   - Miscellaneous refactoring, bug fixes, documentation updates. | ||||
| 
 | ||||
| * Release v20: | ||||
| 
 | ||||
|  - Python versions supported is now v2.7+ and v3.2+ due to rewrite using | ||||
|  argparse. | ||||
|   - Python versions supported is now v2.7+ and v3.2+ due to rewrite using | ||||
|   argparse. | ||||
| 
 | ||||
|  - Man page and --help has been overhauled to provide better documentation and | ||||
|  usage scenarios. | ||||
|   - Man page and --help has been overhauled to provide better documentation and | ||||
|   usage scenarios. | ||||
| 
 | ||||
|  - Installation scripts now act dependent on current environmental settings. | ||||
|   - Installation scripts now act dependent on current environmental settings. | ||||
| 
 | ||||
|    If run as root, will do a global install. Installation script also detects | ||||
|    which version to install (bash or zsh) dependent on $SHELL.  Both of these | ||||
|    behaviors can be overrode using --local/--global or --bash/--zsh arguments. | ||||
|   If run as root, will do a global install. Installation script also detects | ||||
|   which version to install (bash or zsh) dependent on $SHELL.  Both of these | ||||
|   behaviors can be overrode using --local/--global or --bash/--zsh arguments. | ||||
| 
 | ||||
|  - Uninstallation script added, will remove both global and local installations | ||||
|  but ignores database. | ||||
|   - Uninstallation script added, will remove both global and local installations | ||||
|   but ignores database. | ||||
| 
 | ||||
|  - Allow symlink database entries with AUTOJUMP_KEEP_SYMLINKS=1 | ||||
|   - Allow symlink database entries with AUTOJUMP_KEEP_SYMLINKS=1 | ||||
| 
 | ||||
|    Normally symlinks are resolved to full path to prevent duplicate database | ||||
|    entries. However users who prefer symlink paths can modify behavior with the | ||||
|    above environmental variable. | ||||
|   Normally symlinks are resolved to full path to prevent duplicate database | ||||
|   entries. However users who prefer symlink paths can modify behavior with the | ||||
|   above environmental variable. | ||||
| 
 | ||||
|  - This ChangeLog added to better help package maintainers keep track of changes | ||||
|    between releases. | ||||
|   - This ChangeLog added to better help package maintainers keep track of | ||||
|   changes | ||||
|   between releases. | ||||
| 
 | ||||
|  - Miscellaneous bug fixes. | ||||
|   - Miscellaneous bug fixes. | ||||
| 
 | ||||
| * Release v19: | ||||
| 
 | ||||
|  - prototype `cp` and `mv` directory tab completion | ||||
|  - Debian post-installation instructions | ||||
|  - minor Mac OS X fixes | ||||
|   - prototype `cp` and `mv` directory tab completion | ||||
|   - Debian post-installation instructions | ||||
|   - minor Mac OS X fixes | ||||
| 
 | ||||
| * Release v18: | ||||
| 
 | ||||
|  - add automated version numbering | ||||
|  - performance tweaks to reduce filesystem checks | ||||
|  - add local installation option | ||||
|  - unicode fixes | ||||
|  - ugly fixes for Python 3 | ||||
|  - migrate to new database format | ||||
|   - add automated version numbering | ||||
|   - performance tweaks to reduce filesystem checks | ||||
|   - add local installation option | ||||
|   - unicode fixes | ||||
|   - ugly fixes for Python 3 | ||||
|   - migrate to new database format | ||||
|  | ||||
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							| @ -145,6 +145,13 @@ INTERNAL OPTIONS | ||||
| ADDITIONAL CONFIGURATION | ||||
| ------------------------ | ||||
| 
 | ||||
| -   Enable ZSH Tab Completion | ||||
| 
 | ||||
|     ZSH tab completion requires the `compinit` module to be loaded. | ||||
|     Please add the following line to your \~/.zshrc: | ||||
| 
 | ||||
|         autoload -U compinit; compinit | ||||
| 
 | ||||
| -   Always Ignore Case | ||||
| 
 | ||||
|     Default behavior is to prioritize exact matches over all else. For | ||||
| @ -188,6 +195,12 @@ ADVANCED USAGE | ||||
|     a different entry. In the above example, `j w in` would then jump | ||||
|     you into /home/user/work/inbox. | ||||
| 
 | ||||
| -   ZSH Tab Completion | ||||
| 
 | ||||
|     Tab completion requires two tabs before autojump will display the | ||||
|     completion menu. However if `setopt nolistambiguous` is enabled, | ||||
|     then only one tab is required. | ||||
| 
 | ||||
| -   Change Directory Weight | ||||
| 
 | ||||
|     To manually change a directory's key weight, you can edit the file | ||||
|  | ||||
| @ -29,7 +29,7 @@ import shutil | ||||
| import sys | ||||
| from tempfile import NamedTemporaryFile | ||||
| 
 | ||||
| VERSION = 'release-v21-rc' | ||||
| VERSION = 'release-v21-rc.2' | ||||
| MAX_KEYWEIGHT = 1000 | ||||
| MAX_STORED_PATHS = 1000 | ||||
| COMPLETION_SEPARATOR = '__' | ||||
|  | ||||
| @ -63,7 +63,7 @@ case $PROMPT_COMMAND in | ||||
| esac | ||||
| 
 | ||||
| function j { | ||||
|     if [[ ${@} =~ -.* ]]; then | ||||
|     if [[ ${@} =~ ^-{1,2}.* ]]; then | ||||
|         autojump ${@} | ||||
|         return | ||||
|     fi | ||||
|  | ||||
| @ -1,8 +1,8 @@ | ||||
| # determine the data directory according to the XDG Base Directory Specification | ||||
| if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} == *${USER}* ]]; then | ||||
| 	export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump" | ||||
|     export AUTOJUMP_DATA_DIR="${XDG_DATA_HOME}/autojump" | ||||
| else | ||||
| 	export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump | ||||
|     export AUTOJUMP_DATA_DIR=${HOME}/.local/share/autojump | ||||
| fi | ||||
| 
 | ||||
| if [[ ! -e ${AUTOJUMP_DATA_DIR} ]]; then | ||||
| @ -31,15 +31,15 @@ function autojump_preexec() { | ||||
|     { (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>|${AUTOJUMP_DATA_DIR}/.autojump_errors ; } 2>/dev/null | ||||
| } | ||||
| 
 | ||||
| autoload -U compinit; compinit | ||||
| typeset -ga preexec_functions | ||||
| preexec_functions+=autojump_preexec | ||||
| 
 | ||||
| function j { | ||||
| 	if [[ ${@} == -* ]]; then | ||||
| 		autojump ${@} | ||||
| 		return | ||||
| 	fi | ||||
|     # Cannot use =~ due to MacPorts zsh v4.2, see issue #125. | ||||
|     if [[ ${@} == -* ]]; then | ||||
|         autojump ${@} | ||||
|         return | ||||
|     fi | ||||
| 
 | ||||
|     local new_path="$(autojump $@)" | ||||
|     if [ -d "${new_path}" ]; then | ||||
|  | ||||
| @ -54,6 +54,19 @@ wrapper function. | ||||
| .fi | ||||
| .SS ADDITIONAL CONFIGURATION | ||||
| .IP \[bu] 2 | ||||
| Enable ZSH Tab Completion | ||||
| .RS 2 | ||||
| .PP | ||||
| ZSH tab completion requires the \f[C]compinit\f[] module to be loaded. | ||||
| Please add the following line to your ~/.zshrc: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| autoload\ -U\ compinit;\ compinit | ||||
| \f[] | ||||
| .fi | ||||
| .RE | ||||
| .IP \[bu] 2 | ||||
| Always Ignore Case | ||||
| .RS 2 | ||||
| .PP | ||||
| @ -123,6 +136,15 @@ In the above example, \f[C]j\ w\ in\f[] would then jump you into | ||||
| /home/user/work/inbox. | ||||
| .RE | ||||
| .IP \[bu] 2 | ||||
| ZSH Tab Completion | ||||
| .RS 2 | ||||
| .PP | ||||
| Tab completion requires two tabs before autojump will display the | ||||
| completion menu. | ||||
| However if \f[C]setopt\ nolistambiguous\f[] is enabled, then only one | ||||
| tab is required. | ||||
| .RE | ||||
| .IP \[bu] 2 | ||||
| Change Directory Weight | ||||
| .RS 2 | ||||
| .PP | ||||
|  | ||||
							
								
								
									
										10
									
								
								docs/body.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								docs/body.md
									
									
									
									
									
								
							| @ -18,6 +18,12 @@ Options must be passed to 'autojump' and not the 'j' wrapper function. | ||||
| 
 | ||||
| ## ADDITIONAL CONFIGURATION | ||||
| 
 | ||||
| - Enable ZSH Tab Completion | ||||
| 
 | ||||
|     ZSH tab completion requires the `compinit` module to be loaded. Please add the following line to your ~/.zshrc: | ||||
| 
 | ||||
|         autoload -U compinit; compinit | ||||
| 
 | ||||
| - Always Ignore Case | ||||
| 
 | ||||
|     Default behavior is to prioritize exact matches over all else. For example, `j foo` will prefer /foobar over /FooBar even if the latter has a higher weight. To change this behavior and ignore case, add the following environmental variable in your ~/.bashrc: | ||||
| @ -47,6 +53,10 @@ Options must be passed to 'autojump' and not the 'j' wrapper function. | ||||
| 
 | ||||
|     `j in` would jump into /home/user/mail/inbox as the higher weighted entry. However you can pass multiple arguments to autojump to prefer a different entry. In the above example, `j w in` would then jump you into /home/user/work/inbox. | ||||
| 
 | ||||
| - ZSH Tab Completion | ||||
| 
 | ||||
|     Tab completion requires two tabs before autojump will display the completion menu. However if `setopt nolistambiguous` is enabled, then only one tab is required. | ||||
| 
 | ||||
| - Change Directory Weight | ||||
| 
 | ||||
|     To manually change a directory's key weight, you can edit the file _$XDG_DATA_HOME/autojump/autojump.txt_. Each entry has two columns. The first is the key weight and the second is the path: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user