mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	Correctly identify OSTYPE for some Linux distros.
This commit is contained in:
		
							parent
							
								
									d6453dffef
								
							
						
					
					
						commit
						f75d01299d
					
				| @ -60,7 +60,7 @@ from autojump_utils import sanitize | ||||
| from autojump_utils import take | ||||
| from autojump_utils import unico | ||||
| 
 | ||||
| VERSION = '22.2.0-beta' | ||||
| VERSION = '22.2.1-beta' | ||||
| FUZZY_MATCH_THRESHOLD = 0.6 | ||||
| TAB_ENTRIES_COUNT = 9 | ||||
| TAB_SEPARATOR = '__' | ||||
|  | ||||
| @ -93,7 +93,7 @@ jo() { | ||||
|     output="$(autojump ${@})" | ||||
|     if [[ -d "${output}" ]]; then | ||||
|         case ${OSTYPE} in | ||||
|             linux|linux-gnu) | ||||
|             linux*) | ||||
|                 xdg-open "${output}" | ||||
|                 ;; | ||||
|             darwin*) | ||||
| @ -103,7 +103,7 @@ jo() { | ||||
|                 cygstart "" $(cygpath -w -a ${output}) | ||||
|                 ;; | ||||
|             *) | ||||
|                 echo "Unknown operating system '${OSTYPE}'." 1>&2 | ||||
|                 echo "Unknown operating system: ${OSTYPE}." 1>&2 | ||||
|                 ;; | ||||
|         esac | ||||
|     else | ||||
|  | ||||
| @ -74,14 +74,14 @@ function jo | ||||
|         __aj_err "Try `autojump --help` for more information." | ||||
|     else | ||||
|         switch (sh -c 'echo ${OSTYPE}') | ||||
|             case linux-gnu | ||||
|             case 'linux*' | ||||
|                 xdg-open (autojump $argv) | ||||
|             case 'darwin*' | ||||
|                 open (autojump $argv) | ||||
|             case cygwin | ||||
|                 cygstart "" (cygpath -w -a (pwd)) | ||||
|             case '*' | ||||
|                 __aj_error "Unknown operating system." | ||||
|                 __aj_error "Unknown operating system: '"$OSTYPE"'" | ||||
|         end | ||||
|         echo end | ||||
|     end | ||||
|  | ||||
| @ -85,7 +85,7 @@ jo() { | ||||
|     local output="$(autojump ${@})" | ||||
|     if [[ -d "${output}" ]]; then | ||||
|         case ${OSTYPE} in | ||||
|             linux-gnu) | ||||
|             linux*) | ||||
|                 xdg-open "${output}" | ||||
|                 ;; | ||||
|             darwin*) | ||||
| @ -95,7 +95,7 @@ jo() { | ||||
|                 cygstart "" $(cygpath -w -a ${output}) | ||||
|                 ;; | ||||
|             *) | ||||
|                 echo "Unknown operating system." 1>&2 | ||||
|                 echo "Unknown operating system: ${OSTYPE}" 1>&2 | ||||
|                 ;; | ||||
|         esac | ||||
|     else | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user