ranger-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ranger-users] I can't get scope.sh to work properly on all files.


From: Somelauw .
Subject: [Ranger-users] I can't get scope.sh to work properly on all files.
Date: Sun, 3 Nov 2013 01:59:16 +0100

I created a small latex file test.tex:

\begin{document}
    \begin{equation}
        h = \sqrt{n}
    \end{equation}
\end{document}

Now, when I run scope.sh on this I get to see the following (coloured) output:
% ~/.config/ranger/scope.sh test.tex
-Eegin{document}
   egin{equation}
        h = \sqrt{n}
    \end{equation}
\end{document}

Which obviously isn't correct. I'm not sure, but I think it might be
interpreting ansi colour codes twice somehow.

By manually parsing scope.sh I figured it should be executing the
following command:
% output=$(/usr/bin/highlight test.tex --out-format=ansi); echo -E $output
which displays the correct (coloured) output for me:
\begin{document}
    \begin{equation}
        h = \sqrt{n}
    \end{equation}
\end{document

My scope.sh is exactly the same as the one in ranger/doc/config in the
latest commit
(which is 093c8b1a7b7656c82923539a4286606fd7ded4b5)
except for line 43:
+highlight() { command /usr/bin/highlight "$@"; test $? = 0 -o $? = 141; }
-highlight() { command highlight "$@"; test $? = 0 -o $? = 141; }

Does anyone have an idea what could be the problem?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]