I’ve been stuck on my laptop for the last few months, and I’ve been doing my best to tolerate its old, slow, spinning hard drive. I’ve also been tweaking all sorts of settings in an attempt to make things more tolerable. I installed the preload
daemon, and that seemed to help things a bit.
That wasn’t enough, though, so I started tweaking various sysctl
settings. I’m pretty old school, and I have old habits. I never use the sysctl
command. I always use cat
to peek into the files in /proc/sys/
and echo
to change their values. On one hand, this gives me tab completion of all those file names that I never remember. On the other hand, it takes quite a few keystrokes to turn those cat
commands into echo
commands.
This is exactly what zsh-dwim is made for. Wouldn’t you think I’d realize this right away? I didn’t. I didn’t think of this until a few days after I was done messing around with sysctl
settings!
I’m very excited about this new zsh-dwim transformation. It saves a lot of keystrokes, and I wish I’d thought of it sooner! Unlike using sysctl
, this transformation works with variables under both /proc/sys/
and /sys/
.
This will be very handy the next time I have to tweak a bunch of kernel settings, and it has given me some ideas for the future of zsh-dwim. I keep thinking of zsh-dwim in terms of actually swapping out parts of the current command. I believe that I should also start thinking in terms of simple cursor placement as well.
You can find zsh-dwim at GitHub.