Underline existing paths
This commit is contained in:
parent
e1ed5039a5
commit
2ff771eaa9
@ -20,3 +20,4 @@ Just source the script from your `~/.zshrc`.
|
|||||||
* [Mounier Florian](http://github.com/paradoxxxzero)
|
* [Mounier Florian](http://github.com/paradoxxxzero)
|
||||||
* [Jonathan Dahan](http://github.com/jedahan)
|
* [Jonathan Dahan](http://github.com/jedahan)
|
||||||
* James Ahlborn
|
* James Ahlborn
|
||||||
|
* [Andreas Jaggi](http://github.com/x-way)
|
||||||
|
@ -10,6 +10,7 @@ ZLE_ALIAS_STYLE='fg=magenta,bold'
|
|||||||
ZLE_BUILTIN_STYLE='fg=cyan,bold'
|
ZLE_BUILTIN_STYLE='fg=cyan,bold'
|
||||||
ZLE_FUNCTION_STYLE='fg=blue,bold'
|
ZLE_FUNCTION_STYLE='fg=blue,bold'
|
||||||
ZLE_COMMAND_STYLE='fg=green,bold'
|
ZLE_COMMAND_STYLE='fg=green,bold'
|
||||||
|
ZLE_PATH_STYLE='fg=white,underline'
|
||||||
ZLE_COMMAND_UNKNOWN_TOKEN_STYLE='fg=red,bold'
|
ZLE_COMMAND_UNKNOWN_TOKEN_STYLE='fg=red,bold'
|
||||||
|
|
||||||
ZLE_HYPHEN_CLI_OPTION='fg=yellow,bold'
|
ZLE_HYPHEN_CLI_OPTION='fg=yellow,bold'
|
||||||
@ -40,7 +41,10 @@ colorize-zle-buffer() {
|
|||||||
*'shell builtin'*) style=$ZLE_BUILTIN_STYLE;;
|
*'shell builtin'*) style=$ZLE_BUILTIN_STYLE;;
|
||||||
*'shell function'*) style=$ZLE_FUNCTION_STYLE;;
|
*'shell function'*) style=$ZLE_FUNCTION_STYLE;;
|
||||||
*"$cmd is"*) style=$ZLE_COMMAND_STYLE;;
|
*"$cmd is"*) style=$ZLE_COMMAND_STYLE;;
|
||||||
*) style=$ZLE_COMMAND_UNKNOWN_TOKEN_STYLE;;
|
*)
|
||||||
|
style=$ZLE_COMMAND_UNKNOWN_TOKEN_STYLE
|
||||||
|
[ -e "$arg" ] && style=$ZLE_PATH_STYLE
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
case $arg in
|
case $arg in
|
||||||
@ -50,7 +54,10 @@ colorize-zle-buffer() {
|
|||||||
'"'*'"') style=$ZLE_DOUBLE_QUOTED;;
|
'"'*'"') style=$ZLE_DOUBLE_QUOTED;;
|
||||||
'`'*'`') style=$ZLE_BACK_QUOTED;;
|
'`'*'`') style=$ZLE_BACK_QUOTED;;
|
||||||
*"*"*) style=$ZLE_GLOBING;;
|
*"*"*) style=$ZLE_GLOBING;;
|
||||||
*) style=$ZLE_DEFAULT;;
|
*)
|
||||||
|
style=$ZLE_DEFAULT
|
||||||
|
[ -e "$arg" ] && style=$ZLE_PATH_STYLE
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
region_highlight+=("$start_pos $end_pos $style")
|
region_highlight+=("$start_pos $end_pos $style")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user