mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	Disable bash autocompletion, make it optional. Add relevant documentation. Closes #140.
This commit is contained in:
		
							parent
							
								
									96d9d8333e
								
							
						
					
					
						commit
						024d550c8c
					
				
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @ -178,6 +178,16 @@ ADDITIONAL CONFIGURATION | ||||
| 
 | ||||
|         export AUTOJUMP_KEEP_SYMLINKS=1 | ||||
| 
 | ||||
| -   Autocomplete Additional Commands (Bash only) | ||||
| 
 | ||||
|     Autojump can be used to autocomplete other commands (e.g. cp or | ||||
|     vim). To use this feature, add the following environmental variable | ||||
|     in your \~/.bashrc: | ||||
| 
 | ||||
|         export AUTOJUMP_AUTOCOMPLETE_CMDS='cp vim' | ||||
| 
 | ||||
|     Changes require reloading autojump to take into effect. | ||||
| 
 | ||||
| ADVANCED USAGE | ||||
| -------------- | ||||
| 
 | ||||
|  | ||||
| @ -34,7 +34,7 @@ import re | ||||
| import shutil | ||||
| from tempfile import NamedTemporaryFile | ||||
| 
 | ||||
| VERSION = 'release-v21.1.1' | ||||
| VERSION = 'release-v21.1.2' | ||||
| MAX_KEYWEIGHT = 1000 | ||||
| MAX_STORED_PATHS = 1000 | ||||
| COMPLETION_SEPARATOR = '__' | ||||
|  | ||||
| @ -27,7 +27,10 @@ _autojump_files() | ||||
| EOF | ||||
|     fi | ||||
| } | ||||
| complete -o default -o bashdefault -F _autojump_files cp mv meld diff kdiff3 vim emacs | ||||
| 
 | ||||
| if [[ -n ${AUTOJUMP_AUTOCOMPLETE_CMDS} ]]; then | ||||
|     complete -o default -o bashdefault -F _autojump_files ${AUTOJUMP_AUTOCOMPLETE_CMDS} | ||||
| fi | ||||
| 
 | ||||
| #determine the data directory according to the XDG Base Directory Specification | ||||
| if [[ -n ${XDG_DATA_HOME} ]] && [[ ${XDG_DATA_HOME} =~ ${USER} ]]; then | ||||
|  | ||||
| @ -114,6 +114,23 @@ export\ AUTOJUMP_KEEP_SYMLINKS=1 | ||||
| \f[] | ||||
| .fi | ||||
| .RE | ||||
| .IP \[bu] 2 | ||||
| Autocomplete Additional Commands (Bash only) | ||||
| .RS 2 | ||||
| .PP | ||||
| Autojump can be used to autocomplete other commands (e.g. | ||||
| cp or vim). | ||||
| To use this feature, add the following environmental variable in your | ||||
| ~/.bashrc: | ||||
| .IP | ||||
| .nf | ||||
| \f[C] | ||||
| export\ AUTOJUMP_AUTOCOMPLETE_CMDS=\[aq]cp\ vim\[aq] | ||||
| \f[] | ||||
| .fi | ||||
| .PP | ||||
| Changes require reloading autojump to take into effect. | ||||
| .RE | ||||
| .SS ADVANCED USAGE | ||||
| .IP \[bu] 2 | ||||
| Using Multiple Arguments | ||||
|  | ||||
| @ -52,6 +52,15 @@ Options must be passed to 'autojump' and not the 'j' wrapper function. | ||||
| 
 | ||||
|         export AUTOJUMP_KEEP_SYMLINKS=1 | ||||
| 
 | ||||
| - Autocomplete Additional Commands (Bash only) | ||||
| 
 | ||||
|     Autojump can be used to autocomplete other commands (e.g. cp or vim). To use | ||||
|     this feature, add the following environmental variable in your ~/.bashrc: | ||||
| 
 | ||||
|         export AUTOJUMP_AUTOCOMPLETE_CMDS='cp vim' | ||||
| 
 | ||||
|     Changes require reloading autojump to take into effect. | ||||
| 
 | ||||
| ## ADVANCED USAGE | ||||
| 
 | ||||
| - Using Multiple Arguments | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user