2020-01-12...2020-12-02 (#D1215...#D1426) c74abc5...276baf2
Usage
Prerequisites
Bash 3.0+ and basic POSIX utilities are required.
Download ble-0.4.0-devel2.tar.xz
https://github.com/akinomyoga/ble.sh/releases/download/v0.4.0-devel2/ble-0.4.0-devel2.tar.xz
# DOWNLOAD with wget
wget https://github.com/akinomyoga/ble.sh/releases/download/v0.4.0-devel2/ble-0.4.0-devel2.tar.xz
# DOWNLOAD with curl
curl -LO https://github.com/akinomyoga/ble.sh/releases/download/v0.4.0-devel2/ble-0.4.0-devel2.tar.xzTrial & Install
# TRIAL
tar xJf ble-0.4.0-devel2.tar.xz
source ble-0.4.0-devel2/ble.sh
# INSTALL (quick)
tar xJf ble-0.4.0-devel2.tar.xz -C ~/.local/share/blesh
echo 'source ~/.local/share/blesh' >> ~/.bashrc
# INSTALL (more robust)
tar xJf ble-0.4.0-devel2.tar.xz -C ~/.local/share/blesh
# Add the following line near the top of ~/.bashrc
[[ $- == *i* ]] && source ~/.local/share/blesh/ble.sh --attach=none
# Add the following line at the end of ~/.bashrc
[[ ${BLE_VERSION-} ]] && ble-attachNew features
- complete: support
bleopt complete_auto_wordbreaks(suggestion by dylankb)#D1219c294e31 - main: check
~/.config/blesh/init.sh#D1224a82f961 - progcolor: support programmable highlighting
#D12180770234#D12449cb3583#D12458e8a296#D1247154f638#D1269fa0036c - decode/kbd: support U+XXXX, @esc and @nul for keynames
#D1251441117c ef23ad1 - syntax: support
coproc#D12527ff68d2 - vi/nmap: support readline widgets for M-left, M-right, C-delete, # and &
#D1258846e0be - complete: add
compopt -o quote/defaultforfzf(motivated by dylankb)#D127558e1be4 - util (
ble-import): support an option-d(--delay)#D12859673e4e - syntax: support parameter expansion of the form
${var/#pat},${var/%pat}#D1286e2f4809 - edit: support
bleopt editor line_limit_{type,length} history_limit_length#D12952f9a000 - edit: support widgets
{vi,emacs}-editing-mode#D13010c6c76e - syntax: allow unquoted
[!and[^insimple-word(reported by cmplstofB)#D13031efe833 - util (
ble/util/print-global-definitions): support arrays and unset variables (test-util) 6e85f1c - util (
ble/util/cat): support NUL and multiple files (test-util) d19a9af - edit: support Bash 5.1
READLINE_MARKandPROMPT_COMMANDS#D1328e97a858#D1338657bea5- edit, main: support array PROMPT_COMMAND in bash-5.1
#D1380b852a4f
- edit, main: support array PROMPT_COMMAND in bash-5.1
- syntax: support confusing parameter expansions like
${#@}, etc.#D1330b7b42eb - contrib: add contrib for user settings
#D1335f290115 - syntax: support
${var@UuLK}in Bash 5.1#D133604da4dd - main: add an option
--test#D13401410c72 - util (
ble/builtin/trap): supportreturninINT/EXIT/WINCH#D1347#D13483865488 - history: support timestamp (reported by rux616)
#D13514bcbd71#D1356350bb15#D13641d8adf9 - edit: support Bash 4.4
PS0#D135723a1ac5 - vi: support
bleopt keymap_vi_mode_{update_prompt,show,name_*}(suggested by Dave-Elec)#D136576be6f1 - prompt: support prompt sequence
\q{...}#D136576be6f1 - edit: support
bind 'set show-mode-in-prompt'#D136576be6f1 - prompt: support
bleopt prompt_{{ps1,rps1}{_final,_transient}}(suggested by Dave-Elec)#D136606381c9 - edit: support Bash 5.1 widgets
#D1368e747ee3 - color: support
TERM=*-direct#D13690d38897#D1370f7dc477 - complete: support
bleopt complete_auto_menu#D137377bfabd- complete: fix a problem of frequent bells with auto-menu activated
#D13813b1d8ac
- complete: fix a problem of frequent bells with auto-menu activated
- complete: support
bleopt complete_menu_maxlines#D13758e81cd7 - prompt: support
_ble_prompt_update#D13760fa8739 - prompt: support
bleopt prompt_{xterm_title,screen_title,status_line}#D13785c3f6fe- prompt: check
TERMfor prompt window titles when_ble_term_TERMis unavailable#D13883c88869
- prompt: check
- syntax: support options
bleopt highlight_{syntax,filename,vartype}to turn off highlighting (requested by pjmp)#D13790116f8b - complete: support
shopt progcomp_alias#D1397d68afa5 - complete: generate completions of options based on man pages
#D14058183455- complete (mandb): fix a bug that
bleopt complete_menu_styleis globally changed#D1412b91fd10
- complete (mandb): fix a bug that
- highlight: support colon separated lists of paths
#D14092f40422- highlight: fix a bug that non-simple words are always highlighted as
syntax_error(reported by cmplstofB)#D141146e2ac6 - highlight: fix a bug that words are sometimes unhighlighted
#D14184395484 - highlight: fix a bug that non-existent directories are not highlighted in the command name context
#D14194395484
- highlight: fix a bug that non-simple words are always highlighted as
- highlight: support options
#D14102f40422
Changes
- highlight: highlight symlink directories as symlinks
#D124925e8a72 - auto-complete: bind
insert-on-endtoC-e#D125090b45eb - edit (
widget/shell-expand-line): not quote expanded results by default#D1255a9b7810 - decode: refactor
- decode: delay bind until keymap initialization
#D12580beac33 - decode: read user settings from
bind -Xsp#D1259eef14d0 - decode: fix a bug of
ble-bindwith uninitialized cmap#D12605d98210 - decode: fix error messages of BSD
sedrejecting unencoded bytes frombind -p(reported by dylankb)#D12770cc9160
- decode: delay bind until keymap initialization
- edit: provide proper
$BASH_COMMANDand$_for PS1, PROMPT_COMMAND, PRECMD, etc.#D12767db48dc - edit (quoted-insert): insert literal key sequence
#D1291420c933 - decode: support
decode_abort_charformodifyOtherKeys#D1293ad98416 - edit (edit-and-execute): disable highlighting of old command line content
#D12952f9a000 - util (
bleopt): fail when a specified bleopt variable does not exist (test-util) 5966f22 - builtin: let redefined builtins return 2 for
--help#D1323731896c - edit: preserve
PS1wheninternal_suppress_bash_outputis set#D13446ede0c7 - complete: complete param expan in additional contexts
#D13583683305 - main: reload on ble-update when ble.sh is already updated
#D1359a441d4d - main (
ble-update): clone github repository if the original repository is not found#D13636e3b3b5 - util (bleopt): change output format d4b12cd
- syntax: allow
time -- commandfor Bash 5.1#D136700d0e93 - menu: preserve columns with
{forward,backward}-line#D13963d5a341 - syntax: rename
ble_debugtobleopt syntax_debug#D13983cda58b - syntax: change a style of buffer contents in
bleopt syntax_debug#D13993cda58b - complete: change to generate filenames starting from
.by default#D1425987436d
Fix
- util (ble/builtin/trap): fix argument analysis for the form
trap INT(reported by dylankb)#D1221db8b0c2 - main: fix an error message on ristricted shells
#D1220b726225 - edit: fix a bug that the shell hangs with
source ble.sh --noattach && ble-attach(reported by dylankb)#D122359c1ce4 3031007 - edit: fix a bug that the textarea state is not properly saved (reported by cmplstofB)
#D122706ae2b1 - syntax: support hexadecimal literals for arithmetic expression (reported by cmplstofB)
#D122890e4f35 - history: fix a bug that history append does not work with
set -C(reported by cmplstofB)#D1229604bb8b - decode (
ble/builtin/bind): fix widget mapping fordefault_keymap=safe#D1234750a9f5 - main (ble-update): fix a bug that the check of
makedoes not work in Bash 3.2#D123608ced81 - syntax: fix a infinite loop for variable assignments and parameter expansions
#D1239327661f - complete: clear menu on history move
#D124806cc7de - syntax: fix a bug that arguments of
evalare not highlighted#D12545046d14 - decode: fix error message
command=${[key]-}for mouse input#D126309bb274 - [ble-0.3] reload: fix a bug that the state is broken by
ble-reload#D1266f2f30d1 - decode (
ble/builtin/bind): remove comment from bind argument#D1267880bb2c - decode: use
BREinstead ofEREforPOSIX sed(reported by dylankb)#D12832184739 - decode: fix strange behaviors after
fzf(convert DEL to C-?)#D1281744c8e8 - edit: work around Bash rebinding on
TERMchange#D1287ac7ab55 7a99bf3 - term: work around terminfo/termcap entry collisions in
tput(reported by killermoehre)#D1289f8c54ef - complete: clear menu on discard-line (reported by animecyc)
#D1290fb794b3#D131599880ef - vi (vi-command/nth-column): fix a bug in arithmetic expansion (reported by andychu)
#D1292da6cc47 - complete: fix a bug that insert-word does not for with ambiguous candidates
#D12952f9a000 - complete: fix a bug that menu-filter is only partially turned off by
complete_menu_filter#D1298b3654e2 - decode: fix error messages for unsupported readline functions
#D130191bdb64 - global: work around
shopt -s assoc_expand_once#D130531908e1 - global: work around
TMOUTforbuiltin read#D13061c22a9d - syntax: fix failglob errors of heredocs of the form
<<$(echo A)#D13083212fd2 - decode (
ble-bind): fix an error message#D1311c868b6d - util (
bleopt): fix a bug that a new setting is not defined withname:=(test-util)#D1312c757b92 - util (
ble/util/{save,restore}-vars): fix a bug thatnameandprefixcannot be saved/restored (test-util) 5f2480c - util: fix
ble/is-{inttype,readonly,transformed}(test-util) 485e1ac - util (
ble/path#remove{,-glob}): fix corner cases (test-util) ccbc9f8 - history: fix a problem that the history is doubled by
history -ainbashrc#D131434821fe - util (
ble/variable#get-attr): fix an error message with special variable names such as?and*#D1321557b774 - util (has-glob-pattern): fix abort in subshells (test-util)
#D1326dc292a2 - edit: fix a bug that
set +His cancelled on command execution#D133202bdf4e - syntax (
ble/syntax/parse/shift): fix a bug of shift skip in nested words#D133365fbba0 - global: work around Bash-4.4
returnin trap handlers#D1334aa09d15 - util (
ble-stackdump): fix a shift of line numbers#D1337a14b72f d785b64 - edit (
ble-bind -x): check range ofREADLINE_{POINT,MARK}#D1339efe1e81 - main: fix a bug that
~/.config/blesh/init.shis not detected (GitHub #53 by rux616) 61f9e10 - util (
ble/string#to{upper,lower}): work aroundLC_COLLATE=en_US.utf8(test-util)#D13411f6b44e#D13554da6103 5f0d49f - util (encoding, keyseq): fix miscelleneous encoding bugs (test-util) 435bd16
ble/util/c2keyseq: work around bash ambiguous keyseq\M-\C-\\ble/util/c2keyseq: fix a bug thatC1characters are not properly encodedble/util/keyseq2chars: fix a bug that\xHHis not properly processedble/encoding:UTF-8/b2c: work around Bash-4.2 arithmetic crashble/encoding:UTF-8/b2c: fix a bug thatG0characters lose its seventh bitble/encoding:UTF-8/c2b: fix a bug that the first byte gets redundant bits
- edit: work around
WINCHnot updatingCOLUMNS/LINESafterble-reload#D1345a190455 - complete: initialize
bleopt complete_menu_styleoptions beforecomplete_loadhook (reported by rux616)#D13528a9a386 - main: fix problems caused by multiple
source ble.shin bashrc#D13545476933 - syntax: allow single-character variable name in named redirections
{a}<>#D13604760409 - complete: quote
#and~at the beginning of word#D1362f62fe54 - decode (
bind): work aroundshopt -s nocasematch(reported by tigger04)#D1372855cacf - syntax (tree-enumerate): fix unmodified
wtypeof reconstructed words at the end#D138598576c7 - complete: fix a bug that progcomp retry by 124 caused the default completion again
#D138698576c7 - complete: fix bugs that quotation disappears on ambiguous completion
#D138798576c7 - complete: fix a bug of duplicated completions of filenames with spaces
#D139098576c7 - complete: fix superlinear performace of ambiguous matching globpat
#D138971afaba - prompt: fix extra spaces on line folding before double width character
#D1400d84bcd8 - prompt: fix a bug that lonig rps1 is not correctly turned off
#D1401d84bcd8 - syntax (glob bracket expression): fix a bug of unsupported POSIX brackets
#D14026fd9e22 - syntax (
ble/syntax:bash/simple-word/evaluate-path-spec): fix a bug of unrecognized[!...]and[^...]#D14030b842f5 - complete (
cd): fix duplicate candidates byCDPATH(reported by Lennart00 atoh-my-bash)#D14155777d7f - complete (
source:file): fix a bug that tilde expansion candidates are always filtered out#D14165777d7f - complete: fix a problem of redundant unmatched ambiguous part with tilde expansions in the common prefix
#D14175777d7f - highlight: fix remaininig highlighting of vanishing words
#D1421#D14221066653 - complete: fix a problem that the user setting
dotglobis changed#D1425987436d
Compatibility
- main: work around cygwin uninitialized environment
#D1225#D1226b9278bc - global: work around Bash 3.2 bug of array initialization with SOH/DEL
#D1238defdbd4#D12411720ec0 - term: support
TERM=minix#D1262ae0b80f - msys2: support2 MSYS (motivated by SUCHMOKUO)
#D126447e2863 - msys1: support MSYS1
#D1272630d659- msys1: work around missing named pipes in MSYS1
#D12736f6c2e5
- msys1: work around missing named pipes in MSYS1
- term: support contra
SPD#D12881e65f2c - decode: work around Bash-4.1 bug that locale not applied with
LC_CTYPE=C eval command(test-util) b2c7d1c - util (
ble/variable#get-attr): fix a bug that attributes are not obtained in Bash <= 4.3 (test-util) b2c7d1c - decode: work around Bash-3.1 bug of
declare -frejecting special characters in function names (test-util) b2c7d1c - edit (
ble/widget/bracketed-paste): fix error messages onpaste_endin older version of Bash (test-util) b2c7d1c - decode: work around Bash-4.1 arithmetic bug of array subscripts evaluated in discarded branches
#D1320557b774 - complete: follow Bash-5.1 change of arithmetic literal
10##D1322557b774 - decode: fix a bug of broken cmap cache found in ble-0.3
#D132716b56bf - util (strftime): fix a bug not working with
-v varoption in Bash <= 4.1 (test-util) f1a2818 - complete: work around slow
compgen -cin Cygwin#D13295327f5d - edit: work around problems with
mc(reported by onelittlehope)#D1392e97aa07
Internal changes and fixes
- util: merge
ble/util/{save,restore}-{arrs => vars}#D12176acb9a3 - internal: merge subdir
testintomemo#D1230f0c38b6 - ble-measure: improve calibration
DD1231d3a7a52 - vi_test: fix a bug that test fails to restore the original state
#D12324b882fb - decode (ble/builtin/bind): skip checking stdin in parsing the keyseq
#D12355f949e8 - syntax: delay load of
ble/syntax/parsefor syntax highlighting#D1237bb31b11 - memo: split
memo.txt->note.txt,done.txtandChangeLog.md#D124331bc9aa 8b0fe34 419155e - global: check isolated identifiers and leak variables
#D124619cc99d 2e74b6d - util: add
ble/function#{advice,push,pop}to patch functions (motivated by dylankb)#D1275fbe531a - util (
ble/util/stackdump): output tostdoutinstead ofstderr#D12799d3c50d - complete (
ble-sabbrev): delay initialization#D1282dfc4f66 - test: update
lib/test-{core => util}.sh(reported by andychu)#D1294e835b0d - edit: improve performance of bracketed-paste
#D12960a45596#D13003f33dab#D13025ee06c8 10ad274 - decode: improve performance of
ble-decode-char#D12970d9d867 - ext: update
mwg_pp.awk(for branch osh) 978ea32 - test: add
lib/core-test.sh#D130968f8077 - global: do not use
local -i#D1310f9f0f9b - global: normalize calls of builtins
#D1313b3b06f7 - test: refactor test
#D1316#D13176c2f863 - util (
ble/util/openat): change to open unused fds#D13186c2f863 - util: rename
ble/{util/openat => fd#alloc}#D13196c2f863 - util (
ble/function#advice remove): restore original command 149a640 - edit: rename
ble-edit/prompt/*->ble/prompt/*#D136576be6f1 - main: use
PROMPT_COMMANDin bash-5.1 for prompt attach#D1380b852a4f - main: unset
BLE_VERSION,_ble_bash, etc. onble-unload#D13826b615b6 - util: revisit
ble/variable#is-globalimplementation#D13836b5468f - cmap: recognize SS3 O as blur
#D1384445a5ad - edit (
ble/widget/{accept-line,newline}): automatically switch widgets by the keymap#D13915bed6e6 - complete: perform filter in
ble/complete/cand/yield#D14047c6b67b 83fa830 - syntax, edit: use
type -a -t -- cmdto get command types hidden by keywords#D1406ef2d912 - edit, complete: replace some external commands with Bash builtin
#D14075386e93