The program highlight of the package highlight is not usable when ommitting the path.
The path of /usr/local/bin/highlight (mintsystem highlight) has precedence over /usr/bin/highlight (highlight package) if you simply invoke highlight. This affects at least the filemanager ranger, whose scope.sh uses highlight without specifying a path.
How to reproduce
Highlight itself
Install highlight and try to use it:
$ sudo apt-get install highlight
$ # The following command will hang, because it represents the mintsystem highlight script, which waits for input
$ highlight --syntax=bash --out-format=ansi /usr/local/bin/highlight
$ # will not hang, because it represents the original program
$ /usr/bin/highlight --syntax=bash --out-format=ansi /usr/local/bin/highlight
Ranger
$ sudo apt-get install ranger highlight
$ # create basic ~/.config/ranger files
$ # notice that simple text files are previewed in the 3rd column
$ ranger
$ # copy /etc/ranger/ configuration files (includes scope.sh) to ~/.config/ranger/
$ ranger --copy-config=all
$ # the following call will no longer preview simple text files
$ ranger
Affected packages:
highlight
ranger
The filemanager ranger will fail to preview text files after the recommended ranger --copy-config=all or ranger --copy-config=scope (as soon as ~/.config/ranger/scope.sh exists, which is configured to be used for previews in /etc/ranger/config/rc.conf resp. ~/.config/ranger/rc.conf.
Temporary workaround for ranger
$ # will replace the wrapped highlight command with /usr/bin/highlight in the scope script
$ sed -i 's/command highlight/command \/usr\/bin\/highlight/' ~/.config/ranger/scope.sh
Proposal for clean solution:
Rename /usr/local/bin/highlight to /usr/local/bin/highlight-mint.
[Edit] replaced wrong path /usr/local/ with /usr/local/bin/
Mint version:
Linux Mint 18.3 'Sylvia'
Problem:
The program
highlight
of the packagehighlight
is not usable when ommitting the path.The path of
/usr/local/bin/highlight
(mintsystem highlight) has precedence over/usr/bin/highlight
(highlight package) if you simply invokehighlight
. This affects at least the filemanager ranger, whose scope.sh useshighlight
without specifying a path.How to reproduce
Highlight itself
Install
highlight
and try to use it:Ranger
Affected packages:
The filemanager ranger will fail to preview text files after the recommended
ranger --copy-config=all
orranger --copy-config=scope
(as soon as ~/.config/ranger/scope.sh exists, which is configured to be used for previews in/etc/ranger/config/rc.conf
resp.~/.config/ranger/rc.conf
.Temporary workaround for ranger
Proposal for clean solution:
Rename
/usr/local/bin/highlight
to/usr/local/bin/highlight-mint
.[Edit] replaced wrong path /usr/local/ with /usr/local/bin/