-
-
Save tommystanton/3739044 to your computer and use it in GitHub Desktop.
GNU ed + GNU readline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Try to add GNU readline support to GNU ed | |
hash rlwrap 2>&- | |
if (( $? == 0 )); then | |
exec /usr/bin/rlwrap /bin/ed "$@" | |
else | |
exec /bin/ed "$@" | |
fi |
The &-
itself is not the /dev/null
; it means to close the stream with such number (if I remember correctly). If you're worring about that why not just 2>/dev/null
?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is &- equivalent to /dev/null ?