3 ms·
1) Install rlwrap, which wraps readline around any stdin stream. 2) Save this as something (I call it `rled`)somewhere in your path: #!/usr/bin/env bash
by noobermin 10y ago
1) Install rlwrap, which wraps readline around any stdin stream.
2) Save this as something (I call it `rled`)somewhere in your path:
#!/usr/bin/env bash
[ ! -n "$(which rlwrap)" ] && echo "rled: no rlwrap found" >&2 && exit -1
rlwrap ed $@
Now you can use ed with readline which allows line navigation, insertion and history.