awesome-client: allow override of rlwrap (#1150)
This is necessary when being run with a tty that has no width, which happens when using https://github.com/metakirby5/codi.vim/ in Vim 8 (but not Neovim), where rlwrap complains as follows: > rlwrap: error: My terminal reports width=0 (is it emacs?) I can't > handle this, sorry!
This commit is contained in:
parent
05d962f778
commit
2fb8492076
|
@ -12,12 +12,15 @@ if [ "$ISATTY" = 0 ]
|
|||
then
|
||||
# rlwrap provides readline functionality for "read", which is more enhanced
|
||||
# than bash's "read" itself.
|
||||
RLWRAP=$(which rlwrap 2>/dev/null)
|
||||
if [ "$RLWRAP" != "" ]
|
||||
# It can be disabled/overridden using 'AWESOME_RLWRAP= awesome-client'.
|
||||
if [ -z "${AWESOME_RLWRAP+x}" ]; then
|
||||
AWESOME_RLWRAP="$(which rlwrap 2>/dev/null)"
|
||||
fi
|
||||
if [ -n "$AWESOME_RLWRAP" ]
|
||||
then
|
||||
if [ "$A_RERUN" = "" ]
|
||||
then
|
||||
A_RERUN="no" exec $RLWRAP $0 "$@"
|
||||
A_RERUN="no" exec $AWESOME_RLWRAP $0 "$@"
|
||||
fi
|
||||
READ_CMD="read"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue