shell posts

I've been making changes to my .inputrc file to improve my command line experience in bash shell and other readline interfaces. I like enabling vi mode to use the key bindings of my preferred editor. I recently was made aware that the setting to do this unsets all previously set custom key bindings in the .inputrc, even for keys that aren't directly used by the mode. This led to some confusion for me when my custom keys weren't working.

Continue reading post "#4892"

Using pipes to augment IO of command with bash script

I like the interactive mode of the bc command line calculator because it is ubiquitous, but wanted to augment its functionality a bit to add a couple features I liked from another calculator program. I wanted to make modifications to the text I typed before sent to bc and modify the text it outputted. This can be done on standard POSIX shells with mkfifo, but it took me a good while to figure out how to do this with both input and output and get something working nicely without it freezing or leaving artifacts. So I'm sharing how to do this in a bash script.

Continue reading post "Using pipes to augment IO of command with bash script"

</toby>