main: Do path expanstion after alias expansion
This commit is contained in:
		
							parent
							
								
									f46b148c52
								
							
						
					
					
						commit
						e1ecf950e2
					
				|  | @ -503,9 +503,7 @@ _zsh_highlight_main_highlighter_highlight_list() | ||||||
|       # TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x' |       # TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x' | ||||||
|       #       And then the entire 'alias' branch of the 'case' statement should |       #       And then the entire 'alias' branch of the 'case' statement should | ||||||
|       #       be done here. |       #       be done here. | ||||||
|       # TODO: path expansion should happen _after_ alias expansion |       _zsh_highlight_main__type "$arg" | ||||||
|       _zsh_highlight_main_highlighter_expand_path $arg |  | ||||||
|       _zsh_highlight_main__type "$REPLY" |  | ||||||
|       local res="$REPLY" |       local res="$REPLY" | ||||||
|       if [[ $res == "alias" ]]; then |       if [[ $res == "alias" ]]; then | ||||||
|         _zsh_highlight_main__resolve_alias $arg |         _zsh_highlight_main__resolve_alias $arg | ||||||
|  | @ -519,6 +517,12 @@ _zsh_highlight_main_highlighter_highlight_list() | ||||||
|           arg=$reply[1] |           arg=$reply[1] | ||||||
|         } |         } | ||||||
|       fi |       fi | ||||||
|  |       _zsh_highlight_main_highlighter_expand_path $arg | ||||||
|  |       arg=$REPLY | ||||||
|  |       if [[ $res != alias ]]; then | ||||||
|  |         _zsh_highlight_main__type "$arg" | ||||||
|  |         res="$REPLY" | ||||||
|  |       fi | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     # Analyse the current word. |     # Analyse the current word. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue