Coder Social home page Coder Social logo

Comments (14)

CodySchrank avatar CodySchrank commented on May 18, 2024 2

@JonathanShor There are certainly some pitfalls with using ctrl + C but I don't think I've ever accidentally killed something when trying to clear a line. I made a PR removing ctrl + Q and added a note that ctrl + C can be used to clear a line.

from terminal-mac-cheatsheet.

CodySchrank avatar CodySchrank commented on May 18, 2024 1

@JonathanShor Ahh now I see what you were saying. For the mode changer ctrl+Q does not for me, but ctrl+V does.

@ZeroFlatline Ctrl+U works, but the cursor has to be at the end of the line. Its actual function is to clear everything in front of the cursor.

So far ctrl+C is the only shortcut that clears the line for me with the cursor at any position.

from terminal-mac-cheatsheet.

0nn0 avatar 0nn0 commented on May 18, 2024

@manniamc Are you using the default terminal on Mac? Can you explain when it does not work?

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

Doesn't work for me either. Doesn't work at all, ever, as far as I can tell. Never knew about this hot-key, and I guess now I never will. :)

Using one of the default profiles Basic on macOS 10.13.1. Terminal reports Version 2.8 (400).

from terminal-mac-cheatsheet.

twhitt14 avatar twhitt14 commented on May 18, 2024

Doesn't work for me either - this command should be removed

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

Hmm, actually, ctrl+Q seems to do SOMETHING, just not deleting the line.

It seems to toggle a mode where then next keypress is printed directly to the line instead of being interpreted. For example, if you hit ctrl+Q and then ctrl+W, it prints ^W to the line (instead of deleting the previous word, as ctrl+W normally does).

from terminal-mac-cheatsheet.

HoseynHeydari avatar HoseynHeydari commented on May 18, 2024

@JonathanShor
I try do what you say above but it doesn't work.

Using one of the default profiles Basic on macOS 10.13.3. Terminal reports Version 2.8 (400).

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

@HoseynHeydari That's bizarre. I'm able to reproduce it now an macOS 10.13.4, Terminal Version 2.8.2 (404).

from terminal-mac-cheatsheet.

HoseynHeydari avatar HoseynHeydari commented on May 18, 2024

@JonathanShor I try all keyboard and find that ctrl+V for me does what ctrl+Q does for you.

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

@HoseynHeydari Interestingly, ctrl+V also works for me, along with ctrl+Q.

from terminal-mac-cheatsheet.

CodySchrank avatar CodySchrank commented on May 18, 2024

Neither ctrl+Q or ctrl+V work for me. The only combination that will clear a line for me is ctrl+C.
macOS 10.13.4, Terminal 2.8.2

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

@CodySchrank
Just for clarity, we found ctrl+V to have a different function, not that it clears the line for us.

from terminal-mac-cheatsheet.

ZeroFlatline avatar ZeroFlatline commented on May 18, 2024

To clear everything in the current line. I usually use ctrl+U.
Hope that helps.

from terminal-mac-cheatsheet.

JonathanShor avatar JonathanShor commented on May 18, 2024

Yeah, with ctrl+U and ctrl+K (clear everything after the cursor), you can get the same result ultimately.

@CodySchrank Ctrl+C is an option, but just have to keep in mind that you're sending a reset to the terminal, which is much stronger than just clearing the text on the current line in some circumstances.
And so weird I have this random ctrl+Q!

from terminal-mac-cheatsheet.

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.