diff --git a/docs/ChangeLog.md b/docs/ChangeLog.md index 9aafbdc4..15010748 100644 --- a/docs/ChangeLog.md +++ b/docs/ChangeLog.md @@ -133,6 +133,7 @@ - complete (`source:command`): exclude inactive aliases `#D1715` d6242a7 - complete (`source:command`): not quote aliases and keywords `#D1715` d6242a7 - highlight (`wtype=CTX_CMDI`): check alias names before shell expansions `#D1715` d6242a7 + - util (`ble/is-alias`): fix a bug of unredirected error messages for bash-3.2 (fixup d6242a7) `#D1730` 0000000 ## Fixes @@ -245,7 +246,7 @@ - prompt: fix not properly set `$?` in `${PS1@P}` evaluation (reported by nihilismus) `#D1644` 521aff9 - decode: cache `inputrc` translations `#D1652` 994e2a5 - complete: use `awk` for batch `quote-insert` (motivated by banoris) `#D1714` a0b2ad2 92d9734 - - complete (quote-insert.batch): fix regex escaping in bracket expr of awk (reported by telometto) `#D1729` 0000000 + - complete (quote-insert.batch): fix regex escaping in bracket expr of awk (reported by telometto) `#D1729` 8039b77 ## Compatibility diff --git a/note.txt b/note.txt index 1d72c131..363a814e 100644 --- a/note.txt +++ b/note.txt @@ -5797,6 +5797,9 @@ bash_tips 2022-01-09 + * bash-3.2 で alias 云々のエラーメッセージが出る様になっている [#D1730] + これは単純に alias チェックの際に 2>/dev/null を忘れているのが原因。 + * complete: gawk regex warning (reported by telometto) [#D1729] https://github.com/akinomyoga/ble.sh/issues/167 diff --git a/src/util.sh b/src/util.sh index 5104052b..1eb4932b 100644 --- a/src/util.sh +++ b/src/util.sh @@ -2962,11 +2962,11 @@ if ((_ble_bash>=40000)); then } else function ble/is-alias { - [[ $1 != *=* ]] && alias "$1" >/dev/null + [[ $1 != *=* ]] && alias "$1" &>/dev/null } function ble/alias#active { shopt -q expand_aliases && - [[ $1 != *=* ]] && alias "$1" >/dev/null + [[ $1 != *=* ]] && alias "$1" &>/dev/null } function ble/alias#expand { ret=$1