You are not logged in.
I just got a crazy idea. How can I alias an empty command (just hitting enter) to clear the screen in bash ?
Is it too crazy ?:lol:
Last edited by moljac024 (2008-09-09 14:56:57)
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
Take a look at the sources for the readline library, there's probably a routine in there that handles empty commands. I don't think its a great idea though because if you pacman -Syu (for example) and accidentally press enter twice you will lose all the log out put after it runs.
BTW: the command to clear the screen is 'clear'
Dusty
Offline
You can use CTRL-L to clear the screen. I think, imho, this is the fastest method...
Offline
Take a look at the sources for the readline library, there's probably a routine in there that handles empty commands. I don't think its a great idea though because if you pacman -Syu (for example) and accidentally press enter twice you will lose all the log out put after it runs.
BTW: the command to clear the screen is 'clear'
Dusty
You do have a point there.
BTW: Of course I know the command to clear the screen goddamn it!
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
You can use CTRL-L to clear the screen. I think, imho, this is the fastest method...
Thank you I didn't know that!
Offline
CTRL+U actually cuts. CTRL+Y pastes. Yay for having 3 clipboards in Linux: the one in X (select to copy, middle click to paste), the one shared with GNOME/KDE (standard shortcuts to copy/paste), and the one in the terminal emulator, which I just mentioned.
And I like to keep a space character in all of them, so they don't madly go pasting into IRC. At least the terminal one is per-terminal, not shared with the other clipboards, and deleted when you close the terminal it belongs to.
-dav7
Last edited by dav7 (2008-09-10 00:20:55)
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline