Giter Site home page Giter Site logo

ack colored output issue about zaw HOT 3 CLOSED

zsh-users avatar zsh-users commented on June 17, 2024
ack colored output issue

from zaw.

Comments (3)

nakamuray avatar nakamuray commented on June 17, 2024

zaw uses $POSTDISPLAY to display candidates. And it seems that zsh automatically escape non-printable characters in the variable.

Although we can use $region_highlight to colorize regions in POSTDISPLAY, that mean we should parse escape sequences and convert it to $region_highlight which, I think, is too hard to implement as a zsh script.

Or, did you open this issue as a bug report?
In my environment, ack doesn't output escape sequences.

from zaw.

zhaocai avatar zhaocai commented on June 17, 2024

I fixed it with --nocolor option

         HISTNO="${histno}"
         read-from-minibuffer "ack --group "
         ret=$?
     }

     if [[ "${ret}" == 0 ]]; then
-        ack --group "${(Q@)${(z)REPLY}}" | \
+        ack --group --nocolor "${(Q@)${(z)REPLY}}" | \
             while read f; do
                 while read line; do
                     if [[ -z "${line}" ]]; then
                         break
                     fi
                     candidates+="${f}"

from zaw.

nakamuray avatar nakamuray commented on June 17, 2024

Thanks.
From 62175d3, zaw-src-ack pass that option.

from zaw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.