Earlier quoted context omitted.
Atuin is new to me! https://github.com/atuinsh/atuin Discussed 4 months ago: Atuin – Magical Shell History https://news.ycombinator.com/item?id=44364186 - June 2025, 71 comments
I like atuin but why is it so slow when first opening (hitting up) in the shell?
Scripts I wrote that I use all the time
221–230 of 408 posts
Re: Scripts I wrote that I use all the time
#222 # High level examples
run_some_command | clip
clip > file_from_my_clipboard.txt
# Copy a file's contents
clip Re: Scripts I wrote that I use all the time
#223My fav script to unpack anything, found a few years ago somewhere # ex - archive extractor # usage: ex function ex() { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.tar.xz) tar xf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1;; *.7z) 7z x $1 ;; *) echo "'$1' can…
`tar xf` autodetects compressed files now. You can replace any of your instances of tar with that.
Re: Scripts I wrote that I use all the time
#224Mkdir then cd into it, I just use ‘take’? Maybe this isn’t available by default everywhere?
Re: Scripts I wrote that I use all the time
#225Earlier quoted context omitted.
I find that endearing for two reasons: - either critique is solid and I learn something - or commenter is clueless which makes it entertaining there is very seldom a “middle”
Yea I don't particularly mind it, just an interesting thing about HN compared to many other forums.
Re: Scripts I wrote that I use all the time
#226Earlier quoted context omitted.
For me it's when I call customer service or support on the phone, and either give them an account #, or confirm a temporary password that I have been verbally given.
Are you referring to the nato alphabet utility? Or the alphabet script that prints abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
Re: Scripts I wrote that I use all the time
#227no offense but a lot of those script are pretty hacky they may work for the user but i would not use them without making sure to review them and adapt them to my workflow
Re: Scripts I wrote that I use all the time
#228I have a bunch of little scripts and aliases I've written over the years, but none are used more than these... alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias .......='cd ../../../../../..'
Does zsh support this out-of-the-box? Because I definitely never had to setup any of these kinds of aliases but have been using this shorthand dot notation for years.
Re: Scripts I wrote that I use all the time
#229This sounds pretty useful!
Coincidentally, I have recently learned that Daniel Stenberg et al (of cURL fame) wrote trurl[1], a libcurl-based CLI tool for URL parsing. Its `--json` option seems to yield similar results as TFA's url, if slightly less concise because of the JSON encoding. The advantage is that recent releases of common Linux distros seem to include trurl in their repos[2].
Re: Scripts I wrote that I use all the time
#230It's weird how the circle of life progresses for a developer or whatever. - When I was a fresh engineer I used a pretty vanilla shell environment - When I got a year or two of experience, I wrote tons of scripts and bash aliases and had a 1k+ line .bashrc the same as OP - Now, as a more tenured engineer (15 years of experience), I basically just want a vanilla shell with zero distractions, aliases or scripts and use…
When I had one nix computer, I wanted to customize it heavily. Now I have many nix computers and I want them consistent and with only the most necessary packages installed.