News for hackers. Stuff that matters.
Re:Sl: a mirror version of ls by pantalaimon on Friday March 30, 2018 @10:21AM (#16716295)
Or you just

    alias sl=ls
and have productivity reach unseen levels!
Re:Sl: a mirror version of ls by simias on Friday March 30, 2018 @10:33AM (#16716387)
I've had "l" aliased to "ls -lhp" for so long that I can't work properly without it. I think many distros also alias "ll" to "ls -l" by default (I think CentOS/RHEL does it at least).
Re:Sl: a mirror version of ls by floatboth on Friday March 30, 2018 @11:57AM (#16717191)

    alias l="tree --dirsfirst -ChFL 1"
    alias l2="tree --dirsfirst -ChFL 2"
    alias l3="tree --dirsfirst -ChFL 3"
    alias l4="tree --dirsfirst -ChFL 4"
    alias l5="tree --dirsfirst -ChFL 5"
( or https://github.com/ogham/exa in tree mode )
Re:Sl: a mirror version of ls by erichurkman on Friday March 30, 2018 @11:29AM (#16716886)
I, too, have "l" aliased, but years of muscle memory I still type "ls -lahp" every single friggin' time. Hey, at least it's portable when I'm ssh'd to another system.
Re:Sl: a mirror version of ls by Symbiote on Friday March 30, 2018 @10:38AM (#16716426)
I have h=ls and hh=ls -l, which are much more comfortable with the Dvorak keyboard layout. (The equivalent would be j and jj on Qwerty.)
Re:Sl: a mirror version of ls by barrkel on Friday March 30, 2018 @11:54AM (#16717153)
I aliased d instead. I also have ll and la but I don't use them that often so didn't change them to be Dvorak optimized.
Re:Sl: a mirror version of ls by zarex on Friday March 30, 2018 @10:41AM (#16716454)
Good idea. Dvorak users unite!

Do you use regular dvorak or programmer dvorak?

Re:Sl: a mirror version of ls by Symbiote on Friday March 30, 2018 @02:42PM (#16718717)
British Dvorak, since it keeps ", £, # etc where I expect them, but is still a standard layout available on Linux and Mac.
Re:Sl: a mirror version of ls by RBerenguel on Friday March 30, 2018 @12:27PM (#16717489)
I have l aliased to -lhrt since it’s what I mostly need.
Re:Sl: a mirror version of ls by blakesterz on Friday March 30, 2018 @10:31AM (#16716373)
I have a few "idiot aliases" like that...

  alias grpe=grep
  alias gerp=grep
Re:Sl: a mirror version of ls by strkek on Friday March 30, 2018 @03:16PM (#16718978)
> grpe

Every. Single. Time. Sometimes I even typo it many times in a row.

There must be //something// in that combination of letters, because I don't recall ever having that many mistakes with any other commands.

Re:Sl: a mirror version of ls by lallysingh on Friday March 30, 2018 @05:16PM (#16719863)
I think that many of my typos occur when switching between letters on one hand vs the other. I figure it's a brain hemisphere synchronization thing.
Re:Sl: a mirror version of ls by Twirrim on Friday March 30, 2018 @11:56AM (#16717182)

    alias gti='/usr/local/bin/git'
    alias gut='/usr/local/bin/git'
Re:Sl: a mirror version of ls by mulmen on Friday March 30, 2018 @11:05AM (#16716658)
My personal favorite is:

   alias fuck='sudo $(fc -nl -1)'
Be very careful with this.
Re:Sl: a mirror version of ls by StavrosK on Friday March 30, 2018 @11:24AM (#16716838)
Here's one of my aliases for you:

    function fuckgit
        rm -rf /tmp/fuckgit/
        git clone --no-checkout (git config --get remote.origin.url) /tmp/fuckgit/
        rm -rf .git/
        mv /tmp/fuckgit/.git .
        rm -rf /tmp/fuckgit/
    end
Re:Sl: a mirror version of ls by epse on Friday March 30, 2018 @11:07AM (#16716684)
What about the actual program thefuck? It can fix more than just sudo, and asks you to confirm
Re:Sl: a mirror version of ls by web007 on Friday March 30, 2018 @11:34AM (#16716936)
Re:Sl: a mirror version of ls by mulmen on Friday March 30, 2018 @11:47AM (#16717078)
I don't want to be asked and I don't want to install anything.

I looked at thefuck but it didn't seem to do anything I needed.

Re:Sl: a mirror version of ls by ben509 on Friday March 30, 2018 @11:24AM (#16716836)
Or make history work for you:

  shopt -s histverify histreedit
Bash will let you then confirm the actual command it's going to run:

  sudo !!
Re:Sl: a mirror version of ls by mulmen on Friday March 30, 2018 @11:47AM (#16717075)
I use zsh and I don't know what shopt is. That's two commands and !! doesn't work in aliases.
Re:Sl: a mirror version of ls by rejschaap on Friday March 30, 2018 @04:06PM (#16719397)
In zsh it is called setopt. You don't need to make an alias, you would put this in your .bashrc
Re:Sl: a mirror version of ls by sethrin on Friday March 30, 2018 @03:31PM (#16719105)
So why not just type 'sudo !!' ?
Re:Sl: a mirror version of ls by mulmen on Friday March 30, 2018 @03:44PM (#16719213)
Because it isn't as much fun.
Re:Sl: a mirror version of ls by oldgun on Friday March 30, 2018 @11:54AM (#16717152)
I think you can try this. https://github.com/nvbn/thefuck
Re:Sl: a mirror version of ls by ohstopitu on Friday March 30, 2018 @10:41AM (#16716451)
I generally have this in my bash_aliases

    alias ls='ls -lah --color="auto"'
    alias l='ls -lah --color="auto"'
    alias ll='ls -lah --color="auto"'
    alias sl='ls -lah --color="auto"'
Re:Sl: a mirror version of ls by tjwds on Friday March 30, 2018 @10:40AM (#16716446)
For some reason the typo I tend to make the most is ';s', so I've gone ahead and set `alias s=ls`
Re:Sl: a mirror version of ls by supercheetah on Friday March 30, 2018 @11:30AM (#16716893)
I mean, yeah, you could, but that's not as much fun.
Re:Sl: a mirror version of ls by madmax108 on Friday March 30, 2018 @12:14PM (#16717358)
I've set alias ls=sl in dozens of systems belonging to colleagues over the years, just for the lulz! :D :D
Re:Sl: a mirror version of ls by ribs on Friday March 30, 2018 @10:53AM (#16716559)
This program reverses the output.
Re:Sl: a mirror version of ls by silveira on Friday March 30, 2018 @01:33PM (#16718085)
alias lsd="ls -d */"