dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 54f630b84baa781dc5a4f149dd8e3ea36a7ee9dd (patch)
parent 3f6811f78c0d82440c6b3afb5ec25345549b74f1
Author: Alex Karle <alex@alexkarle.com>
Date:   Sun,  1 Jan 2023 14:16:00 -0500

bin/e: Add rlwrap config for ed(1)

new year, new ed

Diffstat:
A.ed_inputrc | 5+++++
MMakefile | 2+-
Mbin/e | 11+++++++----
3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/.ed_inputrc b/.ed_inputrc @@ -0,0 +1,5 @@ +# inputrc -- readline config for rlwrap(1) for ed(1) usage +$include ~/.inputrc + +Control-n: menu-complete +TAB: self-insert diff --git a/Makefile b/Makefile @@ -1,6 +1,6 @@ # Makefile -- to compile and install dotfiles ALL = .cwmrc .exrc .gitconfig .mbsyncrc .shrc .tmux.conf .xsession \ - .mailcap .muttrc .config/nvim .mblaze .csirc + .mailcap .muttrc .config/nvim .mblaze .csirc .ed_inputrc .inputrc # CURDIR is gmake, .CURDIR is bmake. One will exist! DOTS = $(CURDIR)$(.CURDIR) diff --git a/bin/e b/bin/e @@ -1,6 +1,9 @@ #!/bin/sh -# NOTE: disabling rlwrap for now due to TAB being captured :( -# exec rlwrap ed -p'> ' "$@" - -exec ed -p'> ' "$@" +if command -v rlwrap >/dev/null; then + exec env INPUTRC=$HOME/.ed_inputrc rlwrap \ + --no-warnings \ + --complete-filenames ed -p'> ' "$@" +else + exec ed -p'> ' "$@" +fi