Patch 0.2.7
ble-0.2.7 (2023-04-03)
Usage
Prerequisites
Bash 3.0+ and basic POSIX utilities are required.
Download ble-0.2.7.tar.xz
https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
# DOWNLOAD with wget
wget https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
# DOWNLOAD with curl
curl -LO https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
Trial & Install
# TRIAL
tar xJf ble-0.2.7.tar.xz
source ble-0.2.7/ble.sh
# INSTALL
tar xJf ble-0.2.7.tar.xz -C ~/.local/share/blesh
# Add the following line near the top of ~/.bashrc
[[ $- == *i* ]] && source ~/.local/share/blesh/ble.sh --noattach
# Add the following line at the end of ~/.bashrc
((_ble_bash)) && ble-attach
blesh-0.2 fixes
- global: fix
ble/{is- => util/is}function
5e82ca7 - global: pick fixes and changes from ble-0.1 backports 013eb1c
- complete: fix up 4df15e1 f02bd2a
- bump 0.2.7 1118c80
Fixes
- edit: work around the wrong job information of Bash in trap handlers (reported by 3ximus)
#D1435
#D1436
795a647 (master: bc4735e) - edit (sword): fix definition of
sword
(shell words)#D1441
5e73cf6 (master: f923388) - edit (
kill-forward-logical-line
): fix a bug not deleting newline at the end of the line#D1443
03787a2 (master: 09cf7f1) - global: work around bash-4.2 bug of
declare -gA
(reported by 0xC0ncord)#D1470
a2ace44 (master: 8856a04) - global: fix declaration of associative arrays for
ble-reload
(reported by 0xC0ncord)#D1471
533eba7 (master: 3cae6e4) - util (
ble/util/msleep
): fix hang in Cygwin by swithing from/dev/udp/0.0.0.0/80
to/dev/zero
#D1452
46992e7 (master: d4d718a) - syntax: fix broken AST with
[[
keyword#D1454
0482bf6 (master: 69658ef) - util (
ble/util/msleep
): work around the bash-4.3 bug ofread -t
(reported by 3ximus)#D1468
#D1469
fad78ea (master: 4ca9b2e) - bind: work around broken
cmd_xmap
after switching the editing mode#D1478
97ca117 (master: 8d354c1) - edit: clear graphic rendition on newlines and external commands
#D1479
759b96d (master: 18bb2d5) - canvas: fix a glitch that SGR at the end of command line is applied to new lines
#D1498
a6ac121 (master: 4bdfdbf) - syntax: fix a bug that
eval() { :; }
,declare() { :; }
are not treated as function definition#D1529
a4cda9c (master: b429095) - decode: fix a hang on attach failure by cache corruption
#D1531
a4c13ab (master: 24ea379) - benchmark (
ble-measure
): fix a bug that the result is always 0 in Bash 3 and 4 (fixup 8eb493a (master: bbc2a90))#D1615
a034c91 - main: work around
. ble.sh --{test,update,clear-cache}
in intereactive sessions#D1555
8eb493a (master: bbc2a90) - main: fix reloading after ble-update (fixup 8eb493a (master: bbc2a90)) (fixed by oc1024)
#D1558
9372670 - main: fix exit status for
bash ble.sh --test
(fixup 8eb493a (master: bbc2a90))#D1558
641238a - main: work around sourcing
ble.sh
inside subshells#D1554
8eb493a (master: bbc2a90) - global: use a better workaround of bash-4.2
declare -gA
by separating assignment#D1567
0b7de99 (master: 2408a20) - edit (brackated-paste): fix incomplete
CR => LF
conversion (reported by alborotogarcia)#D1587
ac738bb (master: 8d6da16) - highlight (
layer:region
): fix blocked lower-layer changes without selection changes#D1596
650140f (master: 5ede3c6) - util: work around the Bash 3 bug of array assignments with
^A
and^?
in Bash 3.2#D1614
0ed7f6d (master: b9f7611) - benchmark (
ble-measure
): fix a bug that the result is always 0 in Bash 3 and 4 (fixup bbc2a90)#D1615
28e8dfe (master: a034c91) - decode, canvas, etc.: explicitly treat CSI arguments as decimal numbers (reported by GorrillaRibs)
#D1625
c9e4198 (master: c6473b7) 2ea48d7 - edit: fix a bug that
command-help
doesn't work#D1635
b992bb5 (master: 0f6a083) - canvas: update prompt trace on
char_width_mode
change (reported by Barbarossa93)#D1642
56b77a8 (master: 68ee111) - util (
ble/util/readfile
): fix a bug of always exiting with 1 inbash <= 3.2
(reported by laoshaw)#D1678
5b843bb (master: 61705bf) - complete: do not generate keywords for quoted command names
#D1691
7211b1e (master: 60d244f) - complete: fix empty completions with
FIGNORE
(reported by seanfarley)#D1711
90f388a (master: 144ea5d) - main: fix the message of owner errors of cache directories (reported by zim0369)
#D1712
d2bf86c (master: b547a41) - syntax: fix uninitialized syntax-highlighting in bash-3.2
#D1731
6aa12c8 (master: e3f5bf7) - progcomp: retry completions on
$? == 124
also for non-default completions (reported by SuperSandro2000)#D1759
c641fb1 (master: 82b9c01) - util (
ble/util/import
): work around filenames with bash special characters#D1763
7da5f04 (master: b27f758) - edit: fix the restore failure of
PS1
andPROMPT_COMMAND
onble-detach
#D1784
47dfdd9 (master: b9fdaab) - history: work around possible dirty prefix
*
in the history output#D1808
cc14f59 (master: 64a740d) - decode: fix the workaround for
set -e
with--prompt=attach
#D1832
958aae6 (master: 5111323) - main. util: fix problems of readlink etc. found by test in macOS (reported by aiotter)
#D1849
8f0acf3 (master: fa955c1)#D1855
a22e145 - global: quote
return $?
#D1884
9e10b54 (master: 801d14a) - bind: fix M-C-@, C-x C-@, and M-C-x (
bash-4.2 -o emacs
)#D1920
342826f (master: a410b03) - keymap/vi (
operator:filter
): do not append newline at the end of line#D1994
2a8e746 (master: bce2033) - keymap/vi (
expand-range-for-linewise-operator
): fix the end point being not extended#D1994
2a8e746 (master: bce2033) - syntax: fix unrecognized asignment
echo arr[i]+=rhs
[sabbrev: apply sabbrev to right-hand sides of variable assignments]#D2006
4ed4fd4 (master: 41faa49) - syntax: fix unrecognized variable assignment of the form
echo arr[i]+=rhs
#D2007
4ed4fd4 (master: 41faa49)
Changes
- syntax: exclude
\ + LF
at the word beginning from words (motivated by cmplstofB)#D1431
6044a48 (master: 67e62d6) - edit: change default behavior of C-w and M-w to operate on backward words
#D1448
787ff57 (master: 47a3301) - edit: the widgets
{kill,copy,delete}-region-or
now receives widgets as arguments#D1021
8f48aff (master: bbbd155) - edit (
ble/builtin/read
): cancel by C-d on an empty line#D1473
551bde3 (master: ecb8888) - syntax: change syntax context after
time ;
and! ;
for Bash 4.4#D1477
0b66cf4 (master: 4628370) - prompt: invalidate prompt and textarea on prompt setting changes
#D1492
54d310d (master: 1f55913) - prompt: adjust behavior of
LINENO
and prompt sequence\#
(reported by tycho-kirchner)#D1542
4b63b16 (master: 8b0257e) - main: show notifications against debug versions of Bash
#D1612
608ac2a (master: 8f974aa) - prompt: do not evaluate
PROMPT_COMMAND
for subprompts#D1654
5c0cfde (master: 08e903e) - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D1676
2587bb0 (master: 0525528) 88e2df5 - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D1676
0525528 5f63856 (master: 88e2df5) - util (
ble/util/buffer
): hide cursor in rendering#D1758
4ecbbdc (master: e332dc5) - edit (
ble-detach
): prepend a space tostty sane
forHISTIGNORE=' *'
#D1796
bd90371 (master: 26b532e) - history: disable the history file when
HISTFILE
is empty#D1836
d97ca10 (master: 9549e83) - keymap/vi (
decompose-meta
): translate S-a to A#D1988
eaf66c7 (master: 600e845) - term (
_ble_term_TERM
): detect konsole#D1988
eaf66c7 (master: 600e845) ed53858 - complete (
source:argument
): fallback to rhs completion also forname+=rhs
#D2006
4ed4fd4 (master: 41faa49)
Compatibility
- highlight: fix a problem that the attribute of the last character is applied till EOL
#D1393
36f9d80 (master: 2ddb1ba)#D1395
ef09932 - highlight: fix a problem that the attribute of the last character is applied till EOL
#D1393
2ddb1ba#D1395
6bcb405 (master: ef09932) - global: work around empty
vi_imap
cache bytmux-resurrect
#D1562
d7130d5 (master: 560160b) - main: work around
set -B
andset -k
#D1628
3c97ae8 (master: a860769) - cmap: add
st
-specific escape sequences for cursor keys#D1633
bf46e34 (master: acfb879) - cmap: distinguish find/select from home/end for openSUSE
inputrc.keys
(reported by cornfeedhobo)#D1648
ad67555 (master: c4d28f4) - cmap: freeze the internal codes of find/select and kitty special keys
#D1674
f41b800 (master: fdfe62a) - decode: work around the overwritten builtin
set
(reported by eadmaster)#D1680
93ae08d (master: a6b4e2c) - complete: work around the variable leaks by
virsh
completion fromlibvirt
(reported by telometto)#D1682
ee2ac07 (master: f985b9a) - stty: do not remove keydefs for C-u, C-v, C-w, and C-? (reported by laoshaw)
#D1683
c01487b (master: 82f74f0) - main: work around
XDG_RUNTIME_DIR
of a different user bysu
(reported by zim0369)#D1712
e5501a3 (master: 8d37048) - main (
ble/util/readlink
): work around non-standard or missingreadlink
(motivated by peterzky)#D1720
d785f5d (master: a41279e) - global: work around the arithmetic syntax error of
10#
in Bash-5.1#D1734
2b55aa1 (master: 7545ea3) - global: adjust implementations for Bash 5.2
patsub_replacement
#D1738
359a389 (master: 4590997) - main: check
/dev/tty
on startup (reported by andychu)#D1749
19fa092 (master: 711c69f) - global: work around
shopt -s compat42
#D1754
e7adfb3 (master: a75bb25) - global: identify bash-4.2 bug that internal quoting of
${v/%$empty/"$rep"}
remains#D1753
e7adfb3 (master: a75bb25) - prompt: fix a bug of
ble/prompt/print
redundantly quoting$
#D1752
e7adfb3 (master: a75bb25) - global: work around
compat42
quoting of"${v/pat/"$rep"}"
#D1751
e7adfb3 (master: a75bb25) - util: add identification of Windows Terminal
wt
#D1758
4ecbbdc (master: e332dc5) - global: work around bash-3.0 bug that single quotes remains for
"${v-$''}"
#D1774
fb607ad (master: 9b96578) - main: resolve empty
HOSTNAME
[addhistdb
]#D1925
5812f2e (master: 44d9e10) - main: warn empty
LANG
[main: support an option--inputrc={diff,all,user,none}
]#D1926
3f29bee (master: 92f2006) - main: never load
/etc/inputrc
in openSUSE (motivated by Ultra980)#D1926
3f29bee (master: 92f2006) 0ceb0cb - main: show warning for empty locale (movivated by Ultra980)
#D1927
3f29bee (master: 92f2006) - term (
terminology
): work around terminal glitches#D1946
2d4caa6 (master: 9a1b4f9) - edit: always adjust the terminal states with
bind -x
(reported by linwaytin)#D1983
cdda7c4 (master: 5d14cf1) - syntax: suppress brace expansions in designated array initialization in Bash 5.3
#D1989
78dd47e (master: 1e7b884) - edit: restore
PS1
while processingbind -x
(reported by adoyle-h)#D2024
c46f423 (master: 2eadcd5)
Optimization
- util (
ble/util/assign
): work around subshell conflicts#D1578
59d6355 (master: 6e4bb12) - prompt: fix not properly set
$?
in${PS1@P}
evaluation (reported by nihilismus)#D1644
66fd10b (master: 521aff9) - util (
ble/string#split
): optimize#D1826
5b3fc89 (master: 7bb10a7) - debug: add
ble/debug/profiler
(motivated by SuperSandro2000)#D1824
f629698 11aa4ab 5b3fc89 (master: 7bb10a7) - global: avoid passing arbitrary strings through
awk -v var=value
#D1827
4571695 (master: 82232de)
Internal changes and fixes
- main: include hostname in local runtime directory
#D1444
d19ab29 (master: 6494836) - global: fix status check for read timeout
#D1467
0bcc12c (master: e886883) - util, etc: ensure each function to work with arbitrary
IFS
#D1490
#D1491
2fe60b6 (master: 5f9adfe) - util: fix
ble/util/dense-array#fill-range
b708ee2 (master: a46fdaf) - util: fix leak variables
buff
,trap
,{x,y}{1,2}
#D1572
36d151e (master: 5967d6c) - make: add fallback Makefile for BSD make
#D1805
6498a5d (master: e5d8d00) - util, decode, vi: fix leak variables
#D1933
002dda7 (master: 8d5cab8) - syntax: fix code formatting [histdb: support auto-complete source
histdb-word
]#D1938
edd48d1 (master: 00cae74) - main: use builtin for
:
[histdb: support timeout of background processes]#D1971
8640dc4 (master: e0566bd) - global: normalize bracket expressions to
_a-zA-Z
/_a-zA-Z0-9
#D2006
4ed4fd4 (master: 41faa49) - util (restore-vars): work around
set -u
[util.bgproc: separateble/util/bgproc
fromhistdb
]#D2017
d60758a (master: 7803305)
Test
- util (ble/util/s2bytes): clear locale cache
#D1881
99e217d (master: 2e1a7c1) - util (ble/util/s2c): work around intermediate mbstate of bash <= 5.2
#D1881
99e217d (master: 2e1a7c1) - util (ble/encoding:UTF-8/b2c): fix interpretation of leading byte
#D1881
99e217d (master: 2e1a7c1)