Re:Show HN: Unix tool that visualizes shell commands usage
by GrantZvolsky on Friday February 26, 2021 @05:30PM
(#26280621)
If one of your top commands is `clear`, you may like my alias `c`:
[1]: https://github.com/grantzvolsky/skel/blob/ea43b1969463a97f96...
[ Parent
| on HN ]
Re:Show HN: Unix tool that visualizes shell commands usage
by bxparks on Friday February 26, 2021 @06:01PM
(#26280866)
If you use bash (or zsh, and maybe others), hit ^L (control-L) to clear the screen. From the bash(1) manual:
clear-screen (C-l) Clear the screen leaving the current line at the top of the screen. With an argument, refresh the current line without clearing the screen.
Re:Show HN: Unix tool that visualizes shell commands usage
by austinjp on Friday February 26, 2021 @07:32PM
(#26281496)
I must hit ctrl-l a thousand times a day, learned it before I knew of clear.
Re:Show HN: Unix tool that visualizes shell commands usage
by Aperocky on Friday February 26, 2021 @05:37PM
(#26280686)
If one of your top commands is `cd ../..` you may like my alias/function `..`
$ .. 2 # go back 2 directories, i.e. 'cd ../..'
$ .. # 'cd ..'
https://github.com/Aperocky/unix-setup/blob/master/.bashrc#L...
Re:Show HN: Unix tool that visualizes shell commands usage
by WalterGR on Saturday February 27, 2021 @12:55AM
(#26283002)
Going to my home dir is another frequent operation for me so I also have
alias ~='pushd ~'
(Those are tildes but may look like dashes depending on your font and size...)Not as fancy as some other aliases I see here but does the (basic) trick.
Re:Show HN: Unix tool that visualizes shell commands usage
by stevekemp on Saturday February 27, 2021 @06:34AM
(#26284176)
A raw "cd" with no arguments will take you back to your home-directory. Of course "~" is one less character to type, but on the off-chance you didn't know.
Re:Show HN: Unix tool that visualizes shell commands usage
by JNRowe on Saturday February 27, 2021 @09:19AM
(#26284996)
As we're offering alternatives. Either `shopt autocd` in bash or `setopt auto_cd` in zsh, then ~ changes to home by simply being a path.
Re:Show HN: Unix tool that visualizes shell commands usage
by moehm on Friday February 26, 2021 @07:39PM
(#26281551)
I use '..' for '$ cd ..' and '...' for '$ cd ../..'.
Re:Show HN: Unix tool that visualizes shell commands usage
by Aperocky on Friday February 26, 2021 @10:59PM
(#26282452)
I like '$ .. 5' because after the number goes up the dots become very hard to count.
Re:Show HN: Unix tool that visualizes shell commands usage
by moehm on Saturday February 27, 2021 @01:24PM
(#26286888)
Great idea, thanks!
Re:Show HN: Unix tool that visualizes shell commands usage
by aemreunal on Saturday February 27, 2021 @12:35AM
(#26282925)
I clear the screen a lot, but I use Cmd+K to clear the whole Terminal.app screen or Cmd+L to clear the last command (and its output) on Mac, rather than using the `clear` command. I use Bash, not sure if it works on other terminal emulators.