Hacker News new | ask | show | jobs
by yjftsjthsd-h 703 days ago
Although I do have plenty of real aliases, functions, and even whole shell scripts, keeping something as a spelled out command in history actually can be better in at least two ways: It's more flexible, and it's self-documenting.

Worked example: Sometimes I like to fall asleep listening to an audiobook or podcast. So I open termux on my phone, and run something like:

    sleep 10 && date && mpv --volume=90 --speed=1.2 $AUDIO_FILE ; date
which gives me a moment to settle in before it starts playing, leaves the start/end time on the screen so I have a rough idea when I fell asleep, and presets the audio how I like it. Now of course I could extract that into a shell function like `mpv-tweaked` or whatever, but that would either hardcode all the numbers there, or require me to implement arguments, and even if I did they wouldn't be as visible. By just pulling it up with ctrl-r and editing as needed, I have all the options visible right there and every one of them is obviously labeled.