Between bash and text editor


When you have a long command you need to type correctly, and you only have left, right and backspace to navigate, it can soon feel tiresome. I wouldn't want you to tell all your friends you gave command line a go but it was like some caveman alternative to Microsoft Office products. When typing a command you can move it to a text editor with "hold-ctrl-press-x-then-e", and that's what the post is about.

Continue reading Between bash and text editor...

Extra functionality through pipes


Sometimes the programs you are running aren't as fully featured as you need them to be. If it's your program, extend it to do work like you want it, the ad-hoc extensions will make it soon feel like a warm worn-in shoe. If it's not your program, and the missing feature is correctness, just fix your copy, and submit the fix to the author. Otherwise add the extra functionality outside, with an appropriate contraption. Here's a couple from me, based around pipes.

Continue reading Extra functionality through pipes...

A bell'n'whistle toggle through environment variables


The usual way to control a script's behaviour is to provide a config file or command line arguments at startup. Actually, it's also common to modify the script's code, typically after executing it and noticing it's not doing the right thing. Neither of these are very convenient when you are including the script somewhere else. This post is about the third way, its curious advantages, and how it's usually epically bad but sometimes it isn't.

Continue reading A bell'n'whistle toggle through environment variables...