Skip to content

Path highlighter

Phidica Veia edited this page Jan 31, 2020 · 3 revisions

This plugin underlines file paths in your scripts for visual confirmation when those files exist, in the same way that fish itself does this. Absolute paths are understood on all platforms, as are relative paths which are taken as relative to the current location of the script file on disk. Paths may be quoted or unquoted.

Limitations:

  • Paths containing variable or process expansion aren't understood.
  • Paths can be entirely quoted or entirely unquoted, but not a mix of both.
  • Paths can contain whitespace (which must be escaped for unquoted paths) but the space won't be underlined (bug).
  • On Windows, absolute paths are not aware of Cygwin/MSYS2 filesystems. This means /bin/python would not show as an existing file but C:\\cygwin\\bin\\python or C:/cygwin/bin/python would (though of course, binaries cannot be executed in this way in fish on Windows).

Turn off for all files

(Modify via fish settings.) The path highlighter is enabled by default. To disable it, remove path from the enabled_highlighters list. To enable it again, add the string back.

Turn off for some files

(Modify via fish settings.) The highlighter is active in every file except for the files in the blacklist. To prevent the highlighter running on a certain file, add the basename (that is, the filename with leading directory components removed) to the highlighter_blacklist list. There is currently no support for globbing characters (*, ?) or regular expressions in the blacklist.

Use of the status bar

(Modify via fish settings; see status bar explanation under highlighter_show_status.) This plugin does not make use of the status bar.

User guide

Development

Clone this wiki locally