Search

Twts matching tag=xfrwj3q

(#xfrwj3q) @aelaraji@aelaraji.com Oh, that’s great! I haven’t heard about any of them before either. There’s also a caveat though, that I ran right into the very first time I tried this in zsh:

$ ls > /dev/null
$ echo $_
--color=tty

Yeah, exactly what you think:

$ which ls
ls: aliased to ls --color=tty

Alt+. is going to be my favorite one! In the above, it would also give me /dev/null, which might be probably more what I would expect.


#g6omxpq

(#xfrwj3q) @aelaraji@aelaraji.com I use Alt+. all the time, it’s great. 👌

FWIW, another thing I often use is !! to recall the entire previous command line:

$ find -iname '*foo*'
./This is a foo file.txt

$ cat "$(!!)"
cat "$(find -iname '*foo*')"
This is just a test.

Yep!

Or:

$ ls -al subdir
ls: cannot open directory 'subdir': Permission denied

$ sudo !!
sudo ls -al subdir
total 0
drwx------ 2 root root  60 Jun 20 19:39 .
drwx------ 7 jess jess 360 Jun 20 19:39 ..
-rw-r--r-- 1 root root   0 Jun 20 19:39 nothing-to-see

#c6wcloa