Skip to main content
added 15 characters in body
Source Link
YorSubs
  • 661
  • 2
  • 7
  • 14

It seems that clear and bash Ctrl-L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl-L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl-L system. Is there a way to override clear so that it does a Ctrl-L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl-L functionality.

As a side note, I just noticed that PowerShell also has a binding for Ctrl-L and it performs the same way as Ctrl-L on bash,bash; it seems that the PowerShell designers there took a lot from bash, but thatwhile cmd.exe consoles do not have this functionality).

It seems that clear and bash Ctrl-L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl-L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl-L system. Is there a way to override clear so that it does a Ctrl-L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl-L functionality.

As a side note, I just noticed that PowerShell also has a binding for Ctrl-L and it performs the same way as Ctrl-L on bash, seems the designers there took a lot from bash, but that cmd.exe consoles do not have this functionality).

It seems that clear and bash Ctrl-L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl-L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl-L system. Is there a way to override clear so that it does a Ctrl-L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl-L functionality.

As a side note, I just noticed that PowerShell also has a binding for Ctrl-L and it performs the same way as Ctrl-L on bash; it seems that the PowerShell designers there took a lot from bash, while cmd.exe consoles do not have this functionality.

edited title
Link
muru
  • 77.9k
  • 16
  • 212
  • 318

Bash, Can I make the clear vscommand behave like Ctrl-L in Bash?

Became Hot Network Question
Minor formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

It seems that clear and bash Ctrl--L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl--L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl--L system. Is there a way to override clear so that it does a Ctrl--L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl--L functionality.

(as As a side note, I just noticed that PowerShell also has a binding for Ctrl--L and it performs the same way as Ctrl--L on bash, seems the designers there took a lot from bash, but that cmd.exe consoles do not have this functionality).

It seems that clear and bash Ctrl-L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl-L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl-L system. Is there a way to override clear so that it does a Ctrl-L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl-L functionality.

(as a side note, I just noticed that PowerShell also has a binding for Ctrl-L and it performs the same way as Ctrl-L on bash, seems the designers there took a lot from bash, but that cmd.exe consoles do not have this functionality).

It seems that clear and bash Ctrl-L are quite different; clear completely removes all previous terminal information (so you cannot scroll up) while Ctrl-L just scrolls the screen so that the cursor is at the top of the page so that you can still scroll up and see previous information. I much prefer the Ctrl-L system. Is there a way to override clear so that it does a Ctrl-L instead of wiping all previous terminal information? This is not a huge issue, but I'm just wondering out of curiosity if there is a way to alias clear to point at my preferred Ctrl-L functionality.

As a side note, I just noticed that PowerShell also has a binding for Ctrl-L and it performs the same way as Ctrl-L on bash, seems the designers there took a lot from bash, but that cmd.exe consoles do not have this functionality).

Source Link
YorSubs
  • 661
  • 2
  • 7
  • 14
Loading