Skip to content

Commit

Permalink
util (ble/is-alias): fix a bug of unredirected error messages for bas…
Browse files Browse the repository at this point in the history
…h-3.2 (fixup d6242a7)
  • Loading branch information
akinomyoga committed Jan 9, 2022
1 parent 8039b77 commit 31372cb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/ChangeLog.md
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions note.txt
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/util.sh
Expand Up @@ -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
Expand Down

0 comments on commit 31372cb

Please sign in to comment.