GithubHelp home page GithubHelp logo

Control C exits with return 130 about bat HOT 3 CLOSED

p1r473 avatar p1r473 commented on June 12, 2024
Control C exits with return 130

from bat.

Comments (3)

eth-p avatar eth-p commented on June 12, 2024 1

Outside of using the pager, bat would print everything to the terminal and exit immediately. That makes me suspect it might be a problem with less, the pager we use.

Does the same thing happen if you use less the-file.txt or cat the-file.txt | less?

If possible, can you try adding a more recent version of less to your path? The latest version should be 654.

from bat.

eth-p avatar eth-p commented on June 12, 2024 1

The interface where you need to press Q to quit is less, and there's two ways you can disable it:

If you don't want it to show up when there's only a couple of lines to print, --pager="less -R --quit-if-one-screen".

If you don't want it to show up at all, --paging=never disables it entirely.

from bat.

p1r473 avatar p1r473 commented on June 12, 2024
❯ /usr/local/bin/less --version
less 643 (POSIX regular expressions)

❯ /usr/local/bin/less /var/log/syslog                                                                                                               
❯ echo $?
0     

❯ /usr/bin/cat /var/log/syslog | /usr/local/bin/less 
❯ echo $?
0  


❯ bat /var/log/syslog 
❯ echo $?
0         

@eth-p
That looks good now I think! How can I get it to print to terminal and exit and not use the interface where I need to push Q to quit?
I tried export BAT_PAGER="less -R" but still need to press Q to quit
Also tried bat --pager="less -R" /var/log/syslog

from bat.

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.