Page 1 of 1
program "highlight" not working normally
Posted: Tue Jan 08, 2013 7:09 pm
by catch22
In Synaptic it shows the program "highlight" is version 3.8-2 and is not upgradeable by force.
In terminal though
shows no output and no return to command prompt.
EDIT: Uninstalled via Synaptic, then downloaded 3.12 and in terminal did
and then cd into the directory of the untarred did
and got
Code: Select all
bash: ./configure: File or directory doesn't exist
Looks like I'm stuck here...
Re: program "highlight" not working normally
Posted: Tue Feb 12, 2013 3:50 pm
by catch22
I mailed the developer at highlight, and he says the following: there indeed is a conflict with a Mint package, see:
http://andre-simon.de/dokuwiki/doku.php ... tion_linux
There I could see : "There is a system script called highlight which is located in a preferenced path:
mintsystem provides:
highlight provides:
Calling this script with the true highlight command line options will have no effect."
Can anyone tell me if this /usr/local/bin/highlight that is in Mint by default, can be deleted without serious consequence?
I would like the other highlight program to work as intended for previews in the file manager ranger
http://ranger.nongnu.org/
Re: program "highlight" not working normally
Posted: Tue Feb 12, 2013 7:25 pm
by hut
To work around this problem, you need to edit the configuration file for previews in ranger, ~/.config/ranger/scope.sh, find the place where "highlight" is called, and change it from "highlight" to "/usr/bin/highlight". For example, in the most recent version of scope.sh, you'd have to change line 43 from
Code: Select all
highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }
to
Code: Select all
highlight() { /usr/bin/highlight "$@"; test $? = 0 -o $? = 141; }
Re: program "highlight" not working normally
Posted: Thu Feb 14, 2013 4:49 pm
by catch22
hut wrote:To work around this problem, you need to edit the configuration file for previews in ranger, ~/.config/ranger/scope.sh, find the place where "highlight" is called, and change it from "highlight" to "/usr/bin/highlight". For example, in the most recent version of scope.sh, you'd have to change line 43 from
Code: Select all
highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }
to
Code: Select all
highlight() { /usr/bin/highlight "$@"; test $? = 0 -o $? = 141; }
Thanks for the clear info, only my scope.sh doesn't have anything like what you mention; the only lines with "highlight" in them are these:
Code: Select all
;; # fall back to highlight/cat if theres no lynx/elinks
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
highlight --out-format=ansi "$path" | head -n $maxln
Re: program "highlight" not working normally
Posted: Thu Feb 14, 2013 7:22 pm
by hut
catch22 wrote:hut wrote:To work around this problem, you need to edit the configuration file for previews in ranger, ~/.config/ranger/scope.sh, find the place where "highlight" is called, and change it from "highlight" to "/usr/bin/highlight". For example, in the most recent version of scope.sh, you'd have to change line 43 from
Code: Select all
highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }
to
Code: Select all
highlight() { /usr/bin/highlight "$@"; test $? = 0 -o $? = 141; }
Thanks for the clear info, only my scope.sh doesn't have anything like what you mention; the only lines with "highlight" in them are these:
Code: Select all
;; # fall back to highlight/cat if theres no lynx/elinks
esac
case "$mimetype" in
# Syntax highlight for text files:
text/* | */xml)
highlight --out-format=ansi "$path" | head -n $maxln
change
Code: Select all
highlight --out-format=ansi "$path" | head -n $maxln
to
Code: Select all
/usr/bin/highlight --out-format=ansi "$path" | head -n $maxln
Re: program "highlight" not working normally
Posted: Mon Mar 11, 2013 2:57 pm
by catch22
hut wrote:change
Code: Select all
highlight --out-format=ansi "$path" | head -n $maxln
to
Code: Select all
/usr/bin/highlight --out-format=ansi "$path" | head -n $maxln
Thanks Hut, and sorry for the late reply; I now see I didn't subscribe to my own topic somehow
and thought you left me in the cold.
I'll check it out tonight
EDIT: checked and working
Re: program "highlight" not working normally
Posted: Tue Mar 22, 2016 2:08 pm
by Jairus
Thanks from me too,
hut; your work-around got highlighting functioning normally in my Arch Linux install.