Giter Club home page Giter Club logo

akinomyoga / ble.sh Goto Github PK

View Code? Open in Web Editor NEW
2.6K 30.0 82.0 19.05 MB

Bash Line Editor―a line editor written in pure Bash with syntax highlighting, auto suggestions, vim modes, etc. for Bash interactive sessions.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.32% Shell 95.49% HTML 0.85% Awk 1.47% Roff 0.01% C 0.16% C++ 1.54% Vim Script 0.06% Gnuplot 0.09% JavaScript 0.04%
bash line-editor syntax-highlighting vim-mode bash-configuration auto-complete blesh

ble.sh's Introduction

[ Languages: English | 日本語 (Japanese) ]

ble.sh (/blɛʃ/) ―Bash Line Editor―

[ README | Manual | Q&A | contrib | Recipes ]

Bash Line Editor (ble.sh†1) is a command line editor written in pure Bash†2 which replaces the default GNU Readline.

The current devel version is 0.4. This script supports Bash 3.0 or higher although we recommend using ble.sh with release versions of Bash 4.0 or higher. The POSIX standard utilities are also required. Currently, only UTF-8 encoding is supported for non-ASCII characters. This script is provided under the BSD License (3-clause BSD license).

Quick instructions

There are two ways to get ble.sh: to get the source using git and build ble.sh, or to download the nightly build using curl or wget. See Sec 1.1 and Sec 1.2 for the details of trial and installation. See Sec 1.3 for the details of the setup of your ~/.bashrc.

Note

If you want to use fzf with ble.sh, you need to check Sec 2.8.

Download source using git and make ble.sh

This requires the commands git, make (GNU make), and gawk (GNU awk)†3. In the following, please replace make with gmake if your system provides GNU make as gmake (such as in BSD).

# TRIAL without installation

git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
make -C ble.sh
source ble.sh/out/ble.sh

# Quick INSTALL to BASHRC (If this doesn't work, please follow Sec 1.3)

git clone --recursive --depth 1 --shallow-submodules https://github.com/akinomyoga/ble.sh.git
make -C ble.sh install PREFIX=~/.local
echo 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc

The build process integrates multiple Bash script files into a single Bash script ble.sh with pre-processing. It also places other module files in appropriate places and strips code comments for a shorter initialization time. The build process does not involve any C/C++/Fortran compilations and generating binaries, so C/C++/Fortran compilers are not needed.

Download the nightly build with curl

This requires the commands curl, tar (with the support for the J flag), and xz (XZ Utils).

# TRIAL without installation

curl -L https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz | tar xJf -
source ble-nightly/ble.sh

# Quick INSTALL to BASHRC (If this doesn't work, please follow Sec 1.3)

curl -L https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz | tar xJf -
bash ble-nightly/ble.sh --install ~/.local/share
echo 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc

After the installation, the directory ble-nightly can be removed.

Download the nightly build with wget

This requires the commands wget, tar (with the support for the J flag), and xz (XZ Utils).

# TRIAL without installation

wget -O - https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz | tar xJf -
source ble-nightly/ble.sh

# Quick INSTALL to BASHRC (If this doesn't work, please follow Sec 1.3)

wget -O - https://github.com/akinomyoga/ble.sh/releases/download/nightly/ble-nightly.tar.xz | tar xJf -
bash ble-nightly/ble.sh --install ~/.local/share
echo 'source ~/.local/share/blesh/ble.sh' >> ~/.bashrc

After the installation, the directory ble-nightly can be removed.

Install a package using a package manager (currently only a few packages)

This only requires the corresponding package manager.

Update an existing copy of ble.sh
# UPDATE (in a ble.sh session)

ble-update

# UPDATE (outside ble.sh sessions)

bash /path/to/ble.sh --update
Create a package of ble.sh

Since ble.sh is just a set of shell scripts and do not contain any binary (i.e., "noarch"), you may just download the pre-built tarball from a release page and put the extracted contents in e.g. /tmp/blesh-package/usr/local. Nevertheless, if you need to build the package from the source, please use the following commands. Note that the git repository (.git) is required for the build.

# BUILD & PACKAGE (for package maintainers)

git clone --recursive https://github.com/akinomyoga/ble.sh.git
make -C ble.sh install DESTDIR=/tmp/blesh-package PREFIX=/usr/local

For a detailed control of the install locations of the main files, the license files, and the documentation files, please also check the later sections Install and Package.

If you want to tell ble.sh the way to update the package for ble-update, you can place _package.bash at ${prefix}/share/blesh/lib/_package.bash. Please check _package.bash for the details.

# ${prefix}/share/blesh/lib/_package.bash

_ble_base_package_type=XXX
function ble/base/package:XXX/update {
  update-the-package-in-a-proper-way
}

Features

  • Syntax highlighting: Highlight command lines input by users as in fish and zsh-syntax-highlighting. Unlike the simple highlighting in zsh-syntax-highlighting, ble.sh performs syntactic analysis to enable the correct highlighting of complex structures such as nested command substitutions, multiple here documents, etc. Highlighting colors and styles are fully configurable.
  • Enhanced completion: Extend completion by syntax-aware completion, completion with quotes and parameter expansions in prefix texts, ambiguous candidate generation, etc. Also, menu-complete supports the selection of candidates in the menu (candidate list) by cursor keys, TAB, and S-TAB. The feature auto-complete supports the automatic suggestion of completed texts as in fish and zsh-autosuggestions (with Bash 4.0+). The feature menu-filter integrates automatic filtering of candidates into menu completion (with Bash 4.0+). There are other functionalities such as dabbrev and sabbrev like zsh abbreviations or zsh-abbr.
  • Vim editing mode: Enhance readline's vi editing mode available with set -o vi. Vim editing mode supports various vim modes such as char/line/block visual/select mode, replace mode, command mode, operator pending mode as well as insert mode and normal mode. Vim editing mode supports various operators, text objects, registers, keyboard macros, marks, etc. It also provides vim-surround as an option.
  • Other interesting features include status line, history share, right prompt, transient prompt, xterm title, etc.

Note: ble.sh does not provide specific settings of the prompt, aliases, functions, etc. ble.sh provides a more fundamental infrastructure so that users can set up their own prompt, aliases, functions, etc. Of course ble.sh can be used in combination with other Bash configurations such as bash-it and oh-my-bash.

Demo (version 0.2)

ble.sh demo gif

History and roadmap

My little experiment took place in one corner of my bashrc at the end of May 2013 after I enjoyed an article on zsh-syntax-highlighting. I initially thought something could be achieved by writing a few hundred lines of code but soon realized that everything needs to be re-implemented for the authentic support of syntax highlighting in Bash. I decided to make it as an independent script ble.sh. The name stemmed from that of Zsh's line editor, ZLE (Zsh Line Editor), but suffixed with .sh for the implication of being written in a shell script. I'm occasionally asked about the pronunciation of ble.sh, but you can pronounce it as you like. After the two-week experiment, I was satisfied with my conclusion that it is possible to implement a full-featured line editor in Bash that satisfies the actual daily uses. The real efforts to improve the prototype implementation for real uses started in February 2015. I released the initial version in the next December. Until then, the basic part of the line editor was completed. The implementation of vim mode was started in September 2017 and completed in the next March. I started working on the enhancement of the completion in August 2018 and released it in the next February.

  • 2013-06 v0.0 -- prototype
  • 2015-12 v0.1 -- Syntax highlighting [v0.1.15]
  • 2018-03 v0.2 -- Vim mode [v0.2.7]
  • 2019-02 v0.3 -- Enhanced completion [v0.3.4]
  • 20xx-xx v0.4 (plan) -- programmable highlighting [nightly build]
  • 20xx-xx v0.5 (plan) -- TUI configuration
  • 20xx-xx v0.6 (plan) -- error diagnostics?

Limitations and assumptions

There are some limitations due to the way ble.sh is implemented. Also, some user configurations or other Bash frameworks may conflict with ble.sh. For example,

  • By default, ble.sh does not set PIPESTATUS for the previous command line because it adds extra execution costs. Instead, the array BLE_PIPESTATUS contains the values of PIPESTATUS of the previous command line. If you need to access the values directly through the variable PIPESTATUS, please set the option bleopt exec_restore_pipestatus=1.
  • By default, ble.sh assumes that PROMPT_COMMAND and PRECMD hooks do not change the cursor position and the layout in the terminal display to offer smooth rendering. If you have settings that output texts or changes the cursor position in PROMPT_COMMAND and PRECMD, please set the option bleopt prompt_command_changes_layout=1.
  • ble.sh assumes that common variable names and environment variables (such as LC_*) are not used for the global readonly variables. In Bash, global readonly variables take effect in any scope including the local scope of the function, which means that we cannot even define a local variable that has the same name as a global readonly variable. This is not the problem specific to ble.sh, but any Bash framework may suffer from the global readonly variables. It is generally not recommended to define global readonly variables in Bash except for the security reasoning (Refs. [1], [2], [3]). Also, ble.sh overrides the builtin readonly with a shell function to prevent it from making global variables readonly. It allows only uppercase global variables and _* to become readonly except _ble_*, __ble_*, and some special uppercase variables.
  • ble.sh overrides Bash's built-in commands (trap, readonly, bind, history, read, and exit) with shell functions to adjust the behavior of each built-in command and prevent them from interfering with ble.sh. If the user or another framework directly calls the original builtins through builtin BUILTIN, or if the user or another framework replaces the shell functions, the behavior is undefined.
  • The shell and terminal settings for the line editor and the command execution are different. ble.sh adjusts them for the line editor and try to restore the settings for the command execution. However, there are settings that cannot be restored or are intentionally not restored for various reasons. Some of them are summarized on a wiki page.

Criticism

  • †1Q. It is hard to pronounce "ble-sh". How should I pronounce it? --- A. The easiest pronunciation of ble.sh that users use is /blɛʃ/, but you can pronounce it as you like. I do not specify the canonical way of pronouncing ble.sh. In fact, I personally call it simply /biːɛliː/ or verbosely read it as /biːɛliː dɑt ɛseɪtʃ/ in my head.
  • †2Q. It cannot be pure Bash because the user should be able to input and run external commands. What does the pure Bash mean? --- A. It means that the core part of the line editor is written in pure Bash. Of course, the external commands will be run when the user inputs them and requests the execution of them. In addition, before and after the execution of user commands, ble.sh relies on POSIX stty to set up the correct TTY states for user commands. It also uses other POSIX utilities for acceleration in some parts of initialization and cleanup code, processing of large data in completions, pasting large data, etc. The primary goal of the ble.sh implementation is not being pure Bash, but the performance in the Bash implementation with the POSIX environment. Being pure Bash is usually useful for reducing the fork/exec cost, but if implementation by external commands is more efficient in specific parts, ble.sh will use the external commands there.
  • †3Q. Why does ble.sh use make to generate the script files? You should not use make for a script framework. --- A. Because it is not a good idea to directly edit a large script file of tens of thousands of lines. I split the codebase of ble.sh into source files of reasonable sizes and edit the source files. In the build process, some source files are combined to form the main script ble.sh, and some other files are arranged in appropriate places. The reason for combining the files into one file instead of sourcing the related files in runtime is to minimize the shell startup time, which has a large impact on the shell experience. Opening and reading many files can take a long time. Some people seem to be angry about ble.sh using make to build and arrange script files. They seem to believe that one always needs to use make with C/C++/Fortran compilers to generate binaries. They complain about ble.sh's make process, but it comes from the lack of knowledge on the general principle of make. Some people seem to be angry about ble.sh having C/C++ source codes in the repository, but they are used to update the Unicode character table from the Unicode database when a new Unicode standard appears. The generated table is included in the repository: canvas.GraphemeClusterBreak.sh, canvas.c2w.musl.sh, canvas.c2w.sh, and canvas.emoji.sh, so there is no need to run these C/C++ programs in the build process. Another C file is used as an adapter in an old system MSYS1, which is used with an old compiler toolchain in Windows, but it will never be used in Unix-like systems. Each file used in the build process is explained in make/README.md.

1 Usage

1.1 Build from source

Generate

To generate ble.sh, gawk (GNU awk) and gmake (GNU make) (in addition to Bash and POSIX standard utilities) are required. The file ble.sh can be generated using the following commands. If you have GNU make installed on gmake, please use gmake instead of make.

git clone --recursive https://github.com/akinomyoga/ble.sh.git
cd ble.sh
make

A script file ble.sh will be generated in the directory ble.sh/out.

Try

Then, you can load ble.sh in the Bash session using the source command:

source out/ble.sh

Install

To install ble.sh in a specified directory, use make install.

# INSTALL to ~/.local/share/blesh and ~/.local/share/doc/blesh
make install

# INSTALL into a specified directory
make install INSDIR=/path/to/blesh

The install locations of ble.sh and related script files can be specified by make variable INSDIR. The locations of the license files and the documentation files can be specified by make variables INSDIR_LICENSE and INSDIR_DOC, respectively. When INSDIR is specified, the default values of INSDIR_LICENSE and INSDIR_DOC are $INSDIR/licenses and $INSDIR/doc. When INSDIR and the below-mentioned DESTDIR/PREFIX are not specified, the default values of INSDIR, INSDIR_LICENSES, and INSDIR_DOC are $data/blesh, $data/blesh/licenses, and $data/doc/blesh, respectively, where $data represents ${XDG_DATA_HOME:-$HOME/.local/share}/blesh.

When USE_DOC=no is specified, the documentation files are disabled.

By default, the comment lines and blank lines in the script files are stripped in the installation process. If you would like to keep these lines in the script files, please specify the argument strip_comment=no to make.

To set up .bashrc see Sec. 1.3.

Package

Package maintainers may use make variables DESTDIR and PREFIX to quickly set up the default values for INSDIR, INSDIR_LICENSE, and INSDIR_DOC.

# PACKAGE - Example 1
make install DESTDIR=/tmp/blesh-package PREFIX=/usr/local

# PACKAGE - Example 2
make install DESTDIR="$build" PREFIX="$prefix" \
  INSDIR_LICENSE="$build/$prefix/share/licenses/blesh"

# PACKAGE - Example 3
make install DESTDIR="$build" PREFIX="$prefix" \
  INSDIR_LICENSE="$build/$prefix/share/blesh/doc" \
  INSDIR_DOC="$build/$prefix/share/blesh/doc"

# PACKAGE - Example 4
make install USE_DOC=no DESTDIR="$build" PREFIX="$prefix"

If make variable DESTDIR or PREFIX is specified instead of INSDIR, the value of INSDIR is set to $DESTDIR/$PREFIX/share/blesh, and the default install locations of the license and documentation files, INSDIR_LICENSE and INSDIR_DOC, will be $DESTDIR/$PREFIX/share/doc/blesh.

_package.bash

When you want to tell ble.sh the way to update the package for ble-update, you can place _package.bash at ${prefix}/share/blesh/lib/_package.bash. The file _package.bash is supposed to define a shell variable and a shell function as illustrated in the following example (please replace XXX with a name representing the package management system):

# ${prefix}/share/blesh/lib/_package.bash

_ble_base_package_type=XXX

function ble/base/package:XXX/update {
  update-the-package-in-a-proper-way
  return 0
}

When the shell function returns exit status 0, it means that the update has been successfully completed, and ble.sh will be reloaded automatically. When the shell function returns exit status 6, the timestamp of ble.sh will be checked so ble.sh is reloaded only when ble.sh is actually updated. When the shell function returns exit status 125, the default ble.sh update procedure is attempted. Otherwise, the updating procedure is canceled, where any message explaining situation should be output by the shell function. An example _package.bash for AUR can be found here.

1.2 Download a tarball

You can also download a tarball of ble.sh from GitHub releases. See each release page for the description of downloading, trial and installation. Many features are unavailable in the stable versions since they are significantly old compared to the devel version.

1.3 Set up .bashrc

If you want to load ble.sh in interactive sessions of bash by default, usually one can just source ble.sh in ~/.bashrc, but a more reliable way is to add the following codes to your .bashrc file:

# bashrc

# Add this lines at the top of .bashrc:
[[ $- == *i* ]] && source /path/to/blesh/ble.sh --noattach

# your bashrc settings come here...

# Add this line at the end of .bashrc:
[[ ! ${BLE_VERSION-} ]] || ble-attach

Basically, when source /path/to/ble.sh and ble-attach are performed, standard streams (stdin, stdout, and stderr) should not be redirected but should be connected to the controlling TTY of the current session. Also, please avoid calling source /path/to/ble.sh in shell functions. The detailed conditions where the above more reliable setup is needed are explained in an answer in Discussion #254.

1.4 User settings ~/.blerc

User settings can be placed in the init script ~/.blerc (or ${XDG_CONFIG_HOME:-$HOME/.config}/blesh/init.sh if ~/.blerc is not available) whose template is available as the file blerc.template in the repository. The init script is a Bash script that is sourced during the load of ble.sh, so any shell commands can be used in ~/.blerc. If you want to change the default path of the init script, you can add the option --rcfile INITFILE to source ble.sh as the following example:

# in bashrc

# Example 1: ~/.blerc will be used by default
[[ $- == *i* ]] && source /path/to/blesh/ble.sh --noattach

# Example 2: /path/to/your/blerc will be used
[[ $- == *i* ]] && source /path/to/blesh/ble.sh --noattach --rcfile /path/to/your/blerc

1.5 Update

You need Git (git), GNU awk (gawk) and GNU make (make). For ble-0.3+, you can run ble-update in the session with ble.sh loaded:

$ ble-update

For ble.0.4+, you can also update it outside the ble.sh session using

$ bash /path/to/ble.sh --update

You can instead download the latest version by git pull and install it:

cd ble.sh   # <-- enter the git repository you already have
git pull
git submodule update --recursive --remote
make
make INSDIR="$HOME/.local/share/blesh" install

1.6 Uninstall

Basically you can simply delete the installed directory and the settings that the user added.

  • Close all the ble.sh sessions (the Bash interactive sessions with ble.sh)
  • Remove related user data. If you would like to keep them, you can skip these steps.
    • Remove the added lines in .bashrc.
    • Remove blerc files (~/.blerc or ~/.config/blesh/init.sh) if any.
    • Remove the state directory ~/.local/state/blesh if any.
  • Remove the directory where ble.sh is installed. When you use out/ble.sh inside the working tree of the git repository, the installed directory is the directory of the repository. When you use ble.sh installed by make install, the installed directory is <PREFIX>/share/blesh where <PREFIX> (default: ~/.local) is the prefix specified to make install in the installation stage. When you use the version extracted from a tarball, the directory created by extracting the tarball is the installed directory.
  • Remove the cache directory ~/.cache/blesh if any.
  • Remove the temporary directory /tmp/blesh if any [ Only needed when your system does not automatically clear /tmp ].

2 Basic settings

Here, some of the settings for ~/.blerc are picked up. You can find useful settings also in Q&A, Recipes, and contrib repository. The complete list of setting items can be found in the file blerc.template. For detailed explanations please refer to Manual.

2.1 Vim mode

For the vi/vim mode, check the wiki page.

2.2 Disable features

One of frequently asked questions is the way to disable a specific feature that ble.sh adds. Here the settings for disabling features are summarized.

# Disable syntax highlighting
bleopt highlight_syntax=

# Disable highlighting based on filenames
bleopt highlight_filename=

# Disable highlighting based on variable types
bleopt highlight_variable=

# Disable auto-complete (Note: auto-complete is enabled by default in bash-4.0+)
bleopt complete_auto_complete=
# Tip: you may instead specify the delay of auto-complete in millisecond
bleopt complete_auto_delay=300

# Disable auto-complete based on the command history
bleopt complete_auto_history=

# Disable ambiguous completion
bleopt complete_ambiguous=

# Disable menu-complete by TAB
bleopt complete_menu_complete=

# Disable menu filtering (Note: auto-complete is enabled by default in bash-4.0+)
bleopt complete_menu_filter=

# Disable EOF marker like "[ble: EOF]"
bleopt prompt_eol_mark=''
# Tip: you may instead specify another string:
bleopt prompt_eol_mark=''

# Disable error exit marker like "[ble: exit %d]"
bleopt exec_errexit_mark=
# Tip: you may instead specify another string:
bleopt exec_errexit_mark=$'\e[91m[error %d]\e[m'

# Disable elapsed-time marker like "[ble: elapsed 1.203s (CPU 0.4%)]"
bleopt exec_elapsed_mark=
# Tip: you may instead specify another string
bleopt exec_elapsed_mark=$'\e[94m[%ss (%s %%)]\e[m'
# Tip: you may instead change the threshold of showing the mark
bleopt exec_elapsed_enabled='sys+usr>=10*60*1000' # e.g. ten minutes for total CPU usage

# Disable exit marker like "[ble: exit]"
bleopt exec_exit_mark=

# Disable some other markers like "[ble: ...]"
bleopt edit_marker=
bleopt edit_marker_error=

2.3 CJK Width

The option char_width_mode controls the width of the Unicode characters with East_Asian_Width=A (Ambiguous characters). Currently, four values emacs, west, east, and auto are supported. With the value emacs, the default width in emacs is used. With west, all the ambiguous characters have width 1 (Hankaku). With east, all the ambiguous characters have width 2 (Zenkaku). With auto, the width mode west or east is automatically chosen based on the terminal behavior. The default value is auto. The appropriate value should be chosen in accordance with your terminal behavior. For example, the value can be changed to west as:

bleopt char_width_mode='west'

2.4 Input Encoding

The option input_encoding controls the encoding scheme used in the decode of input. Currently UTF-8 and C are available. With the value C, byte values are directly interpreted as character codes. The default value is UTF-8. For example, the value can be changed to C as:

bleopt input_encoding='C'

2.5 Bell

The option edit_bell controls the behavior of the edit function (widget) called bell. It is a colon-separated list of the values vbell, abell, and visual. When a value is contained, the corresponding type of the bell is enabled. The value abell corresponds to the audible bell, which prints ASCII Control Character BEL (0x07) will be written to stderr. The value vbell corresponds to the visible bell, which shows the message in the terminal display. The value visual corresponds to the visual bell, which flashes the terminal screen by turning on the DECSCNM mode for a short moment. By default, only the audible bell is enabled.

The option vbell_default_message specifies the default message shown by the visual bell. The default value of this setting is ' Wuff, -- Wuff!! '. The option vbell_duration specifies the display duration of the visual-bell message. The unit is a millisecond. The default value is 2000. The option vbell_align specifies the position of vbell by left, center, or right.

For example, the audible bell can be disabled, and the visual bell can be set up as:

bleopt edit_bell=vbell vbell_{default_message=' BEL ',duration=3000,align=right}

2.6 Highlight Colors

The colors and attributes used in the syntax highlighting are controlled by the function ble-face. The following code reproduces the default configuration:

# highlighting related to editing
ble-face -s region                    bg=60,fg=231
ble-face -s region_target             bg=153,fg=black
ble-face -s region_match              bg=55,fg=231
ble-face -s region_insert             fg=27,bg=254
ble-face -s disabled                  fg=242
ble-face -s overwrite_mode            fg=black,bg=51
ble-face -s vbell                     reverse
ble-face -s vbell_erase               bg=252
ble-face -s vbell_flash               fg=green,reverse
ble-face -s prompt_status_line        fg=231,bg=240

# syntax highlighting
ble-face -s syntax_default            none
ble-face -s syntax_command            fg=brown
ble-face -s syntax_quoted             fg=green
ble-face -s syntax_quotation          fg=green,bold
ble-face -s syntax_escape             fg=magenta
ble-face -s syntax_expr               fg=33
ble-face -s syntax_error              bg=203,fg=231
ble-face -s syntax_varname            fg=202
ble-face -s syntax_delimiter          bold
ble-face -s syntax_param_expansion    fg=133
ble-face -s syntax_history_expansion  bg=94,fg=231
ble-face -s syntax_function_name      fg=99,bold
ble-face -s syntax_comment            fg=242
ble-face -s syntax_glob               fg=198,bold
ble-face -s syntax_brace              fg=37,bold
ble-face -s syntax_tilde              fg=63,bold
ble-face -s syntax_document           fg=100
ble-face -s syntax_document_begin     fg=100,bold
ble-face -s command_builtin_dot       fg=red,bold
ble-face -s command_builtin           fg=red
ble-face -s command_alias             fg=teal
ble-face -s command_function          fg=99
ble-face -s command_file              fg=green
ble-face -s command_keyword           fg=blue
ble-face -s command_jobs              fg=red
ble-face -s command_directory         fg=33,underline
ble-face -s command_suffix            fg=231,bg=28
ble-face -s command_suffix_new        fg=231,bg=124
ble-face -s filename_directory        underline,fg=33
ble-face -s filename_directory_sticky underline,fg=231,bg=26
ble-face -s filename_link             underline,fg=teal
ble-face -s filename_orphan           underline,fg=16,bg=224
ble-face -s filename_executable       underline,fg=green
ble-face -s filename_setuid           underline,fg=black,bg=220
ble-face -s filename_setgid           underline,fg=black,bg=191
ble-face -s filename_other            underline
ble-face -s filename_socket           underline,fg=cyan,bg=black
ble-face -s filename_pipe             underline,fg=lime,bg=black
ble-face -s filename_character        underline,fg=231,bg=black
ble-face -s filename_block            underline,fg=yellow,bg=black
ble-face -s filename_warning          underline,fg=red
ble-face -s filename_url              underline,fg=blue
ble-face -s filename_ls_colors        underline
ble-face -s varname_array             fg=orange,bold
ble-face -s varname_empty             fg=31
ble-face -s varname_export            fg=200,bold
ble-face -s varname_expr              fg=99,bold
ble-face -s varname_hash              fg=70,bold
ble-face -s varname_new               fg=34
ble-face -s varname_number            fg=64
ble-face -s varname_readonly          fg=200
ble-face -s varname_transform         fg=29,bold
ble-face -s varname_unset             fg=245
ble-face -s argument_option           fg=teal
ble-face -s argument_error            fg=black,bg=225

# highlighting for completions
ble-face -s auto_complete             fg=238,bg=254
ble-face -s menu_desc_default         none
ble-face -s menu_desc_type            ref:syntax_delimiter
ble-face -s menu_desc_quote           ref:syntax_quoted
ble-face -s menu_filter_fixed         bold
ble-face -s menu_filter_input         fg=16,bg=229

The current list of faces can be obtained by the following command (ble-face without arguments):

$ ble-face

The color codes can be checked in output of the function ble-color-show (defined in ble.sh):

$ ble-color-show

2.7 Key Bindings

Key bindings can be controlled with the shell function, ble-bind. For example, with the following setting, "Hello, world!" will be inserted on typing C-x h

ble-bind -f 'C-x h' 'insert-string "Hello, world!"'

The details on the key representation, such as C-x h in the above example, are described in Manual §3.1. The representations of Space, Tab, Enter, Backspace, Escape, etc. are described in Manual §3.1.1: The space is represented as SP, the tab key is represented as C-i or TAB depending on the terminal, the enter/return key is represented as C-m or RET depending on the terminal, and the backspace key is represented as C-?, DEL, C-h, or BS depending on the terminal. The representations of modified special keys such as Ctrl+Return and Shift+Return are described in Manual §3.6.4: If your terminal does not support modifyOtherKeys, you need to manually configure the escape sequences of modified special keys.

For another example, if you want to invoke a command on typing M-c, you can write it as follows:

ble-bind -c 'M-c' 'my-command'

Or, if you want to invoke a edit function (designed for Bash bind -x) on typing C-r, you can write it as follows:

ble-bind -x 'C-r' 'my-edit-function'

The existing key bindings are shown by the following command:

$ ble-bind -P

The list of widgets is shown by the following command:

$ ble-bind -L

If you want to run multiple widgets with a key, you can define your own widget by creating a function of the name ble/widget/YOUR_WIDGET_NAME as illustrated in the following example. It is highly recommended to prefix the widget name with YOUR_NAME/, my/, blerc/, dotfiles/, etc. in order not to conflict with the names of the existing standard widgets.

# Example of calling multiple widgets with the key C-t
function ble/widget/my/example1 {
  ble/widget/beginning-of-logical-line
  ble/widget/insert-string 'echo $('
  ble/widget/end-of-logical-line
  ble/widget/insert-string ')'
}
ble-bind -f C-t my/example1

2.8 fzf integration

If you would like to use fzf in combination with ble.sh, you need to configure fzf using the contrib/fzf integration. Please follow the instructions in the link for the detailed description.

# blerc

# Note: If you want to combine fzf-completion with bash_completion, you need to
# load bash_completion earlier than fzf-completion.  This is required
# regardless of whether to use ble.sh or not.
source /etc/profile.d/bash_completion.sh

ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings

The option -d of ble-import delays the initialization. In this way, the fzf settings are loaded in background after the prompt is shown. See ble-import - Manual §8 for details.

When you have additional configuration for fzf

When you want to run codes of the additional configuration after the fzf settings are loaded, you cannot simply write them after the above settings because of the delayed loading of the fzf settings. In this case, there are four options. The easiest way is to drop the -d option (Option 1 below) to disable the delayed loading:

# [1] Drop -d
ble-import integration/fzf-completion
ble-import integration/fzf-key-bindings
<settings>

However, the above setting may make the initialization time longer. As another option, you may also delay the additional settings with ble-import -d [2] or ble/util/idle.push [3]. Or, you can hook into the loading of the fzf settings by ble-import -C [4].

# [2] Use ble-import -d for additional settings
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings
ble-import -d '<filename containing the settings>'

# [3] Use "ble/util/idle.push" for additional settings
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings
ble/util/idle.push '<settings>'

# [4] Use "ble-import -C" for additional settings
ble-import -d integration/fzf-completion
ble-import -d integration/fzf-key-bindings
ble-import -C '<settings>' integration/fzf-key-bindings

3 Tips

3.1 Use multiline mode

When the command line string contains a newline character, ble.sh enters the MULTILINE mode.

By typing C-v C-j or C-q C-j, you can insert a newline character in the command line string. In the MULTILINE mode, RET (C-m) causes the insertion of a new newline character. In the MULTILINE mode, the command can be executed by typing C-j.

When the shell option shopt -s cmdhist is set (which is the default), RET (C-m) inserts a newline if the current command line string is syntactically incomplete.

3.2 Use vim editing mode

If set -o vi is specified in .bashrc or set editing-mode vi is specified in .inputrc, the vim mode is enabled. For details, please check the wiki page.

3.3 Use auto-complete

The feature auto-complete is available in Bash 4.0 or later. auto-complete automatically suggests a possible completion on user input. The suggested contents can be inserted by typing S-RET (when the cursor is at the end of the command line, you can also use right, C-f, or end to insert the suggestion). If you want to insert only the first word of the suggested contents, you can use M-right or M-f. If you want to accept the suggestion and immediately run the command, you can use C-RET (if your terminal does not support special key combinations like C-RET, please check Manual §3.6.4).

3.4 Use sabbrev (static abbrev expansions)

By registering words to sabbrev, the words can be expanded to predefined strings. When the cursor is just after a registered word, typing SP causes the sabbrev expansion. For example, with the following settings, when you type SP after the string command L, the command line will be expanded to command | less.

# blerc
ble-sabbrev L='| less'

The sabbrev names that start with \ plus alphabetical letters are also recommended since it is unlikely to conflict with real words that are a part of the executed command.

# blerc
ble-sabbrev '\L'='| less'

The sabbrevs starting with ~ can be expanded also by /. This can be used to approximate Zsh's named directories. For example, with the following settings, typing ~mybin/ expands it to e.g. /home/user/bin/ (where we assumed HOME=/home/user).

# blerc

ble-sabbrev "~mybin=$HOME/bin"

4 Contributors

I received much feedback from many people in GitHub Issues/PRs. I thank all such people for supporting the project. Among them, the following people have made particularly significant contributions.

  • @cmplstofB helped me implement vim-mode by testing it and giving me a lot of suggestions.
  • @dylankb reported many issues with the fzf integration, initialization, etc.
  • @rux616 reported several issues and created a PR for fixing the default path of .blerc
  • @timjrd suggested and contributed to performance improvements in completion.
  • @3ximus reported many issues for a wide variety of problems.
  • @SuperSandro2000 reported many issues related to NixOS and others

ble.sh's People

Contributors

aiotter avatar akinomyoga avatar alexandregv avatar bkerin avatar capezotte avatar cmplstofb avatar guettli avatar harduex avatar jaredneil avatar kiasoc5 avatar musou1500 avatar rux616 avatar tars0x9752 avatar timjrd avatar uyha avatar weskeiser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ble.sh's Issues

What a fantastic project!!!

Excellent work. Hats off.

Have been searching for something like this for years, did not want to move to fish/zsh. But was never sure if this was even possible in pure bash. I even attempted at providing such features via urxvt's perl scripts at the terminal layer, but of course that's not portable.

Thanks for doing this. Looking forward to using this and looking into the codebase.

Not really an issue; feel free to close this.

入れ子になったbashの子シェルからexitした際に大量のログが出る

ble.sh環境下で bash を更に立ち上げexitした際に、以下のように大量のログが出ます

[1]    Running                 '/bin/stty' "$@"
[2]   Stopped                 '/bin/stty' "$@"
[3]   Stopped                 '/bin/stty' "$@"
(以下、無限に続く)

ble.sh.bashrc 内で読み込んでおり、入れ子になったシェルの両方にロードされています。

カーソルが関数の上にある場合に,手引きを開こうとすると正常でないコマンドが実行される

Commit ID: 6129766
Bash version: 4.4.12

$ function somefunc() { echo "foo"; }
$ somefun@

この状態で,手引き閲覧キー(既定ではK)を押下すると

-bash: UTF-8: コマンドが見つかりません
-bash: UTF-8: コマンドが見つかりません

という警告が表示され,コマンドラインに戻されます。
本来は(というか以前のコミット; 早くとも 9e68058 の段階では)somefuncの内容が表示されます。

[failglob] 連想配列が正しく着色されない

Commit ID: f7f1ec8
Version of Bash: 4.4.12

$ declare -A array=(["idx1"]="val1" ["idx2"]="val2")
                    ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
$ echo ${array["idx1"]}
val1

などというコマンドラインにおいて,波下線部がエラーのような着色をされてしまいます。

Unknown widget `-'.

ble version: 0.4.0-devel2+0d9d867
Bash version: 5.0.16(1)-release,x86_64-apple-darwin18.7.0

I recently started getting this error whenever I start a new terminal session. It's a bit odd since as far as I can remember I did not change any dot files configuration (.blerc, .bashrc, etc.) or update ble around the time it started happening. Any ideas what might be cause this or tips for debugging?

ble-bind: Unknown widget `-'.
ble-bind: Unknown widget `-'.
$ ble-bind: Unknown widget `-'.

map "jk" to go to normal mode in vi-mode

Hey, thx for the awesome project!!!!

I like to use "jk" in vi-insert-mode to switch to normal mode.
Can you please help me to find the right mapping configuration?

thx in advance!!!

[更新] ble-update(1)を実行する際にfailglobを(一旦)無効にする

Version of ble.sh: 0.3.0-alpha1+15245d5
Version of GNU Bash: 5.0.2(1)-release

コマンドble-updateが実行された時に,failglobオプションが有効になっていると,[ble: reload]の後の幾つかの設定において「-bash: 一致しません: XXX」というエラーが起きるようです(なお,ble-update(1)自体は成功します; 終了ステータスは0です)。例えば変数値ble_util_idle_elapsedの比較で用いられている3項演算子?や,変数$LS_COLORSに格納されている文字*が引っ掛かります。ble-update(1)を実行する際にはfailglobオプションを無効にしたほうが良いように思います。

ble: reload - sourcing .bashrc disables line editor

ble version:

b0.4.0-devel2+db8b0c2

Bash version:

5.0.11(1)-release

I've set up bleh.sh to automatically load in interactive shells through sourcing it in a .bashrc per the readme. If I do source ~..bashrc (or source ~/.bash_profile for that matter) I'm no longer able to use into my terminal session (iTerm2). To be more specific, after running the source command manually the screen shows a ble: reload message and no the terminal no longer appears to accept input - typed commands like ls are not only not visible but also don't update the terminal.

丸括弧で囲われた部分のコマンド類の手引きを表示できない

Commit ID: d518830
Bash version: 4.4.12

$ (bash --version@)
$ ( pwd | cat ; bash --version @) # ←丸括弧の前後に空白がある場合,複数のコマンドがある場合

上のように丸括弧で囲まれたコマンドラインにおいて,手引きを表示(Vimモードでの既定はKキーに束縛されている)する函数vi_nmap/command-helpを実行しても,「command `' not found」という警告が表示される以外なにも起こりません。
丸括弧の内部のコマンドラインにおいても適当な手引き表示処理を行なうようにして欲しいです。

[履歴]巨大な履歴ファイルがあると動作が極端に遅くなる。

ble version: 0.4.0-devel1+7be255c
Bash version: 5.0.3(1)-release

題名の通り,巨大な履歴ファイルに対してble.shが正常に動作しません。
正確な閾値は不明ですが,1.4 GiB程の大きさの履歴ファイルがあると,(単に沢山の履歴を処理しているのに時間が掛かっているとは思えない程)動作が遅くなります。

この一つ前のバージョン ( コミットID: 518e2ee) まででは起きなかった挙動です。

また,上述の状態でコマンドを実行すると実行(実行の結果それ自体は尋常です)の後に

awk: write failure (No space left on device)
awk: close failed on file /run/user/1000/blesh/〈数字〉.history.new (No space left on device)

というエラー文が表示され,履歴に実行したコマンドが書き込まれません。“No space left on device”とありますが,実際にはまだかなり空き容量には余裕があります(残り82 GiB程)し,iノードも殆ど使っていません(割合として1%強くらい)。またファイルシステムはext4で構築しているので,ファイルサイズそのものも(テキストファイルとしては些か巨大ですが)影響しているとは思えません。

なお,私のGNU Bashの履歴に関する設定は以下の通りです。

HISTSIZE=''
HISTFILESIZE=''

というか,そんな馬鹿デカい履歴を保持し続けるのが間違っているのかもしれませんが……。

how to shut down auto-complete

[Describe your queation or problem here. If sample terminal contents are available, you may copy and paste them here.]
hi,how to shut down auto-complete

[failglob] コマンド補完において誤った候補が出力される

Commit ID: 8617258

コマンド補完に不具合があります

コマンドとして入力している文字列がコマンド候補に含まれている場合

$ vi@
# 補完キー押下
$ vi@
vi* vim

vi*というコマンドはありません。

コマンドとして入力している文字列がコマンド候補に含まれていない場合

$ ema@
# 補完キー押下(emaから始まるコマンドはない)
$ ema\*@

ちなみに,ここで更に補完キーを押下すると

$ ema\*@
$ ema\\\*\*@

となります。以降補完キーを押下する度に文字列が長くなっていきます。

なお,この際,bleshは「エラー」とは判断していないようです;というのも不正な位置で補完キーを押下したときはビジュアルベルが作動*しますが,この場合は作動しないので。


* bleoptとしてedit_vbellを有効にしています。

syntax: 変数展開のパターンとしての感嘆符が履歴展開開始文字として認識される

ble version: 0.4.0-devel1+362ab05
Bash version: 5.0.3(1)-release

変数展開のパターンとしての感嘆符及び以降の文字列が,履歴展開開始文字としての感嘆符とその対象文字列として認識されてしまいます。
次のようなコマンドラインにおいて,波線部は履歴展開されない筈です(実際,実行結果を見るにそうであるように思えます)が,そうなるかのような挙動を示します。具体的にはsyntax_history_expansionで指定した装飾が施され,さらに改行キーが複数行モード開始キーとして取り扱われます。

$ VAR='abc'
$ echo ${VAR%[!a]}
              ^^^
ab

(ただ,履歴展開に関する手引きに拠れば,一重引用符で囲まれた範囲・逆斜線が前置された場合・二重引用符で囲まれた範囲の終端 以外 では履歴展開が適用されるとのことなので,もしかしたら私の勘違いかも知れません……。
一方でパターンマッチに関する手引きに拠れば,開き角括弧の直後の感嘆符は^と同等の意味を持つようなので,どちらが優先されるのか私めには分かりかねます。
〝素〟のBash⦅$ bash --norcで起動⦆でも上掲のコマンドラインにおいて履歴展開されないので,後者の仕様が優先されるようですが……)

[補完]「~.」のような引数を入力すると大量の警告が発生する

Commit ID: b4fc40c
Bashのバージョン: 5.0.2

コマンドラインにおいて,

$ cat ~.@

ここまで入力した段階で
「-bash: ble-complete/action:tilde/initialize: そのようなファイルやディレクトリはありません」
という警告が際限無く生じます。
Ctrl+Cを押下すると元のコマンドラインに(編集可能な状態で)戻れますが,文字を入力することに関連した操作をしようとすると,再び同じような大量の警告文が表示され,これは非常に厄介です。

私の手元の範囲では,bashやble.shの個人設定に関係なく発生するようです。

Error messages on msys2's bash

ble version: 0.3.2+2423f4d
Bash version: 4.4.23(1)-release (x86_64-pc-msys)

Hi!
I'm using ble with msys2's bash on windows, but there seems some problem.
Every time I typed a character into the terminal, I got a bunch of error messages like:

bash: read: read error: 10: Communication error on send
bash: read: read error: 10: Communication error on send
bash: read: read error: 10: Communication error on send
bash: read: read error: 10: Communication error on send
bash: read: read error: 10: Communication error on send

[Vim-mode] ヴィジュアルモードを開始したとき,単語単位のオブジェクトが正しく選択できない

Commit ID: b7291a7
Version of GNU Bash: 4.4.12

ノーマルモードでvを入力した後にawなどとすると単語単位で選択することができる筈ですが,できなくなっています。
参考: https://vim-jp.org/vimdoc-ja/motion.html#v_aw

$ echo 'fo@bar'
# vawを送信
$ echo 'foobar'
          ^^^^

波下線部が選択されます。本来はfoobar全体が選択されるべきです。
同じような挙動は単語を単位とする全てのオブジェクトで起こっているようです。

[構文強調] コマンドの直前に後からコメント開始文字を挿入しても着色が適切に変化しない

Commit ID: b7291a7
Version of GNU Bash: 4.4.12

コマンドとなる文字列(ble-color-setfaceにおいてcommand_*で着色設定されうる文字列)の直前に,コマンドとなる文字列を入力し終わった状態でコメント開始文字(#)を入力すると,本来はそれ以降がble-color-setfaceにおいてsyntax_commandで着色される筈ですが,されません。

$ echo 'foo'@
# 先頭に`#`を挿入
$ #echo 'foo'
   ^^^^

波下線部が,元の着色のままになります。

  • 'foo'などの引数部分は正常に着色がコメントを表わすものに変化します
  • コマンドラインの直前だけではなくコマンドの直前でこの挙動をします
$ echo 'foo' | cat@
# `cat`の直前に`#`を挿入
$ echo 'foo' | #cat
                ^^^

波下線部が元の着色のままです。

Enhancement of completion

補完について色々。現状の補完の仕組みは色々不満があるので改修する必要がある

  • 文脈依存のエスケープが不完全・不自然 (2018-08-25)
  • menu-complete, menu-complete-backward の対応が困難 (2018-09-02)
  • 重い → 保留 (2018-09-02)
  • 候補表示をもっとちゃんとする (2018-09-02)
  • 自動的に候補を提示したい (2018-08-25)
  • 絞り込み (2018-09-02)

他に以下の要望が出ている

  • 略語展開 (仕様は未だ何も決まっていない)
    • 静的略語展開
    • 動的略語展開
  • ブレース展開の中での補完
  • 追記: ヒアストリング・ヒアドキュメントの中の補完

2018-08-25 開発ブランチ enhance-complete

ヒアドキュメント後のコマンドラインにおけるヘルプ機能がカーソル下の単語を判断しない

Commit ID: 860e0fe
Version of GNU Bash: 4.4.12

(すいません,文章でできるだけ分かりやすく説明しようとしたのですが……)

$ cat <<. | echo@
foo
bar
baz
.

このようなコマンドラインにおいて,ヘルプキー(vi-modeの既定はK)を押下しても,cat(1)に関するヘルプが実行されてしまいます。本来は,echo(1)に関してのヘルプが実行されるべきです。

syntax: Vimのコマンドモードに一度入って以降着色機能等が働かない

ble version: 0.4.0-devel2+3031007
Bash version: 5.0.3(1)-release

$ echo foo #←任意のコマンド
:@

Vimモードにおいて,上掲のようなコマンドラインの状態(vi_cmapに対してカーソルがある)の後,
EscwEnter等でコマンドモードを抜けると,
それまで正常だった着色機能が働かなくなってしまいます。
(着色機能以外でも異常になっている部分があるかも知れませんが,調べ切っていません,すいません)

[Bash 3.2 in macOS] keymap 'emacs' is not defined.

ble version:

3.0.0

Bash version:

I'm on MacOS and have installed bash via Homebrew

$ bash -c 'echo $BASH_VERSION' 
5.0.11(1)-release
$ echo $BASH_VERSION
3.2.57(1)-release

When I add follow the instructions for configuring bleh.sh with .bashrc (except that I'm using .bash_profile) I get an error.

usage: sleep seconds
$ ... ~ $ ble.sh: Failed to load the default keymap. keymap 'emacs' is not defined.

Use "logout" to leave the shell.

Oddly enough if I manually source /bleh.sh then bleh.sh does load the first time. If I start a new session and try to source again I'll get the same error.

Just wanted to add though that this is a cool project!

nohup(1)コマンドの挙動について

nohup(1)コマンドをバックグラウンドジョブとして実行したのちにシェルをログアウトしようとすると,ジョブが残っているという旨の警告が出てログアウトできない。
Commit ID: 87ba74b
Version of GNU Bash: 4.4.12

症状

$ nohup xlogo > /dev/null &
$ @

ここでCtrl+dなどとしてログアウトしようとしても,ジョブが残っているという警告が表示され,ログアウトできません。
ちなみにbleshを読み込まずに起動するとこの現象は発生しません。
また,checkjobsが原因かと思い,有効・無効を試しましたが,変化はないようです。

[fzf] Want to avoid multiline mode for a command

Hi, just downloaded this last night and was pumped to see it worked perfectly out of the box.
My only grievance is that:
export FZF_ALT_C_COMMAND="bfs -type d -nohidden"
enters multiline every time, I would like the command to just run upon alt-c.

I have tried the following adjustments to no avail:
export FZF_ALT_C_COMMAND="bfs -type d -nohidden | tr -d '\n'"
export FZF_ALT_C_COMMAND="bfs -type d -nohidden; xdotool key ctrl+j"

If it matters here is some system info of mine:

BASH: bash 5.0.16
OS: 5.4.28-1-MANJARO
Terminal: kitty 0.17.2 or neovim terminal
bfs version: 1.6
fzf version: 0.21.1

Again I love the program and would recommend it to others in its current state, but just for feedback's sake I wanted to mention I do notice increased latency for random things like from entering ls to the output being displayed.
Thanks!

描画属性指定子にSGRの値を指定できるようにしてほしい

描画属性指定子にSGRの値を指定できるようにしてほしいです。
例えばこのような方法で指定できることを望みます。

# ble-color-setface <face_name> sgr=<SGR_varue>
ble-color-setface filename_directory sgr='01;34'

蛇足気味ですが,こういった指定方法を追加してほしい理由を述べます。
GNU版のls(1)ユーティリティでは$LS_COLORS環境変数に(多くはdircolor(1)ユーティリティを用いて)ファイルの属性とSGRの値を設定することで表示されるファイルに着色することができます。僕はコマンドライン上のファイルの色などをls(1)ユーティリティが着色するファイルの色と協調させようと思っており,$LS_COLORSから「di=<SGR_varue>」の値を抜き出してble-color-setface関数などで利用したいのです。

Support vi-mode

set -o vi 対応を行う (参照: #1)。

  • 取り敢えずは基本的な操作に集中する
  • 機能に名称はついているのか? → これは bind -p を参考にする。

[構文強調] face:型で配色指定すると[コマンドを入力した後に入力ができなくなる

Commit ID: ec31aab
Bash version: 4.4.23

(いつもお世話になっております)

ビルトインコマンドの配色をface:型で指定した場合,

$ [@

上のようなコマンドラインを入力した時点で
「-bash: -: 構文エラー: オペランドが予期されます (エラーのあるトークンは "-")」
という警告が発生し,それ以降,何かキーを入力する度に同様の警告が発生します。
また,[コマンドではなくtestコマンドを入力した際は,通常通り入力できました。


現在,以下のような配色設定をble.shの設定ファイルで行なっています(再現する最小の構成を抜粋; 2行目をface:型の指定にしないことで上述の不具合は生じなくなる)。

ble-color-setface syntax_command           bold,fg=green
ble-color-setface command_builtin          face:syntax_command

なお,長い上に蛇足気味ですが,当該の不具合が生じた付近のログは以下になりました。

(入力: export PS4='+ ${BASH_SOURCE/#"${HOME}"/\~}:${FUNCNAME:+$FUNCNAME():}${LINENO}: '; set -o xtrace<Enter>)
(中略)
(入力: [)
+++ ~/share/blesh/ble.sh:ble/util/buffer.flush():1: _ble_util_buffer=()
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle.clock/.initialize
+++ ~/share/blesh/ble.sh:ble/util/idle.clock/.initialize():1: :
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle.clock/.restart
+++ ~/share/blesh/ble.sh:ble/util/idle.clock/.restart():1: :
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_start=65
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_is_first=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_processed=
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: :
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_key
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_next_time= _idle_next_itime= _idle_running= _idle_waiting=
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: for _idle_key in "${!_ble_util_idle_task[@]}"
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle/IS_IDLE
+++ ~/share/blesh/ble.sh:ble/util/idle/IS_IDLE():1: ble-decode/has-input
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: (( _ble_decode_input_count ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/util/is-stdin-ready
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/encoding:UTF-8/is-intermediate
+++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/is-intermediate():1: (( _ble_decode_byte__utf_8__mode ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble-decode-char/is-intermediate
+++ ~/share/blesh/ble.sh:ble-decode-char/is-intermediate():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_to_process=
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_status=I
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: case ${_idle_status::1} in
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: _idle_to_process=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_command=ble-complete/menu-filter.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: _idle_processed=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle.do/.call-task ble-complete/menu-filter.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local _command=ble-complete/menu-filter.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ble_util_idle_status=
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ble_util_idle_elapsed=0
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: builtin eval ble-complete/menu-filter.idle
++++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: ble-complete/menu-filter.idle
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/menu-filter.idle():1: ble/util/idle.wait-user-input
++++ ~/share/blesh/ble.sh:ble/util/idle.wait-user-input():1: [[ -n set ]]
++++ ~/share/blesh/ble.sh:ble/util/idle.wait-user-input():1: ble_util_idle_status=I
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/menu-filter.idle():1: [[ -n 1 ]]
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/menu-filter.idle():1: [[ -n '' ]]
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/menu-filter.idle():1: return
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ext=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: (( ext==148 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ -n I ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: _ble_util_idle_task[_idle_key]=I:ble-complete/menu-filter.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == [WS]* ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == R ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == [FEPC]* ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: return 1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: (( 1==148 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: for _idle_key in "${!_ble_util_idle_task[@]}"
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle/IS_IDLE
+++ ~/share/blesh/ble.sh:ble/util/idle/IS_IDLE():1: ble-decode/has-input
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: (( _ble_decode_input_count ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/util/is-stdin-ready
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/encoding:UTF-8/is-intermediate
+++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/is-intermediate():1: (( _ble_decode_byte__utf_8__mode ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble-decode-char/is-intermediate
+++ ~/share/blesh/ble.sh:ble-decode-char/is-intermediate():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_to_process=
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_status=I
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: case ${_idle_status::1} in
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: _idle_to_process=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local _idle_command=ble-complete/auto-complete.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: _idle_processed=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle.do/.call-task ble-complete/auto-complete.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local _command=ble-complete/auto-complete.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ble_util_idle_status=
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ble_util_idle_elapsed=0
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: builtin eval ble-complete/auto-complete.idle
++++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: ble-complete/auto-complete.idle
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: ble/util/idle.wait-user-input
++++ ~/share/blesh/ble.sh:ble/util/idle.wait-user-input():1: [[ -n set ]]
++++ ~/share/blesh/ble.sh:ble/util/idle.wait-user-input():1: ble_util_idle_status=I
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: [[ -n 1 ]]
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: [[ vi_imap == emacs ]]
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: [[ vi_imap == vi_[ic]map ]]
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: case $_ble_decode_widget_last in
++++ ~/share/blesh/lib/core-complete.sh:ble-complete/auto-complete.idle():1: return 0
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: local ext=0
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: (( ext==148 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ -n I ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: _ble_util_idle_task[_idle_key]=I:ble-complete/auto-complete.idle
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == [WS]* ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == R ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: [[ I == [FEPC]* ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.call-task():1: return 0
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: (( 0==148 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: _idle_is_first=
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: ble/util/idle.do/.sleep-until-next
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: ble/util/idle/IS_IDLE
+++ ~/share/blesh/ble.sh:ble/util/idle/IS_IDLE():1: ble-decode/has-input
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: (( _ble_decode_input_count ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/util/is-stdin-ready
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/encoding:UTF-8/is-intermediate
+++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/is-intermediate():1: (( _ble_decode_byte__utf_8__mode ))
+++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble-decode-char/is-intermediate
+++ ~/share/blesh/ble.sh:ble-decode-char/is-intermediate():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: local isfirst=1
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: local sleep_amount=
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do/.sleep-until-next():1: (( sleep_amount>0 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: local ext=0
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: (( ext==148 ))
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: break
+++ ~/share/blesh/ble.sh:ble/util/idle.do():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/.tail():1: ble/textarea#render
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: local caret_state=0:0:::
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: [[ -1 -lt 0 ]]
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: [[ ! -n '' ]]
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: [[ 0:0::: == \0\:\0\:\:\: ]]
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/textarea#focus
+++ ~/share/blesh/ble.sh:ble/textarea#focus():1: DRAW_BUFF=()
+++ ~/share/blesh/ble.sh:ble/textarea#focus():1: local -a DRAW_BUFF
+++ ~/share/blesh/ble.sh:ble/textarea#focus():1: ble/canvas/panel#goto.draw 0 2 1
+++ ~/share/blesh/ble.sh:ble/canvas/panel#goto.draw():1: local index=0 x=2 y=1 ret
+++ ~/share/blesh/ble.sh:ble/canvas/panel#goto.draw():1: ble/arithmetic/sum
+++ ~/share/blesh/ble.sh:ble/arithmetic/sum():1: IFS=+
+++ ~/share/blesh/ble.sh:ble/arithmetic/sum():1: eval 'let "ret=$*+0"'
++++ ~/share/blesh/ble.sh:ble/arithmetic/sum():1: let ret=+0
+++ ~/share/blesh/ble.sh:ble/canvas/panel#goto.draw():1: ble/canvas/goto.draw 2 1
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: local -i x=2 y=1
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: ble/canvas/put.draw ''
+++ ~/share/blesh/ble.sh:ble/canvas/put.draw():1: DRAW_BUFF[${#DRAW_BUFF[*]}]=''
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: local -i dy=y-_ble_canvas_y
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: (( dy!=0 ))
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: local -i dx=x-_ble_canvas_x
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: (( dx!=0 ))
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: _ble_canvas_x=2
+++ ~/share/blesh/ble.sh:ble/canvas/goto.draw():1: _ble_canvas_y=1
+++ ~/share/blesh/ble.sh:ble/textarea#focus():1: ble/canvas/bflush.draw
+++ ~/share/blesh/ble.sh:ble/canvas/bflush.draw():1: IFS=
+++ ~/share/blesh/ble.sh:ble/canvas/bflush.draw():1: builtin eval 'ble/util/buffer "${DRAW_BUFF[*]}"'
++++ ~/share/blesh/ble.sh:ble/canvas/bflush.draw():1: ble/util/buffer ''
++++ ~/share/blesh/ble.sh:ble/util/buffer():1: _ble_util_buffer[${#_ble_util_buffer[@]}]=''
+++ ~/share/blesh/ble.sh:ble/canvas/bflush.draw():1: DRAW_BUFF=()
+++ ~/share/blesh/ble.sh:ble/textarea#render():1: return
+++ ~/share/blesh/ble.sh:ble-edit/bind/.tail():1: ble/textarea#adjust-for-bash-bind
+++ ~/share/blesh/ble.sh:ble/textarea#adjust-for-bash-bind():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/textarea#adjust-for-bash-bind():1: PS1=
+++ ~/share/blesh/ble.sh:ble/textarea#adjust-for-bash-bind():1: READLINE_LINE='
'
+++ ~/share/blesh/ble.sh:ble/textarea#adjust-for-bash-bind():1: READLINE_POINT=0
+++ ~/share/blesh/ble.sh:ble-edit/bind/.tail():1: ble-edit/bind/stdout.off
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout.off():1: ble/util/buffer.flush
+++ ~/share/blesh/ble.sh:ble/util/buffer.flush():1: IFS=
+++ ~/share/blesh/ble.sh:ble/util/buffer.flush():1: builtin eval 'builtin echo -n "${_ble_util_buffer[*]-}"'
++++ ~/share/blesh/ble.sh:ble/util/buffer.flush():1: builtin echo -n ''
+++ ~/share/blesh/ble.sh:ble/util/buffer.flush():1: _ble_util_buffer=()
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout.off():1: ble-edit/bind/stdout/check-stderr
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: local file=/run/user/1000/blesh/16760.stderr
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: ble/is-function ble/term/visible-bell
+++ ~/share/blesh/ble.sh:ble/is-function():1: builtin declare -F ble/term/visible-bell
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: [[ -f /run/user/1000/blesh/16760.stderr ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: [[ -s /run/user/1000/blesh/16760.stderr ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: local message= line
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: IFS=
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: builtin read -r line
 ]]
 == \b\a\s\h\:\ * ]]
 == \b\a\s\h\:\ * ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: IFS=
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: builtin read -r line
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout/check-stderr():1: :
+++ ~/share/blesh/ble.sh:ble-edit/bind/stdout.off():1: exec
++ ~/share/blesh/ble.sh:ble-edit/bind/.head():1: [[ -n 1 ]]
++ ~/share/blesh/ble.sh:ble-decode/PROLOGUE():1: ble-decode-bind/uvw
++ ~/share/blesh/ble.sh:ble-decode-bind/uvw():1: [[ -n 1 ]]
++ ~/share/blesh/ble.sh:ble-decode-bind/uvw():1: return
++ ~/share/blesh/ble.sh:ble-decode/PROLOGUE():1: ble/term/enter
++ ~/share/blesh/ble.sh:ble/term/enter():1: [[ internal == internal ]]
++ ~/share/blesh/ble.sh:ble/term/enter():1: return
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: (( _ble_decode_input_count>=100 ))
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: local c
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: for c in "${chars[@]}"
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: (( --_ble_decode_input_count ))
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: (( _ble_keylogger_enabled ))
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: ble/encoding:UTF-8/decode 91
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: local code=27
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: local mode=0
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: local byte=91
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: local cha0= char=
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: (( 
    byte&=0xFF,
    (mode!=0&&(byte&0xC0)!=0x80)&&(
      cha0=_ble_decode_Erro|code,mode=0
    ),
    byte<0xF0?(
      byte<0xC0?(
        byte<0x80?(
          char=byte
        ):(
          mode==0?(
            char=_ble_decode_Erro|byte
          ):(
            code=code<<6|byte&0x3F,
            --mode==0&&(char=code)
          )
        )
      ):(
        byte<0xE0?(
          code=byte&0x1F,mode=1
        ):(
          code=byte&0x0F,mode=2
        )
      )
    ):(
      byte<0xFC?(
        byte<0xF8?(
          code=byte&0x07,mode=3
        ):(
          code=byte&0x03,mode=4
        )
      ):(
        byte<0xFE?(
          code=byte&0x01,mode=5
        ):(
          char=_ble_decode_Erro|byte
        )
      )
    )
   ))
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: _ble_decode_byte__utf_8__code=27
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: _ble_decode_byte__utf_8__mode=0
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: CHARS=($cha0 $char)
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: local -a CHARS
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: (( 1 ))
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/decode():1: ble-decode-char 91
++ ~/share/blesh/ble.sh:ble-decode-char():1: (( 1 ))
++ ~/share/blesh/ble.sh:ble-decode-char():1: local char=91
++ ~/share/blesh/ble.sh:ble-decode-char():1: shift
++ ~/share/blesh/ble.sh:ble-decode-char():1: (( _ble_keylogger_enabled ))
++ ~/share/blesh/ble.sh:ble-decode-char():1: (( char&_ble_decode_Erro ))
++ ~/share/blesh/ble.sh:ble-decode-char():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-char():1: local ent
++ ~/share/blesh/ble.sh:ble-decode-char():1: ble-decode-char/.getent
++ ~/share/blesh/ble.sh:ble-decode-char/.getent():1: builtin eval 'ent=${_ble_decode_cmap_[char]-}'
+++ ~/share/blesh/ble.sh:ble-decode-char/.getent():1: ent=
++ ~/share/blesh/ble.sh:ble-decode-char/.getent():1: local csistat=
++ ~/share/blesh/ble.sh:ble-decode-char/.getent():1: ble-decode-char/csi/consume 91
++ ~/share/blesh/ble.sh:ble-decode-char/csi/consume():1: csistat=
++ ~/share/blesh/ble.sh:ble-decode-char/csi/consume():1: (( _ble_decode_csi_mode==0&&91!=27&&91!=155 ))
++ ~/share/blesh/ble.sh:ble-decode-char/csi/consume():1: return 1
++ ~/share/blesh/ble.sh:ble-decode-char/.getent():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-char():1: [[ ! -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-char():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-char():1: ble-decode-char/.send-modified-key 91
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: local kcode=91
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: (( kcode==_ble_decode_KCODE_IGNORE ))
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: (( 0<=kcode&&kcode<32 ))
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: (( 91==27 ))
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: (( 91==_ble_decode_IsolatedESC ))
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: (( _ble_decode_KCODE_SHIFT<=91&&91<=_ble_decode_KCODE_HYPER ))
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-char/.send-modified-key():1: ble-decode-key 91
++ ~/share/blesh/ble.sh:ble-decode-key():1: local key
++ ~/share/blesh/ble.sh:ble-decode-key():1: for key in "$@"
++ ~/share/blesh/ble.sh:ble-decode-key():1: (( _ble_keylogger_enabled ))
++ ~/share/blesh/ble.sh:ble-decode-key():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-key():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-key():1: local dicthead=_ble_decode_vi_imap_kmap_
++ ~/share/blesh/ble.sh:ble-decode-key():1: builtin eval 'local ent=${_ble_decode_vi_imap_kmap_[key]-}'
+++ ~/share/blesh/ble.sh:ble-decode-key():1: local ent=
++ ~/share/blesh/ble.sh:ble-decode-key():1: [[ '' == 1:* ]]
++ ~/share/blesh/ble.sh:ble-decode-key():1: [[ '' == _ ]]
++ ~/share/blesh/ble.sh:ble-decode-key():1: [[ '' == _:* ]]
++ ~/share/blesh/ble.sh:ble-decode-key():1: ble-decode-key/.invoke-partial-match 91
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local dicthead=_ble_decode_vi_imap_kmap_
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local next=91
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local key=91
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: ble-decode-key/ischar 91
++ ~/share/blesh/ble.sh:ble-decode-key/ischar():1: local key=91
++ ~/share/blesh/ble.sh:ble-decode-key/ischar():1: (( (key&_ble_decode_MaskFlag)==0&&32<=key&&key<_ble_decode_FunctionKeyBase ))
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: ble-decode/has-input
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: (( _ble_decode_input_count ))
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/util/is-stdin-ready
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/encoding:UTF-8/is-intermediate
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/is-intermediate():1: (( _ble_decode_byte__utf_8__mode ))
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble-decode-char/is-intermediate
++ ~/share/blesh/ble.sh:ble-decode-char/is-intermediate():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: builtin eval 'local command=${_ble_decode_vi_imap_kmap_[1114113]-}'
+++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local command=1:ble/widget/self-insert
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: command=ble/widget/self-insert
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: [[ -n ble/widget/self-insert ]]
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local seq_save=
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: ble-decode/widget/.call-keyseq
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: ble-decode-key/batch/flush
++ ~/share/blesh/ble.sh:ble-decode-key/batch/flush():1: (( 0 ))
++ ~/share/blesh/ble.sh:ble-decode-key/batch/flush():1: return
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: [[ -n ble/widget/self-insert ]]
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: local old_suppress=0
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: local _ble_decode_keylog_depth=1
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: local WIDGET=ble/widget/self-insert KEYMAP=vi_imap 'LASTWIDGET=ble/widget/vi_imap/accept-single-line-or vi_imap/newline'
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: KEYS=(${_ble_decode_key__seq//_/ } $key)
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: local -a KEYS
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: _ble_decode_widget_last=ble/widget/self-insert
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: _ble_decode_key__seq=
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: ble-decode/widget/.invoke-hook 1114115
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local kcode=1114115
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local dicthead=_ble_decode_vi_imap_kmap_
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: builtin eval 'local hook=${_ble_decode_vi_imap_kmap_[kcode]-}'
+++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local hook=1:ble/widget/vi_imap/__before_widget__
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: hook=ble/widget/vi_imap/__before_widget__
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: [[ -n ble/widget/vi_imap/__before_widget__ ]]
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: builtin eval -- ble/widget/vi_imap/__before_widget__
+++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: ble/widget/vi_imap/__before_widget__
+++ ~/share/blesh/keymap/vi.sh:ble/widget/vi_imap/__before_widget__():1: ble/keymap:vi/imap/is-command-white ble/widget/self-insert
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/imap/is-command-white():1: [[ ble/widget/self-insert == ble/widget/self-insert ]]
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/imap/is-command-white():1: return 0
+++ ~/share/blesh/keymap/vi.sh:ble/widget/vi_imap/__before_widget__():1: ble/keymap:vi/imap-repeat/push
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/imap-repeat/push():1: ble/array#push _ble_keymap_vi_irepeat 91:ble/widget/self-insert
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval '_ble_keymap_vi_irepeat+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: _ble_keymap_vi_irepeat+=("${@:2}")
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: builtin eval -- ble/widget/self-insert
+++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: ble/widget/self-insert
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: local code=91
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: (( code==0 ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: local ibeg=0 iend=0
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: local ret ins
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: ble/util/c2s 91
+++ ~/share/blesh/ble.sh:ble/util/c2s():1: [[ ::ja_JP.UTF-8 != \:\:\j\a\_\J\P\.\U\T\F\-\8 ]]
+++ ~/share/blesh/ble.sh:ble/util/c2s():1: ret=
+++ ~/share/blesh/ble.sh:ble/util/c2s():1: [[ ! -n '' ]]
+++ ~/share/blesh/ble.sh:ble/util/c2s():1: ble/util/c2s-impl 91
+++ ~/share/blesh/ble.sh:ble/util/c2s-impl():1: builtin printf -v ret '\\U%08x' 91
+++ ~/share/blesh/ble.sh:ble/util/c2s-impl():1: builtin eval 'ret=$'\''\U0000005b'\'''
++++ ~/share/blesh/ble.sh:ble/util/c2s-impl():1: ret='['
+++ ~/share/blesh/ble.sh:ble/util/c2s():1: _ble_util_c2s_table[$1]='['
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: ins='['
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: local arg
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: ble-edit/content/get-arg 1
+++ ~/share/blesh/ble.sh:ble-edit/content/get-arg():1: local default_value=1
+++ ~/share/blesh/ble.sh:ble-edit/content/get-arg():1: [[ '' == -* ]]
+++ ~/share/blesh/ble.sh:ble-edit/content/get-arg():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/content/get-arg():1: arg=1
+++ ~/share/blesh/ble.sh:ble-edit/content/get-arg():1: _ble_edit_arg=
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: (( arg<0 ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: (( arg==0 ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: [[ ! -n [ ]]
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: (( arg>1 ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: ble-edit/content/replace 0 0 '['
+++ ~/share/blesh/ble.sh:ble-edit/content/replace():1: local -i beg=0 end=0
+++ ~/share/blesh/ble.sh:ble-edit/content/replace():1: local 'ins=[' reason=edit
+++ ~/share/blesh/ble.sh:ble-edit/content/replace():1: _ble_edit_str='['
+++ ~/share/blesh/ble.sh:ble-edit/content/replace():1: ble-edit/content/.update-dirty-range 0 1 0 edit
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: ble/dirty-range#update --prefix=_ble_edit_dirty_draw_ 0 1 0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local _prefix=
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ --prefix=_ble_edit_dirty_draw_ == --prefix=* ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: _prefix=_ble_edit_dirty_draw_
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: shift
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_edit_dirty_draw_ ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local beg end end0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begB=0 endB=1 endB0=0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begB<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begA endA endA0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA=_ble_edit_dirty_draw_beg,endA=_ble_edit_dirty_draw_end,endA0=_ble_edit_dirty_draw_end0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local delta
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( beg=begB,
      end=endB,
      end0=endB0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_edit_dirty_draw_ ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( _ble_edit_dirty_draw_beg=beg,
      _ble_edit_dirty_draw_end=end,
      _ble_edit_dirty_draw_end0=end0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: ble/dirty-range#update --prefix=_ble_edit_dirty_syntax_ 0 1 0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local _prefix=
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ --prefix=_ble_edit_dirty_syntax_ == --prefix=* ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: _prefix=_ble_edit_dirty_syntax_
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: shift
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_edit_dirty_syntax_ ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local beg end end0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begB=0 endB=1 endB0=0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begB<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begA endA endA0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA=_ble_edit_dirty_syntax_beg,endA=_ble_edit_dirty_syntax_end,endA0=_ble_edit_dirty_syntax_end0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local delta
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( beg=begB,
      end=endB,
      end0=endB0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_edit_dirty_syntax_ ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( _ble_edit_dirty_syntax_beg=beg,
      _ble_edit_dirty_syntax_end=end,
      _ble_edit_dirty_syntax_end0=end0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: ble/textmap#update-dirty-range 0 1 0
+++ ~/share/blesh/ble.sh:ble/textmap#update-dirty-range():1: ble/dirty-range#update --prefix=_ble_textmap_d 0 1 0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local _prefix=
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ --prefix=_ble_textmap_d == --prefix=* ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: _prefix=_ble_textmap_d
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: shift
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_textmap_d ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local beg end end0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begB=0 endB=1 endB0=0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begB<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begA endA endA0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA=_ble_textmap_dbeg,endA=_ble_textmap_dend,endA0=_ble_textmap_dend0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local delta
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( beg=begB,
      end=endB,
      end0=endB0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_textmap_d ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( _ble_textmap_dbeg=beg,
      _ble_textmap_dend=end,
      _ble_textmap_dend0=end0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: local obs
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: for obs in "${_ble_edit_dirty_observer[@]}"
+++ ~/share/blesh/ble.sh:ble-edit/content/.update-dirty-range():1: ble/keymap:vi/mark/shift-by-dirty-range 0 1 0 edit
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: local beg=0 end=1 end0=0 reason=edit
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: [[ edit == edit ]]
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: ble/dirty-range#update --prefix=_ble_keymap_vi_mark_edit_d 0 1 0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local _prefix=
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ --prefix=_ble_keymap_vi_mark_edit_d == --prefix=* ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: _prefix=_ble_keymap_vi_mark_edit_d
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: shift
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_keymap_vi_mark_edit_d ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local beg end end0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begB=0 endB=1 endB0=0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begB<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local begA endA endA0
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA=_ble_keymap_vi_mark_edit_dbeg,endA=_ble_keymap_vi_mark_edit_dend,endA0=_ble_keymap_vi_mark_edit_dend0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: local delta
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( begA<0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( beg=begB,
      end=endB,
      end0=endB0 ))
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: [[ -n _ble_keymap_vi_mark_edit_d ]]
+++ ~/share/blesh/ble.sh:ble/dirty-range#update():1: (( _ble_keymap_vi_mark_edit_dbeg=beg,
      _ble_keymap_vi_mark_edit_dend=end,
      _ble_keymap_vi_mark_edit_dend0=end0 ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: ble/keymap:vi/xmap/update-dirty-range 0 1 0 edit
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/xmap/update-dirty-range():1: [[ '' == ble/widget/vi_xmap/block-insert-mode.onleave ]]
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: ble/keymap:vi/mark/update-mark-history
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local h
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble-edit/history/get-index -v h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: local _var=index
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -v == -v ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: _var=h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: shift 2
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: (( h=_ble_edit_history_ind ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: [[ ! -n 7016 ]]
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: (( _ble_keymap_vi_mark_hindex!=h ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local imark value
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: save=()
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local -a save
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: for imark in "${!_ble_keymap_vi_mark_local[@]}"
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local value=0:95
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble/array#push save 34:0:95
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval 'save+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: save+=("${@:2}")
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: for imark in "${!_ble_keymap_vi_mark_local[@]}"
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local value=0:1
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble/array#push save 46:0:1
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval 'save+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: save+=("${@:2}")
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: for imark in "${!_ble_keymap_vi_mark_local[@]}"
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local value=95:0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble/array#push save 91:95:0
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval 'save+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: save+=("${@:2}")
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: for imark in "${!_ble_keymap_vi_mark_local[@]}"
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local value=95:0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble/array#push save 93:95:0
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval 'save+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: save+=("${@:2}")
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: for imark in "${!_ble_keymap_vi_mark_local[@]}"
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local value=0:0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble/array#push save 96:0:0
+++ ~/share/blesh/ble.sh:ble/array#push():1: builtin eval 'save+=("${@:2}")'
++++ ~/share/blesh/ble.sh:ble/array#push():1: save+=("${@:2}")
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: _ble_keymap_vi_mark_history[_ble_keymap_vi_mark_hindex]='34:0:95 46:0:1 91:95:0 93:95:0 96:0:0'
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: _ble_keymap_vi_mark_local=()
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local entry
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: _ble_keymap_vi_mark_hindex=7017
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: local shift=1
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: local imark
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: local h
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: ble-edit/history/get-index -v h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: local _var=index
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -v == -v ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: _var=h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: shift 2
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: (( h=_ble_edit_history_ind ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/shift-by-dirty-range():1: ble/keymap:vi/mark/set-local-mark 46 0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/set-local-mark():1: local c=46 index=0 ret
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/set-local-mark():1: ble/keymap:vi/mark/update-mark-history
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: local h
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: ble-edit/history/get-index -v h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: local _var=index
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -v == -v ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: _var=h
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: shift 2
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n '' ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: [[ -n 1 ]]
+++ ~/share/blesh/ble.sh:ble-edit/history/get-index():1: (( h=_ble_edit_history_ind ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: [[ ! -n 7017 ]]
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/update-mark-history():1: (( _ble_keymap_vi_mark_hindex!=h ))
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/set-local-mark():1: ble-edit/content/find-logical-bol 0
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: local index=0 offset=0
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: (( offset>0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: (( offset<0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: local text=
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: text=
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: (( ret=index-0 ))
+++ ~/share/blesh/ble.sh:ble-edit/content/find-logical-bol():1: return 0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/set-local-mark():1: local bol=0
+++ ~/share/blesh/keymap/vi.sh:ble/keymap:vi/mark/set-local-mark():1: _ble_keymap_vi_mark_local[c]=0:0
+++ ~/share/blesh/ble.sh:ble-edit/content/replace():1: (( 0<=_ble_edit_dirty_syntax_beg&&_ble_edit_dirty_syntax_end<=1 ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: (( _ble_edit_ind+=1,
    _ble_edit_mark>ibeg&&(
      _ble_edit_mark<iend?(
        _ble_edit_mark=_ble_edit_ind
      ):(
        _ble_edit_mark+=1-(iend-ibeg))) ))
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: _ble_edit_mark_active=
+++ ~/share/blesh/ble.sh:ble/widget/self-insert():1: return 0
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: local ext=0
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: ble-decode/widget/.invoke-hook 1114116
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local kcode=1114116
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local dicthead=_ble_decode_vi_imap_kmap_
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: builtin eval 'local hook=${_ble_decode_vi_imap_kmap_[kcode]-}'
+++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: local hook=
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: hook=
++ ~/share/blesh/ble.sh:ble-decode/widget/.invoke-hook():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode/widget/.call-keyseq():1: return 0
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: local ext=0
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: (( ext!=125 ))
++ ~/share/blesh/ble.sh:ble-decode-key/.invoke-partial-match():1: return
++ ~/share/blesh/ble.sh:ble-decode-key():1: continue
++ ~/share/blesh/ble.sh:ble-decode-key():1: (( 0 ))
++ ~/share/blesh/ble.sh:ble-decode-key():1: return 0
++ ~/share/blesh/ble.sh:ble-decode-char():1: (( 0 ))
++ ~/share/blesh/ble.sh:ble-decode-char():1: return 0
++ ~/share/blesh/ble.sh:ble-decode/.hook():1: ble-decode/EPILOGUE
++ ~/share/blesh/ble.sh:ble-decode/EPILOGUE():1: (( _ble_bash>=40000 ))
++ ~/share/blesh/ble.sh:ble-decode/EPILOGUE():1: ble-decode/has-input
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: (( _ble_decode_input_count ))
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/util/is-stdin-ready
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble/encoding:UTF-8/is-intermediate
++ ~/share/blesh/ble.sh:ble/encoding:UTF-8/is-intermediate():1: (( _ble_decode_byte__utf_8__mode ))
++ ~/share/blesh/ble.sh:ble-decode/has-input():1: ble-decode-char/is-intermediate
++ ~/share/blesh/ble.sh:ble-decode-char/is-intermediate():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble-decode/EPILOGUE():1: ble-edit/exec:gexec/process
++ ~/share/blesh/ble.sh:ble-edit/exec:gexec/process():1: ble-edit/exec:gexec/.setup
++ ~/share/blesh/ble.sh:ble-edit/exec:gexec/.setup():1: (( 0==0 ))
++ ~/share/blesh/ble.sh:ble-edit/exec:gexec/.setup():1: return 1
++ ~/share/blesh/ble.sh:ble-edit/exec:gexec/process():1: return 1
++ ~/share/blesh/ble.sh:ble-decode/EPILOGUE():1: ble-edit/bind/.tail
++ ~/share/blesh/ble.sh:ble-edit/bind/.tail():1: ble-edit/info/reveal
++ ~/share/blesh/ble.sh:ble-edit/info/reveal():1: [[ default == default ]]
++ ~/share/blesh/ble.sh:ble-edit/info/reveal():1: ble-edit/info/.render-content 12 0 '-- INSERT --'
++ ~/share/blesh/ble.sh:ble-edit/info/.render-content():1: local x=12 y=0 'content=-- INSERT --'
++ ~/share/blesh/ble.sh:ble-edit/info/.render-content():1: [[ -- INSERT -- == \[\0\;\1\m\-\-\ \I\N\S\E\R\T\ \-\-\(\B\[\m ]]
++ ~/share/blesh/ble.sh:ble-edit/info/.render-content():1: return
++ ~/share/blesh/ble.sh:ble-edit/bind/.tail():1: ble/textarea#render
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local caret_state=1:0:::
++ ~/share/blesh/ble.sh:ble/textarea#render():1: [[ 0 -lt 0 ]]
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local ret
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local x y g lc lg=0
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble-edit/prompt/update
++ ~/share/blesh/ble.sh:ble-edit/prompt/update():1: local version=1
++ ~/share/blesh/ble.sh:ble-edit/prompt/update():1: [[ 1 == \1 ]]
++ ~/share/blesh/ble.sh:ble-edit/prompt/update():1: ble-edit/prompt/.load
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: x=2
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: y=1
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: g=0
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: lc=32
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: lg=0
++ ~/share/blesh/ble.sh:ble-edit/prompt/.load():1: ret='~
$ '
++ ~/share/blesh/ble.sh:ble-edit/prompt/update():1: return
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local prox=2 proy=1 prolc=32 'esc_prompt=~
$ '
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local -a BLELINE_RANGE_UPDATE
++ ~/share/blesh/ble.sh:ble/textarea#render():1: BLELINE_RANGE_UPDATE=("$_ble_edit_dirty_draw_beg" "$_ble_edit_dirty_draw_end" "$_ble_edit_dirty_draw_end0")
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/dirty-range#clear --prefix=_ble_edit_dirty_draw_
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: local _prefix=
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: [[ --prefix=_ble_edit_dirty_draw_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: _prefix=_ble_edit_dirty_draw_
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: shift
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: (( _ble_edit_dirty_draw_beg=-1,
    _ble_edit_dirty_draw_end=-1,
    _ble_edit_dirty_draw_end0=-1 ))
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble-assert '((BLELINE_RANGE_UPDATE[0]<0||(
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[1]&&
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[2])))' '(0 1 0)'
++ ~/share/blesh/ble.sh:ble-assert():1: local 'expr=((BLELINE_RANGE_UPDATE[0]<0||(
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[1]&&
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[2])))'
++ ~/share/blesh/ble.sh:ble-assert():1: local '_ble_stackdump_title=assertion failure'
++ ~/share/blesh/ble.sh:ble-assert():1: builtin eval -- '((BLELINE_RANGE_UPDATE[0]<0||(
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[1]&&
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[2])))'
+++ ~/share/blesh/ble.sh:ble-assert():1: (( BLELINE_RANGE_UPDATE[0]<0||(
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[1]&&
       BLELINE_RANGE_UPDATE[0]<=BLELINE_RANGE_UPDATE[2]) ))
++ ~/share/blesh/ble.sh:ble-assert():1: return 0
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local 'text=[' index=1
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local iN=1
++ ~/share/blesh/ble.sh:ble/textarea#render():1: (( index<0?(index=0):(index>iN&&(index=iN)) ))
++ ~/share/blesh/ble.sh:ble/textarea#render():1: local umin=-1 umax=-1
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/textmap#update
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local 'IFS= 	
'
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local dbeg dend dend0
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( dbeg=_ble_textmap_dbeg,
    dend=_ble_textmap_dend,
    dend0=_ble_textmap_dend0 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/dirty-range#clear --prefix=_ble_textmap_d
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: local _prefix=
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: [[ --prefix=_ble_textmap_d == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: _prefix=_ble_textmap_d
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: shift
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: (( _ble_textmap_dbeg=-1,
    _ble_textmap_dend=-1,
    _ble_textmap_dend0=-1 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local iN=1
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local '_pos=2 1'
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_begx=2
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_begy=1
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local cols=178 xenl=1
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( COLUMNS&&cols<COLUMNS&&(xenl=1) ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local it=8
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/string#reserve-prototype 8
++ ~/share/blesh/ble.sh:ble/string#reserve-prototype():1: local -i n=8 c
++ ~/share/blesh/ble.sh:ble/string#reserve-prototype():1: (( c=8 ))
++ ~/share/blesh/ble.sh:ble/string#reserve-prototype():1: (( c<n ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( cols!=_ble_textmap_cols ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: [[ 2 1 != \2\ \1 ]]
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( dbeg<0 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( dbeg>0 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_cols=178
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_length=1
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble-assert '((dbeg<0||(dbeg<=dend&&dbeg<=dend0)))' '(0 1 0) <- (-1 -1 -1)'
++ ~/share/blesh/ble.sh:ble-assert():1: local 'expr=((dbeg<0||(dbeg<=dend&&dbeg<=dend0)))'
++ ~/share/blesh/ble.sh:ble-assert():1: local '_ble_stackdump_title=assertion failure'
++ ~/share/blesh/ble.sh:ble-assert():1: builtin eval -- '((dbeg<0||(dbeg<=dend&&dbeg<=dend0)))'
+++ ~/share/blesh/ble.sh:ble-assert():1: (( dbeg<0||(dbeg<=dend&&dbeg<=dend0) ))
++ ~/share/blesh/ble.sh:ble-assert():1: return 0
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/array#reserve-prototype 1
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: local -i n=1 i
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i=95 ))
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local -a old_pos old_ichg
++ ~/share/blesh/ble.sh:ble/textmap#update():1: old_pos=("${_ble_textmap_pos[@]:dend0:iN-dend+1}")
++ ~/share/blesh/ble.sh:ble/textmap#update():1: old_ichg=("${_ble_textmap_ichg[@]}")
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_pos=("${_ble_textmap_pos[@]::dbeg+1}" "${_ble_array_prototype[@]::dend-dbeg}" "${_ble_textmap_pos[@]:dend0+1:iN-dend}")
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_glyph=("${_ble_textmap_glyph[@]::dbeg}" "${_ble_array_prototype[@]::dend-dbeg}" "${_ble_textmap_glyph[@]:dend0:iN-dend}")
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_ichg=()
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/urange#shift --prefix=_ble_textmap_ 0 1 0
++ ~/share/blesh/ble.sh:ble/urange#shift():1: local prefix=
++ ~/share/blesh/ble.sh:ble/urange#shift():1: [[ --prefix=_ble_textmap_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/urange#shift():1: prefix=_ble_textmap_
++ ~/share/blesh/ble.sh:ble/urange#shift():1: shift
++ ~/share/blesh/ble.sh:ble/urange#shift():1: local dbeg=0 dend=1 dend0=0 shift=
++ ~/share/blesh/ble.sh:ble/urange#shift():1: (( dbeg>=0 ))
++ ~/share/blesh/ble.sh:ble/urange#shift():1: [[ -n '' ]]
++ ~/share/blesh/ble.sh:ble/urange#shift():1: (( shift=dend-dend0 ))
++ ~/share/blesh/ble.sh:ble/urange#shift():1: (( _ble_textmap_umin>=0&&(
      dbeg<=_ble_textmap_umin&&(_ble_textmap_umin<=dend0?(_ble_textmap_umin=dend):(_ble_textmap_umin+=shift)),
      dbeg<=_ble_textmap_umax&&(_ble_textmap_umax<=dend0?(_ble_textmap_umax=dbeg):(_ble_textmap_umax+=shift))),
    _ble_textmap_umin<_ble_textmap_umax||(
      _ble_textmap_umin=-1,
      _ble_textmap_umax=-1) ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local i
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i=dbeg ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i<iN ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/util/isprint+ '['
++ ~/share/blesh/ble.sh:ble/util/isprint+():1: LC_COLLATE=C
++ ~/share/blesh/ble.sh:ble/util/isprint+():1: ble/util/isprint+.impl '['
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local w=1
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local n
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( n=i+w ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local 'cs=['
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( (++x==cols)&&(y++,x=0,xenl) ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_glyph[i]='['
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_pos[i+1]='3 1 0'
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i++ ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i>=dend ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: [[ 2 1 == \3\ \1\ \0 ]]
++ ~/share/blesh/ble.sh:ble/textmap#update():1: [[ 2 == \3 ]]
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( 1 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i<iN ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( i<iN ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: local j jN ichg
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( j=0,jN=0 ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( j<jN ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: (( dbeg<i ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: ble/urange#update --prefix=_ble_textmap_ 0 1
++ ~/share/blesh/ble.sh:ble/urange#update():1: local prefix=
++ ~/share/blesh/ble.sh:ble/urange#update():1: [[ --prefix=_ble_textmap_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/urange#update():1: prefix=_ble_textmap_
++ ~/share/blesh/ble.sh:ble/urange#update():1: shift
++ ~/share/blesh/ble.sh:ble/urange#update():1: local min=0 max=1
++ ~/share/blesh/ble.sh:ble/urange#update():1: (( 0<=min&&min<max ))
++ ~/share/blesh/ble.sh:ble/urange#update():1: (( (_ble_textmap_umin<0||min<_ble_textmap_umin)&&(_ble_textmap_umin=min),
    (_ble_textmap_umax<0||_ble_textmap_umax<max)&&(_ble_textmap_umax=max) ))
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_endx=3
++ ~/share/blesh/ble.sh:ble/textmap#update():1: _ble_textmap_endy=1
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/urange#update 0 1
++ ~/share/blesh/ble.sh:ble/urange#update():1: local prefix=
++ ~/share/blesh/ble.sh:ble/urange#update():1: [[ 0 == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/urange#update():1: local min=0 max=1
++ ~/share/blesh/ble.sh:ble/urange#update():1: (( 0<=min&&min<max ))
++ ~/share/blesh/ble.sh:ble/urange#update():1: (( (umin<0||min<umin)&&(umin=min),
    (umax<0||umax<max)&&(umax=max) ))
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/urange#clear --prefix=_ble_textmap_
++ ~/share/blesh/ble.sh:ble/urange#clear():1: local prefix=
++ ~/share/blesh/ble.sh:ble/urange#clear():1: [[ --prefix=_ble_textmap_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/urange#clear():1: prefix=_ble_textmap_
++ ~/share/blesh/ble.sh:ble/urange#clear():1: shift
++ ~/share/blesh/ble.sh:ble/urange#clear():1: (( _ble_textmap_umin=-1,_ble_textmap_umax=-1 ))
++ ~/share/blesh/ble.sh:ble/textarea#render():1: ble/textarea#update-text-buffer
++ ~/share/blesh/ble.sh:ble/textarea#update-text-buffer():1: local iN=1
++ ~/share/blesh/ble.sh:ble/textarea#update-text-buffer():1: local HIGHLIGHT_BUFF HIGHLIGHT_UMIN HIGHLIGHT_UMAX
++ ~/share/blesh/ble.sh:ble/textarea#update-text-buffer():1: ble-highlight-layer/update '['
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local 'text=['
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local -ir DMIN=0
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local -ir DMAX=1
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local -ir DMAX0=0
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local PREV_BUFF=_ble_highlight_layer_plain_buff
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local PREV_UMIN=-1
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local PREV_UMAX=-1
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local layer player=plain LEVEL
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: local nlevel=5
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: (( LEVEL=0 ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: (( LEVEL<nlevel ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: layer=plain
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: ble-highlight-layer:plain/update '[' plain
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( DMIN>=0 ))
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: ble-highlight-layer/update/shift _ble_highlight_layer_plain_buff
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __dstArray=_ble_highlight_layer_plain_buff
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __srcArray=_ble_highlight_layer_plain_buff
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: (( DMIN>=0 ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: ble/array#reserve-prototype 1
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: local -i n=1 i
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i=95 ))
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: builtin eval '
    _ble_highlight_layer_plain_buff=(
      "${_ble_highlight_layer_plain_buff[@]::DMIN}"
      "${_ble_array_prototype[@]::DMAX-DMIN}"
      "${_ble_highlight_layer_plain_buff[@]:DMAX0}")'
+++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: _ble_highlight_layer_plain_buff=("${_ble_highlight_layer_plain_buff[@]::DMIN}" "${_ble_array_prototype[@]::DMAX-DMIN}" "${_ble_highlight_layer_plain_buff[@]:DMAX0}")
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: local i 'text=[' ch
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: local it=8
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( i=DMIN ))
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( i<DMAX ))
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: ch='['
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: LC_COLLATE=C
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: ble-highlight-layer:plain/update/.getch
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: _ble_highlight_layer_plain_buff[i]='['
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( i++ ))
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( i<DMAX ))
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: PREV_BUFF=_ble_highlight_layer_plain_buff
++ ~/share/blesh/ble.sh:ble-highlight-layer:plain/update():1: (( PREV_UMIN=DMIN,PREV_UMAX=DMAX ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: player=plain
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: (( LEVEL++ ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: (( LEVEL<nlevel ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: layer=syntax
++ ~/share/blesh/ble.sh:ble-highlight-layer/update():1: ble-highlight-layer:syntax/update '[' plain
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: local 'text=[' player=plain
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: local i iN=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: ble-edit/content/update-syntax
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: ble/is-function ble-syntax/parse
++ ~/share/blesh/ble.sh:ble/is-function():1: builtin declare -F ble-syntax/parse
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: local beg end end0
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: ble/dirty-range#load --prefix=_ble_edit_dirty_syntax_
++ ~/share/blesh/ble.sh:ble/dirty-range#load():1: local _prefix=
++ ~/share/blesh/ble.sh:ble/dirty-range#load():1: [[ --prefix=_ble_edit_dirty_syntax_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/dirty-range#load():1: _prefix=_ble_edit_dirty_syntax_
++ ~/share/blesh/ble.sh:ble/dirty-range#load():1: (( beg=_ble_edit_dirty_syntax_beg,
      end=_ble_edit_dirty_syntax_end,
      end0=_ble_edit_dirty_syntax_end0 ))
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: (( beg>=0 ))
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: ble/dirty-range#clear --prefix=_ble_edit_dirty_syntax_
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: local _prefix=
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: [[ --prefix=_ble_edit_dirty_syntax_ == --prefix=* ]]
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: _prefix=_ble_edit_dirty_syntax_
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: shift
++ ~/share/blesh/ble.sh:ble/dirty-range#clear():1: (( _ble_edit_dirty_syntax_beg=-1,
    _ble_edit_dirty_syntax_end=-1,
    _ble_edit_dirty_syntax_end0=-1 ))
++ ~/share/blesh/ble.sh:ble-edit/content/update-syntax():1: ble-syntax/parse '[' 0 1 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local 'text=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local beg=0 end=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local end0=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( end==beg&&end0==beg&&_ble_syntax_dbeg<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local -ir iN=1 shift=end-end0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( 0<=beg&&beg<=end&&end<=iN&&beg<=end0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local i1 i2 j2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/parse/determine-parse-range
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: local flagSeekStat=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: (( i1=_ble_syntax_dbeg,i1>=end0&&(i1+=shift),
    i2=_ble_syntax_dend,i2>=end0&&(i2+=shift),
    (i1<0||beg<i1)&&(i1=beg,flagSeekStat=1),
    (i2<0||i2<end)&&(i2=end),
    (i2>iN)&&(i2=iN),
    j2=i2-shift ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: (( flagSeekStat ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: local 'lookahead=stat[7]'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: local -a stat
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: (( i1>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/determine-parse-range():1: (( 0<=i1&&i1<=beg&&end<=i2&&i2<=iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/vanishing-word/register _ble_syntax_tree 0 i1 j2 0 i1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local tree_array=_ble_syntax_tree tofs=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local -i beg=i1 end=j2 lbeg=0 lend=i1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( (beg<=0)&&(beg=1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local node i nofs
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( i=end ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( i>=beg ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/parse/shift
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift():1: ble-syntax/parse/shift.method2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: local iN=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: local _shift2_j=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: ble-syntax/tree-enumerate ble-syntax/parse/shift.impl2/.proc1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate():1: local root i nofs
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate():1: [[ -n set ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate():1: ble-syntax/tree-enumerate/.initialize
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: [[ ! -n 1 -1 -1 -1 -1 -1 none 1 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local -a stat nest
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: ble/string#split-words stat '1 -1 -1 -1 -1 -1 none 1'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'stat=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: stat=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local wtype=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local wlen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local nlen=-1 inest
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( inest=nlen<0?nlen:iN-nlen ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local tclen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: local tplen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: root=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( iN>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( wlen>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( inest>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( i=tclen>=0?iN-tclen:tclen ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.initialize():1: (( nofs=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate():1: ble-syntax/tree-enumerate/.impl ble-syntax/parse/shift.impl2/.proc1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local islast=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: (( i>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: local j=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.method2():1: ble-syntax/parse/shift.impl2/.shift-until 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: local limit=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: (( j>=limit ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: ble-syntax/parse/shift.stat
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: [[ -n 1 -1 -1 -1 -1 -1 none 1 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: local -a stat
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: ble/string#split-words stat '1 -1 -1 -1 -1 -1 none 1'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'stat=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: stat=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: local k klen kbeg
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: for k in 1 3 4 5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: (( (klen=stat[k])<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: continue
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: for k in 1 3 4 5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: (( (klen=stat[k])<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: continue
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: for k in 1 3 4 5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: (( (klen=stat[k])<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: continue
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: for k in 1 3 4 5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: (( (klen=stat[k])<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: continue
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.stat():1: _ble_syntax_stat[j]='1 -1 -1 -1 -1 -1 none 1'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: ble-syntax/parse/shift.nest
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.nest():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: (( j-- ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift.impl2/.shift-until():1: (( j>=limit ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift():1: (( shift!=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift():1: ble-syntax/urange#shift _ble_syntax_attr_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#shift():1: local prefix=_ble_syntax_attr_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#shift():1: (( _ble_syntax_attr_umin>=end0?(_ble_syntax_attr_umin+=shift):(
      _ble_syntax_attr_umin>=beg&&(_ble_syntax_attr_umin=end)),
    _ble_syntax_attr_umax>end0?(_ble_syntax_attr_umax+=shift):(
      _ble_syntax_attr_umax>beg&&(_ble_syntax_attr_umax=beg)),
    _ble_syntax_attr_umin>=_ble_syntax_attr_umax&&
      (_ble_syntax_attr_umin=_ble_syntax_attr_umax=-1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift():1: ble-syntax/wrange#shift _ble_syntax_word_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#shift():1: local prefix=_ble_syntax_word_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#shift():1: (( _ble_syntax_word_umin>=end0?(_ble_syntax_word_umin+=shift):(
       _ble_syntax_word_umin>beg&&(_ble_syntax_word_umin=end)),
    _ble_syntax_word_umax>=end0?(_ble_syntax_word_umax+=shift):(
      _ble_syntax_word_umax>=beg&&(_ble_syntax_word_umax=beg)),
    _ble_syntax_word_umin==0&&++_ble_syntax_word_umin,
    _ble_syntax_word_umin>_ble_syntax_word_umax&&
      (_ble_syntax_word_umin=_ble_syntax_word_umax=-1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/shift():1: ble-syntax/urange#shift _ble_syntax_vanishing_word_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#shift():1: local prefix=_ble_syntax_vanishing_word_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#shift():1: (( _ble_syntax_vanishing_word_umin>=end0?(_ble_syntax_vanishing_word_umin+=shift):(
      _ble_syntax_vanishing_word_umin>=beg&&(_ble_syntax_vanishing_word_umin=end)),
    _ble_syntax_vanishing_word_umax>end0?(_ble_syntax_vanishing_word_umax+=shift):(
      _ble_syntax_vanishing_word_umax>beg&&(_ble_syntax_vanishing_word_umax=beg)),
    _ble_syntax_vanishing_word_umin>=_ble_syntax_vanishing_word_umax&&
      (_ble_syntax_vanishing_word_umin=_ble_syntax_vanishing_word_umax=-1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local ctx wbegin wtype inest tchild tprev nparam ilook
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i1>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ctx=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax:bash/initialize-ctx
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-ctx():1: ctx=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: wbegin=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: wtype=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: inest=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: tchild=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: tprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: nparam=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ilook=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local -a _tail_syntax_stat _tail_syntax_tree _tail_syntax_nest _tail_syntax_attr
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _tail_syntax_stat=("${_ble_syntax_stat[@]:j2:iN-i2+1}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _tail_syntax_tree=("${_ble_syntax_tree[@]:j2:iN-i2}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _tail_syntax_nest=("${_ble_syntax_nest[@]:j2:iN-i2}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _tail_syntax_attr=("${_ble_syntax_attr[@]:j2:iN-i2}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble/array#reserve-prototype 1
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: local -i n=1 i
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i=95 ))
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i<n ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_stat=("${_ble_syntax_stat[@]::i1}" "${_ble_array_prototype[@]:i1:iN-i1}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_tree=("${_ble_syntax_tree[@]::i1}" "${_ble_array_prototype[@]:i1:iN-i1}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_nest=("${_ble_syntax_nest[@]::i1}" "${_ble_array_prototype[@]:i1:iN-i1}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_attr=("${_ble_syntax_attr[@]::i1}" "${_ble_array_prototype[@]:i1:iN-i1}")
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax:bash/initialize-vars
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: local histc12
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: histc12='!^'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: _ble_syntax_bash_histc12='!^'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: ble-syntax:bash/cclass/update
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/cclass/update():1: local 'seed=!^'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/cclass/update():1: shopt -q extglob
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/cclass/update():1: seed='!^x'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/cclass/update():1: [[ !^x == \!\^\x ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/cclass/update():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: local 'histstop= 	
='
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: shopt -q extglob
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: histstop=' 	
=('
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/initialize-vars():1: _ble_syntax_bash_histstop=' 	
=('
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_text='['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local i _stat tail
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: local debug_p1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i=i1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i<iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/parse/generate-stat
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/generate-stat():1: (( ilook<=i&&(ilook=i+1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/generate-stat():1: _stat='1 -1 -1 -1 -1 -1 none 1'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i>=i2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_stat[i]='1 -1 -1 -1 -1 -1 none 1'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: tail='['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: debug_p1=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax:bash/ctx-command
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/starts-with-delimiter-or-redirect
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/starts-with-delimiter-or-redirect():1: local 'delimiters=[ 	
;|&<>()]'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/starts-with-delimiter-or-redirect():1: local 'redirect=((\{[a-zA-Z_][a-zA-Z_0-9]+\}|[0-9]+)?(&?>>?|>[|&]|<[>&]?|<<[-<]?))[ 	]*'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/starts-with-delimiter-or-redirect():1: [[ [ =~ ^[ 	
;|&<>()] ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/starts-with-delimiter-or-redirect():1: [[ -1 -lt 0 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/starts-with-delimiter-or-redirect():1: [[ [ =~ ^((\{[a-zA-Z_][a-zA-Z_0-9]+\}|[0-9]+)?(&?>>?|>[|&]|<[>&]?|<<[-<]?))[ 	]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-comment
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-comment():1: shopt -q interactive_comments
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-comment():1: (( wbegin<0||wbegin==i ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-comment():1: local 'rex=^#[^
]*'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-comment():1: [[ [ =~ ^#[^
]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-comment():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: local unexpectedWbegin=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/ctx-command/.check-word-begin
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: (( wbegin<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: local octx
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: (( octx=ctx,
      wtype=octx,
      ctx=_ble_syntax_bash_command_BeginCtx[ctx] ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: (( ctx==0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: ble-syntax/parse/word-push 1 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-push():1: wtype=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-push():1: wbegin=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-push():1: tprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-push():1: tchild=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: (( octx!=BLE_CTX_ARGX0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/.check-word-begin():1: return
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: local wtype0=1 i0=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: local flagConsume=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-variable-assignment
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: (( wbegin==i ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: (( ctx==BLE_CTX_VALI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: [[ -n 11 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: local 'suffix==|\+=?'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: (( _ble_bash<30100 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: (( ctx==BLE_CTX_ARGVI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: suffix='=|\+=?|\['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: local 'rex_assign=^[a-zA-Z_][a-zA-Z_0-9]*(=|\+=?|\[)'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: [[ [ =~ ^[a-zA-Z_][a-zA-Z_0-9]*(=|\+=?|\[) ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-variable-assignment():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: local 'rex=^([^ 	
;|&()<>$"`\'\''[*?{~:^!@+!]|\\.)+'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: [[ [ =~ ^([^ 	
;|&()<>$"`\'[*?{~:^!@+!]|\\.)+ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-process-subst
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-process-subst():1: [[ [ == [\<\>]\(* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-process-subst():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-quotes
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: local rex aqdel=9 aquot=5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: (( ctx==BLE_CTX_EXPR ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: (( ctx==BLE_CTX_PWORD ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: rex='^`([^`\]|\\(.|$))*(`?)|^'\''[^'\'']*('\''?)'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: [[ [ =~ ^`([^`\]|\\(.|$))*(`?)|^'[^']*('?) ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: (( ctx!=BLE_CTX_QUOT ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: rex='^(\$?")([^$"`\!]|\\.)*("?)'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: [[ [ =~ ^(\$?")([^$"`\!]|\\.)*("?) ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: rex='^\$'\''([^'\''\]|\\(.|$))*('\''?)'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: [[ [ =~ ^\$'([^'\]|\\(.|$))*('?) ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-quotes():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-dollar
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-dollar():1: [[ [ == \$* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-dollar():1: return 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-syntax:bash/check-glob
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ [ == [\[\?\*\@\+\!\(\)\|]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: local ntype= force_attr=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: (( ctx==BLE_CTX_VRHS||ctx==BLE_CTX_ARGVR||ctx==BLE_CTX_VALR||ctx==BLE_CTX_RDRS ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: (( ctx==BLE_CTX_PATN||ctx==BLE_CTX_BRAX ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ '' == assign ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ [ == [\?\*\@\+\!]\(* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: local 'histc1=!'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ -n ! ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ [ == \!* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ [ == \[* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: (( ctx==BLE_CTX_BRAX ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: ble-syntax/parse/nest-push 54 ''
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: local wlen=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: local nlen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: local tclen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: local tplen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: _ble_syntax_nest[i]='2 0 1 -1 -1 -1 none none'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: (( ctx=54,inest=i,wbegin=-1,wtype=-1,tprev=tchild,tchild=-1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-push():1: nparam=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: (( _ble_syntax_attr[i++]=BLE_ATTR_GLOB ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ [ == \[\!* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ '' == \] ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: [[ '' == \[ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-glob():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: flagConsume=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: (( flagConsume ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: ble-assert '((wtype0>=0))'
++ ~/share/blesh/ble.sh:ble-assert():1: local 'expr=((wtype0>=0))'
++ ~/share/blesh/ble.sh:ble-assert():1: local '_ble_stackdump_title=assertion failure'
++ ~/share/blesh/ble.sh:ble-assert():1: builtin eval -- '((wtype0>=0))'
+++ ~/share/blesh/ble.sh:ble-assert():1: (( wtype0>=0 ))
++ ~/share/blesh/ble.sh:ble-assert():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: (( unexpectedWbegin>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/parse/check-end
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/check-end():1: [[ -n ble-syntax:bash/ctx-bracket-expression.end ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/check-end():1: ble-syntax:bash/ctx-bracket-expression.end
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: local is_end=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: local nctx
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: ble-syntax/parse/nest-ctx
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-ctx():1: nctx=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-ctx():1: (( inest>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-ctx():1: nctx=2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: (( nctx==BLE_CTX_PATN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: ble-syntax:bash/check-word-end/is-delimiter
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: local tail=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: [[ '' == [!\ \	\
\;\|\&\<\>\(\)]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: [[ '' == [\<\>]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: is_end=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: [[ [ == \:* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: [[ -n 1 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: ble-syntax/parse/nest-pop
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: (( inest<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: local -a parentNest
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: ble/string#split-words parentNest '2 0 1 -1 -1 -1 none none'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'parentNest=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: parentNest=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: local ntype=none nbeg=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: ble-syntax/parse/tree-append nnone 0 -1 -1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: [[ -n 0 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( i-1>=debug_p1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local type=nnone
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local beg=0 end=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local len=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( len==0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local tchild=-1 tprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local ochild=-1 oprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( tchild>=0&&(ochild=i-tchild) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( tprev>=0&&(oprev=i-tprev) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: [[ nnone =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: _ble_syntax_tree[i-1]='nnone 1 -1 -1 - '
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: local wlen=0 nlen=-1 tplen=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: (( ctx=parentNest[0] ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: (( wtype=parentNest[2] ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: (( wbegin=wlen<0?wlen:nbeg-wlen,
    inest=nlen<0?nlen:nbeg-nlen,
    tchild=i,
    tprev=tplen<0?tplen:nbeg-tplen ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: nparam=none
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: [[ none == none ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-pop():1: nparam=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: ble-syntax/parse/check-end
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/check-end():1: [[ -n ble-syntax:bash/ctx-command/check-word-end ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/check-end():1: ble-syntax:bash/ctx-command/check-word-end
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: (( wbegin<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: ble-syntax:bash/check-word-end/is-delimiter
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: local tail=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: [[ '' == [!\ \	\
\;\|\&\<\>\(\)]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: [[ '' == [\<\>]* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/check-word-end/is-delimiter():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local wbeg=0 wlen=1 wend=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local 'word=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local wt=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: [[ -n 2 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: wtype=2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local rex_expect_command=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: ble-syntax/parse/word-pop
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-pop():1: ble-syntax/parse/tree-append 2 0 1 -1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: [[ -n 0 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( i-1>=debug_p1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local type=2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local beg=0 end=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local len=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( len==0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local tchild=1 tprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: local ochild=-1 oprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( tchild>=0&&(ochild=i-tchild) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: (( tprev>=0&&(oprev=i-tprev) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: [[ 2 =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: ble-syntax/parse/touch-updated-word 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/touch-updated-word():1: (( 1>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/touch-updated-word():1: (( (_ble_syntax_word_umin<0||_ble_syntax_word_umin>1)&&(
      _ble_syntax_word_umin=1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/touch-updated-word():1: (( (_ble_syntax_word_umax<0||_ble_syntax_word_umax<1)&&(
      _ble_syntax_word_umax=1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/tree-append():1: _ble_syntax_tree[i-1]='2 1 0 -1 - nnone 1 -1 -1 - '
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-pop():1: (( wbegin=-1,wtype=-1,tchild=i ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/word-pop():1: ble-syntax/parse/nest-reset-tprev
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-reset-tprev():1: (( inest<0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/nest-reset-tprev():1: tprev=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: (( ctx==BLE_CTX_CMDI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: (( wt==BLE_CTX_CMDXV ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local processed=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: case "$word" in
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: (( ctx=BLE_CTX_ARGX ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: local 'rex=^([ 	]*)(\([ 	]*\)?)?'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: [[ '' =~ ^([ 	]*)(\([ 	]*\)?)? ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-command/check-word-end():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/ctx-bracket-expression.end():1: return
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( 1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i<iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: unset debug_p1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/vanishing-word/register _tail_syntax_tree -i2 i2+1 i 0 i
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local tree_array=_tail_syntax_tree tofs=-i2
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local -i beg=i2+1 end=i lbeg=0 lend=i
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( (beg<=0)&&(beg=1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: local node i nofs
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( i=end ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/vanishing-word/register():1: (( i>=beg ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/urange#update _ble_syntax_attr_ i1 i
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local prefix=_ble_syntax_attr_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local -i p1=i1 p2=i
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( 0<=p1&&p1<p2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( (_ble_syntax_attr_umin<0||_ble_syntax_attr_umin>p1)&&(_ble_syntax_attr_umin=p1),
    (_ble_syntax_attr_umax<0||_ble_syntax_attr_umax<p2)&&(_ble_syntax_attr_umax=p2) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( (i>=i2)?(
      _ble_syntax_dbeg=_ble_syntax_dend=-1
    ):(
      _ble_syntax_dbeg=i,_ble_syntax_dend=i2) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i>=iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( i=iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: ble-syntax/parse/generate-stat
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/generate-stat():1: (( ilook<=i&&(ilook=i+1) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse/generate-stat():1: _stat='3 -1 -1 -1 0 -1 none 1'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: _ble_syntax_stat[i]='3 -1 -1 -1 0 -1 none 1'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( inest>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/parse():1: (( 2==iN+1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: local umin=-1 umax=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: (( DMIN>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: umin=0
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: umax=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: ble-highlight-layer:syntax/update-attribute-table
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: ble-highlight-layer/update/shift _ble_highlight_layer_syntax1_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __dstArray=_ble_highlight_layer_syntax1_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __srcArray=_ble_highlight_layer_syntax1_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: (( DMIN>=0 ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: ble/array#reserve-prototype 1
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: local -i n=1 i
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i=95 ))
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: builtin eval '
    _ble_highlight_layer_syntax1_table=(
      "${_ble_highlight_layer_syntax1_table[@]::DMIN}"
      "${_ble_array_prototype[@]::DMAX-DMIN}"
      "${_ble_highlight_layer_syntax1_table[@]:DMAX0}")'
+++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: _ble_highlight_layer_syntax1_table=("${_ble_highlight_layer_syntax1_table[@]::DMIN}" "${_ble_array_prototype[@]::DMAX-DMIN}" "${_ble_highlight_layer_syntax1_table[@]:DMAX0}")
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( _ble_syntax_attr_umin>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: ble-highlight-layer:syntax/touch-range _ble_syntax_attr_umin _ble_syntax_attr_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/touch-range():1: ble-syntax/urange#update '' _ble_syntax_attr_umin _ble_syntax_attr_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local prefix=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local -i p1=_ble_syntax_attr_umin p2=_ble_syntax_attr_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( 0<=p1&&p1<p2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( (umin<0||umin>p1)&&(umin=p1),
    (umax<0||umax<p2)&&(umax=p2) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: local i g=0
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( _ble_syntax_attr_umin>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( i=_ble_syntax_attr_umin ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( i<_ble_syntax_attr_umax ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( 31 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: ble-syntax/attr2g 31
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/attr2g():1: local iface=20
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/attr2g():1: g=2
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: _ble_highlight_layer_syntax1_table[i]=2
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( i++ ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: (( i<_ble_syntax_attr_umax ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: _ble_syntax_attr_umin=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-attribute-table():1: _ble_syntax_attr_umax=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update():1: ble-highlight-layer:syntax/update-word-table
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local color_umin=-1 color_umax=-1 iN=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-highlight-layer:syntax/word/.update-attributes
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes():1: (( _ble_syntax_word_umin>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes():1: ble-syntax/tree-enumerate-in-range _ble_syntax_word_umin _ble_syntax_word_umax ble-highlight-layer:syntax/word/.update-attributes/.proc
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local -i beg=_ble_syntax_word_umin end=_ble_syntax_word_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local proc=ble-highlight-layer:syntax/word/.update-attributes/.proc
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local -a node
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local i nofs
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( i=end ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( i>=beg ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( i>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: [[ -n 2 1 0 -1 - nnone 1 -1 -1 -  ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: ble/string#split-words node '2 1 0 -1 - nnone 1 -1 -1 - '
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'node=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: node=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local flagUpdateNode=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs<10 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local wtype=2 wlen=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local wbeg=0 wend=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: ble-highlight-layer:syntax/word/.update-attributes/.proc
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: [[ 2 =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: [[ - == - ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: ble-syntax/urange#update color_ 0 1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local prefix=color_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: local -i p1=0 p2=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( 0<=p1&&p1<p2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/urange#update():1: (( (color_umin<0||color_umin>p1)&&(color_umin=p1),
    (color_umax<0||color_umax<p2)&&(color_umax=p2) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local p0=0 p1=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( wtype==BLE_ATTR_VAR||wtype==BLE_CTX_VALI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local type=
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( wtype==BLE_CTX_RDRH||wtype==BLE_CTX_RDRI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local 'wtxt=['
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: ble-syntax:bash/simple-word/is-simple '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/is-simple():1: [[ [ =~ ^(\\.|'[^']*'|\$'([^'\]|\\.)*'|\$?"([^$"`\!]|\\.|\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\})*"|\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\}|[^ 	
;|&()<>$"`\'^!])+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local ret
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( wtype==BLE_CTX_RDRS||wtype==BLE_ATTR_VAR||wtype==BLE_CTX_VALI&&wbeg<p0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: ble-syntax:bash/simple-word/eval '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval():1: local __ble_ret
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval():1: ble-syntax:bash/simple-word/eval/.impl '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: ret=()
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: local -a ret
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: ble-syntax:bash/simple-word/extract-parameter-names '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: ret=()
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'letter=[^ 	
;|&()<>$"`\'\''^!]'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'bquot=\\.'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'squot='\''[^'\'']*'\''|\$'\''([^'\''\]|\\.)*'\'''
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'dquot=\$?"([^$"`\!]|\\.|\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\})*"'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'param=\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\}'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'value=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'rex0=^([^ 	
;|&()<>$"`\'\''^!]|\\.|'\''[^'\'']*'\''|\$'\''([^'\''\]|\\.)*'\'')+'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'rex1=^(\$?"([^$"`\!]|\\.|\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\})*")'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: local 'rex2=^(\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\})'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: [[ -n [ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: [[ [ =~ ^([^ 	
;|&()<>$"`\'^!]|\\.|'[^']*'|\$'([^'\]|\\.)*')+ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: value=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: [[ '' =~ ^(\$?"([^$"`\!]|\\.|\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\})*") ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: [[ '' =~ ^(\$([-*@#?$!0_]|[1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*)|\$\{(#?[-*@#?$!0]|[#!]?([1-9][0-9]*|[a-zA-Z_][a-zA-Z_0-9]*))\}) ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/extract-parameter-names():1: break
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: (( 0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: __ble_ret=()
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval/.impl():1: builtin eval 'ble-syntax:bash/simple-word/eval/.set-result ['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval():1: local ext=0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval():1: ret='['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax:bash/simple-word/eval():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local ext=0
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local -a value
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: value=("${ret[@]}")
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( ext&&(wtype==BLE_CTX_CMDI||wtype==BLE_CTX_ARGI||wtype==BLE_CTX_RDRF||wtype==BLE_CTX_RDRS||wtype==BLE_CTX_VALI) ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( (wtype==BLE_CTX_RDRF||wtype==BLE_CTX_RDRD)&&1>=2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( wtype==BLE_CTX_CMDI ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local attr=31
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( attr!=BLE_ATTR_KEYWORD&&attr!=BLE_ATTR_KEYWORD_BEGIN&&attr!=BLE_ATTR_KEYWORD_END&&attr!=BLE_ATTR_KEYWORD_MID&&attr!=BLE_ATTR_DEL ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: ble-syntax/highlight/cmdtype '[' '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: local 'cmd=[' '_0=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: (( _ble_syntax_highlight_filetype_version!=_ble_edit_LINENO ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: _ble_syntax_highlight_filetype=()
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: (( _ble_syntax_highlight_filetype_version=_ble_edit_LINENO ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: type=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: [[ -n '' ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: ble-syntax/highlight/cmdtype/.impl '[' '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: local 'cmd=[' '_0=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: local btype
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: ble/util/type btype '['
++ ~/share/blesh/ble.sh:ble/util/type():1: ble/util/assign btype 'builtin type -t -- "$3" 2>/dev/null' '['
++ ~/share/blesh/ble.sh:ble/util/assign():1: local _ble_local_tmp=/run/user/1000/blesh/16760.ble_util_assign.tmp.0
++ ~/share/blesh/ble.sh:ble/util/assign():1: builtin eval 'builtin type -t -- "$3" 2>/dev/null'
+++ ~/share/blesh/ble.sh:ble/util/assign():1: builtin type -t -- '['
++ ~/share/blesh/ble.sh:ble/util/assign():1: (( _ble_util_assign_level-- ))
++ ~/share/blesh/ble.sh:ble/util/assign():1: local _ret=0 __arr
++ ~/share/blesh/ble.sh:ble/util/assign():1: mapfile -t __arr
++ ~/share/blesh/ble.sh:ble/util/assign():1: IFS='
'
++ ~/share/blesh/ble.sh:ble/util/assign():1: eval 'btype="${__arr[*]-}"'
+++ ~/share/blesh/ble.sh:ble/util/assign():1: btype=builtin
++ ~/share/blesh/ble.sh:ble/util/assign():1: return 0
++ ~/share/blesh/ble.sh:ble/util/type():1: builtin eval 'btype="${btype%
}"'
+++ ~/share/blesh/ble.sh:ble/util/type():1: btype=builtin
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: ble-syntax/highlight/cmdtype1 builtin '['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype1():1: type=builtin
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype1():1: local 'cmd=['
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype1():1: case "$type:$cmd" in
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype1():1: (( type=BLE_ATTR_CMD_BUILTIN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: [[ 102 == \1\0\3 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype/.impl():1: [[ 102 == \1\0\6 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/highlight/cmdtype():1: _ble_syntax_highlight_filetype["x$_0"]=102
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: [[ -n 102 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: [[ 102 == g:* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: local g
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: ble-syntax/attr2g 102
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/attr2g():1: local iface=26
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/attr2g():1: g=
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: (( wbeg<p0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: node[nofs+4]=
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: flagUpdateNode=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs+=BLE_SYNTAX_TREE_WIDTH ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs<10 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local wtype=nnone wlen=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: local wbeg=0 wend=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: ble-highlight-layer:syntax/word/.update-attributes/.proc
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: [[ nnone =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.update-attributes/.proc():1: return
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs+=BLE_SYNTAX_TREE_WIDTH ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( nofs<10 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: [[ -n 1 ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: _ble_syntax_tree[i-1]='2 1 0 -1  nnone 1 -1 -1 -'
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( i-- ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-in-range():1: (( i>=beg ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-highlight-layer/update/shift _ble_highlight_layer_syntax2_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __dstArray=_ble_highlight_layer_syntax2_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: local __srcArray=_ble_highlight_layer_syntax2_table
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: (( DMIN>=0 ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: ble/array#reserve-prototype 1
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: local -i n=1 i
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i=95 ))
++ ~/share/blesh/ble.sh:ble/array#reserve-prototype():1: (( i<n ))
++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: builtin eval '
    _ble_highlight_layer_syntax2_table=(
      "${_ble_highlight_layer_syntax2_table[@]::DMIN}"
      "${_ble_array_prototype[@]::DMAX-DMIN}"
      "${_ble_highlight_layer_syntax2_table[@]:DMAX0}")'
+++ ~/share/blesh/ble.sh:ble-highlight-layer/update/shift():1: _ble_highlight_layer_syntax2_table=("${_ble_highlight_layer_syntax2_table[@]::DMIN}" "${_ble_array_prototype[@]::DMAX-DMIN}" "${_ble_highlight_layer_syntax2_table[@]:DMAX0}")
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-syntax/wrange#update _ble_syntax_word_ _ble_syntax_vanishing_word_umin _ble_syntax_vanishing_word_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: local prefix=_ble_syntax_word_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: local -i p1=_ble_syntax_vanishing_word_umin p2=_ble_syntax_vanishing_word_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: (( 0<=p1&&p1<=p2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: return
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-syntax/wrange#update color_ _ble_syntax_vanishing_word_umin _ble_syntax_vanishing_word_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: local prefix=color_
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: local -i p1=_ble_syntax_vanishing_word_umin p2=_ble_syntax_vanishing_word_umax
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: (( 0<=p1&&p1<=p2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/wrange#update():1: return
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: _ble_syntax_vanishing_word_umin=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: _ble_syntax_vanishing_word_umax=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-highlight-layer:syntax/word/.apply-attribute 0 1 d
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: local wbeg=0 wend=1 wattr=d
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: (( wbeg<color_umin&&(wbeg=color_umin),
    wend>color_umax&&(wend=color_umax),
    wbeg<wend ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ d =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ d == m* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ d == d ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: ble-highlight-layer:syntax/fill _ble_highlight_layer_syntax2_table 0 1 ''
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: local _i _arr=_ble_highlight_layer_syntax2_table _i1=0 _i2=1 _v=
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: (( _i=_i1 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: (( _i<_i2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: eval '_ble_highlight_layer_syntax2_table[_i]="$_v"'
+++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: _ble_highlight_layer_syntax2_table[_i]=
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: (( _i++ ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/fill():1: (( _i<_i2 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local i
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: (( i=_ble_syntax_word_umax ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: (( i>=_ble_syntax_word_umin ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: (( i>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: [[ -n 2 1 0 -1  nnone 1 -1 -1 - ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local -a node
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble/string#split-words node '2 1 0 -1  nnone 1 -1 -1 -'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'node=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: node=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local wlen=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local wbeg=0 wend=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: [[ 2 =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local attr=nnone
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-highlight-layer:syntax/word/.apply-attribute 0 1 nnone
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: local wbeg=0 wend=1 wattr=nnone
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: (( wbeg<color_umin&&(wbeg=color_umin),
    wend>color_umax&&(wend=color_umax),
    wbeg<wend ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ nnone =~ ^[0-9]+$ ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ nnone == m* ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/word/.apply-attribute():1: [[ nnone == d ]]
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local tclen=0
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: (( tclen>=0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local tchild=1
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: local tree= nofs=0 proc_children=ble-highlight-layer:syntax/word/.proc-childnode
++ ~/share/blesh/lib/core-syntax.sh:ble-highlight-layer:syntax/update-word-table():1: ble-syntax/tree-enumerate-children ble-highlight-layer:syntax/word/.proc-childnode
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-children():1: (( 0<tchild&&tchild<=i ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-children():1: local nofs=5
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-children():1: local i=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate-children():1: ble-syntax/tree-enumerate/.impl ble-highlight-layer:syntax/word/.proc-childnode
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local islast=1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: (( i>0 ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local -a node
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: (( i<iN ))
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: ble/string#split-words node '2 1 0 -1  nnone 1 -1 -1 -'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: [[ -o noglob ]]
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set -f
++ ~/share/blesh/ble.sh:ble/string#split-words():1: IFS=' 	
'
++ ~/share/blesh/ble.sh:ble/string#split-words():1: builtin eval 'node=(${*:2})'
+++ ~/share/blesh/ble.sh:ble/string#split-words():1: node=(${*:2})
++ ~/share/blesh/ble.sh:ble/string#split-words():1: set +f
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: ble-assert '((nofs<${#node[@]}))' 'ble-syntax/tree-enumerate/.impl(i=1,iN=1,nofs=5,node=2 1 0 -1 nnone 1 -1 -1 -,command=ble-highlight-layer:syntax/word/.proc-childnode)/FATAL1'
++ ~/share/blesh/ble.sh:ble-assert():1: local 'expr=((nofs<${#node[@]}))'
++ ~/share/blesh/ble.sh:ble-assert():1: local '_ble_stackdump_title=assertion failure'
++ ~/share/blesh/ble.sh:ble-assert():1: builtin eval -- '((nofs<${#node[@]}))'
+++ ~/share/blesh/ble.sh:ble-assert():1: (( nofs<9 ))
++ ~/share/blesh/ble.sh:ble-assert():1: return 0
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local wtype=1 wlen=-1 tclen=-1 tplen=- attr=
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local wbegin=-1
++ ~/share/blesh/lib/core-syntax.sh:ble-syntax/tree-enumerate/.impl():1: local tchild=-1
-bash: -: 構文エラー: オペランドが予期されます (エラーのあるトークンは "-")

Case-insensitive completion

Hi! This project is super cool, thanks for making it.

I'm not sure if this is a feature that doesn't exist or if I just can't find the setting for it, but I'd love to be able to make completion - both tab and auto - case insensitive. By which I mean cd ~/docu would complete to cd ~/Documents, or networkma to NetworkManager.

Thanks!

[iTerm2, Bash-4.4] shell becomes unresponsive on resize

ble version: 0.4.0-devel2+5327f5d
Bash version: 5.0.16(1)-release,x86_64-apple-darwin19.3.0

If I resize a terminal window without typing at least one character into it, the shell won't accept any commands after the resize. The corresponding bash process runs at 100% CPU usage and is only killable by SIGKILL(9). This is independent of the used terminal emulator.

How to reporoduce:

  1. open a terminal window
  2. resize it
  3. see in another terminal the CPU usage rise

PS1: \[\]\[\033]0;\u@\H:\W\007\]\[$(iterm2_prompt_mark)\]\$ \[\]

[Alacritty] "unbound keyseq: [" on initial load

ble version: 0.3.0+c2a268a
Bash version: 5.0.7

When initially starting a new bash session I always get "unbound keyseq: [" followed by ?6c in the terminal, ble.sh continues to work fine but it's annoying having to clear the screen every time. I'm using bash 5.0.7 on Arch Linux with vi-mode enabled in .inputrc.
2019-07-16-234442_grim
2019-07-16-234500_grim

履歴展開の置換指示子後の区切り記号が`/`の時以外に正しく構文強調されない

Commit ID: 860e0fe
Version of GNU Bash: 4.4.12

$ echo foo
$ !!:s@f@/ # 注意: この@はカーソル位置を表わす記号ではない
$ echo /foo@

このように履歴展開においては置換指示子sに後置される置換区切り文字は/でなくても機能しますが,bleshの構文強調はこの文字が/であるときのみに働き,それ以外の場合はble-color-setface syntax_history_expansionで設定した色になりません。

また,本来は別issueにすべきでしょうが,ほとんど内容が同じなので,もう一件立てさせてください。

$ echo foo
$ !!:gs/o/z
$ echz fzz

このとき,履歴展開用の構文強調は「!!:gs/o/z」全体に及ぶべきですが,実際は「!!:g」までしか適用されません。

[略語展開]複合コマンドの直後で略語展開できない

ble version: 0.4.0-devel1+64ae8ce
Bash version: 5.0.3(1)-release

表題の通りです。略語展開ができない状況を2例ほど挙げます。
blerc/complete-load-hook函数内でble-sabbrev f='| foo'などと登録している)

$ if true; then
> echo 'foo'
> fi f
     ^ ここで展開されない。
$ [[ -v BLE_VERSION ]] f
                       ^ ここで展開されない。

重箱の隅を突くような指摘で恐縮です……。

Hang after loading ble.sh in vi-mode

# すいません日本語で書かせてください……。

bash 4.4.12 を利用しています。
本スクリプトを source した後 set -o vi とすると入力を受け付けなくなります。私の場合は外部から強制終了するしか手段がありませんでした。
また,元々 ~/.inputrc 等で vi-mode に設定していた場合でも,本スクリプトを読み込むと無効になります。
恐らく Readline を再実装されている様なので vi-mode の実現は厳しいでしょうが,せめて警告を出すようにしていただくと嬉しいです。

[要望] history-search系の関数を追加してほしい

(ご存知かとは思いますが)GNU Bashにはhistory-search-forward及びhistory-search-backwardという関数が用意されており,これには行頭からカーソル位置までの文字列で履歴を前方/後方に非逐次検索し,その結果でコマンドラインを置換するという機能があります。
ble.shには,まだ実装されていないように思います(ble-bind --list-widgets | grep 'history-search'とやっても引っ掛からない)。どうか追加してはいただけないでしょうか。

[fzf] Problems with fzf and ble.sh

ble version:

0.4.0-devel2+3031007

Bash version:

5.0.11(1)-release

I've noticed two issues if I have both fzf and bleh.sh sourced. I.e [ -f ~/.fzf.bash ] && source ~/.fzf.bash is run manually or in your bashrc.

  1. fzf history search does not work well.
  • C-r to see and select previous command
  • Select Return and the line number will be returned rather than the command. For example, if you select command 515, then '!515' will be written to standard out.
  1. The shortcut for fuzzy tab completion does not work as expected.

cd ** returns

-bash: cd: too many arguments
[ble: exit 1]

Do you think it's possible to resolve these types of issues? Thanks in advance!

Long processing times when pasting large amounts of text

ble version: 0.4.0-devel2+420c933
Bash version: 5.0.11(1)-release,x86_64-apple-darwin17.7.0

Pasting to the terminal when there's a lot in the clipboard is rather slow when bleh.sh is loaded.

The multi-line editor works great when writing writing multi-line commands or pasting in small amounts of text. However, when you paste in large amounts of text it takes quite a while to process. When I use a terminal without ble.sh copying and pasting in large amounts of text is relatively fast (1~ second). To reproduce, try copying the random JSON that was generated here into a terminal. Maybe this issue is unavoidable given the syntax highlighting tools, but I wanted to check first.

P.S I can record a video if this doesn't reproduce well.

[enhance-complete & libvte] コマンド実行後,余分な文字列が出力される

Commit ID: 6129766
Version of GNU Bash: 4.4.12(1)-release

enhance-completeブランチでの話題です。

コマンドを実行した後,端末エミュレータの画面に\e[>4;1m\e[>4;2m(註: \eは実際にはエスケープ)という文字列が余計に表示されてしまいます。
この時,これら二つの文字列は出力の一行目を挟むように表示されます。

$ cat <<.
foo
bar
baz
.
�[4;1mfoo�[4;2m
bar
baz

また,bleshが改行を処理した場合(例えば$ printf 'foo'を実行した場合)は,\e[>4;1mのみが表示されます。


なお,#6 (comment) などにおいて僕が言及していた,入力時に不明な時点でプロセスが落ちてしまうという現象は, 遅くとも 6129766 において解決を見ました。
なぜ,その現象が @akinomyoga 様の手元では起きず僕の環境で起こったのか,またどうして解決したのかが全く判明していない点が心残りですが,とりあえず良かったです。


二つほど,補完に関して質問(不具合の問題提起ではなく)があるのですが,よろしいでしょうか。
もしも邪魔ならば,以下の文は無視してください。

自動補完の強調表示の設定

READMEファイルの「着色の設定」という項目には,自動補完に関する構文強調は見受けられませんが,自動補完の構文強調は設定できないのでしょうか,またもしも設定できるなら,どのようにして指定すればいいでしょうか。
ble-color-setfaceの第1引数として指定すべき値を教えていただけると嬉しいです。

自動補完されている文字列を確定する関数

自動補完されている文字列を,瞬時に確定したい場合,どのようなキーを押せばいいでしょうか。また,それをカスタマイズするにはどうすればいいでしょうか。
とりあえず自分でauto_complete/accept-on-end関数あたりかなと思いまして,bleshの設定ファイル内で

ble-bind -m 'vi_imap' -f 'C-x C-i' 'auto_complete/accept-on-end'

などと設定してみたのですが,そのような関数はないとの旨の警告が出てしまいました。

[履歴] 複数行の履歴展開が不本意な挙動を示す

ble version: 0.4.0-devel1+30cc31c
Bash version: 5.0.3(1)-release

複数行のコマンドを実行した後に履歴展開を行うと,展開の対象が(その複数行のコマンドではなく)evalから始まる単一行になってしまい,例えば単語指示子などが本意に展開されません。
実行例

$ echo '複数行の' \
'入力'
$ echo !^ # ここでは第1引数,つまり「`'複数行の'`」に展開されることを期待している
$ echo -- # しかし実際は「`--`」に展開されてしまう。

直前のコマンド(全体)を展開する「!!」は「eval -- $'echo 複数行の \\n入力'」に展開されます。

Return to line edit from menu-complete

I have a questions about the menu-complete feature if that's ok.

Given existing terminal content of cd while in a directory containing other directories, if I enter TAB you will get a series of suggestions you can navigate with TAB and S-TAB. Before I hit TAB or S-TAB after hitting TAB I am still able to use the terminal line editor, however once I hit TAB or S-TAB I'm not able to exit and return. I have to hit C-c to exit completely. Is there another way to exit the menu and return to the existing content on the line editor?

`C-z` を bash 相当の挙動にして/行内に文字列があるかどうかの判定を含めて欲しい

# こういうのは new issue でいいんでしょうか……?

ble.sh の C-z は譬え行内に入力されている文字列があったとしても、問答無用で fg を実行するようです。

$ sleep 10

を実行し、C-z を入力してプロンプトに戻り

$ ls

と入力してから C-z とすると fg ls が実行され、

$ ls
bash: fg: カレント: そのようなジョブはありません。
$ ls

となる。

bash では C-z はプロンプトにおいて意味を持ちません。

しかし空行での C-zfg を呼び出すというのは便利なので、
(Bash では見掛けないですが Zsh の利用者はそういった関数を作っている方も多いようです)
C-d 等に割り振られている -or- 系の widget にして欲しいです。

bash history timestamp interaction

ble version: 0.4.0-devel2+efe1e81
Bash version: 5.0.16(1)-release,x86_64-pc-linux-gnu

((Before I begin, I just wanted to say that this project is amazing. Thank you for making it!))

It seems that ble.sh has some weird interactions with bash's history mechanism. For reference, here are my history-related settings in my bashrc:

# Set history file to be different than default to avoid accidental overwrites
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
export HISTFILE="${XDG_DATA_HOME}/bash/history"

# Set timestamp format
export HISTTIMEFORMAT="[%F %T]  "

# Avoid duplicates
export HISTCONTROL=ignoredups:erasedups

# Unlimited history
# http://stackoverflow.com/questions/9457233/unlimited-bash-history
export HISTSIZE=
export HISTFILESIZE=

# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend

# After each command, append to the history file and reread it
# http://superuser.com/questions/20900/bash-history-loss
#export PROMPT_COMMAND="${PROMPT_COMMAND:+"${PROMPT_COMMAND}; "}history -a; history -c; history -r"

Given that I have HISTTIMEFORMAT set, I would expect that the history that gets appended to HISTFILE on a shell exit would have a '#<EPOCHTIME>' string inserted on the line before each command is recorded. But that does not seem to be the case right now. When a ble-attached shell exits, it appears to just dump its entire command history directly into HISTFILE without timestamp lines.

Also, because bash is a bit dim about sharing history between different shells and the fact that crashes are a thing, I usually have the PROMPT_COMMAND modification active so it writes to history every time a command is executed, though I commented it out while working on tracking this issue.

syntax: “failglob” 有効下では失敗する,否定系のglob書式が一致するかの如く描画される

ble version: 0.4.0-devel2+10ad274
Bash version: 5.0.3(1)-release

Bashのglob書式には,(POSIXが規定している“[!s]”を含めて)指定した文字・文字列 以外 を選択するような,いわば「否定系glob」が用意されています(もしかしたら正式名称があるかも知れません)。
“failglob” を有効にしている状態で,「否定系glob」を含め,入力したglob(と見做される文字列)に一致するファイル等がない場合,ble.shはble-color-setface syntax_errorで定めた着色を行う筈です。事実,否定系でないglobに対しては,そういった装飾が為されます。しかし,否定系globに一致するファイル等がない場合は,syntax_errorではなく,通常のglobに対する描画設定syntax_globが適応されているようです。

$ mkdir /tmp/empty_dir && cd /tmp/empty_dir # 任意
$ shopt -s failglob
$ echo * # ← syntax_errorの着色
-bash: 一致しません: *
[ble: exit 1]
$ echo [!x]* # ← 一致するものがないが,syntax_globの着色
-bash: 一致しません: [!x]*
[ble: exit 1]
$ echo !(*) # ← 同上
-bash: 一致しません: !(*)
[ble: exit 1]

[noclobber] history: 履歴を共有しており転送上書きを防止していると終了時に警告が生じる

ble version: 0.4.0-devel2+06ae2b1
Bash version: 5.0.3(1)-release

(細かいことでもいいと仰ってくださったので,調子に乗って前から気になっていたことを論います……)

builtin history "$delta" > "$histapp"

この箇所で,>という転送演算子が用いられています。
履歴を共有しており(bleopt history_share=1),かつ,>演算子等での転送による上書きを防止している(set -o noclobber)場合,Bashの終了時に「bash: /run/user/1000/blesh/NNNN.history.app: 存在するファイルを上書きできません」などと警告されます(普通にBashを起動している状態だと,終了と同時に端末が閉じる為にほぼ一瞬しか見えませんが,Bashを入れ子で起動していると子シェルの方の終了時に警告が端末上に残っているのが確認できると思います)。
警告が生じる以外に何の問題もないのですが,一応,他の箇所と同様>|演算子を用いたほうが良いのではないかと思います。

menu-complete lines aren't cleared correctly

ble version: 0.4.0-devel2+7a99bf3
Bash version: 5.0.16(1)-release,x86_64-apple-darwin17.7.0

When autocomplete is invoked by pressing Tab the results are not cleared when pressing Ctrl-C (sending SIGINT).

2020-02-26 10 49 29

Provide a way to unbind a keymapping

I use fzf for going through my history. Currently installing ble overrides my key binding for the C-r. Would be nice to have a way to unbind from ble through a command.

I am not sure if the key binding is configurable through a file. If it is could you point me to which file I should make the change in.

Auto-source from `.bashrc` causes "[ble: reload]" and frozen shell

ble version:
v0.3.2, downloaded via wget

Bash version:

Ubuntu 19.10

5.0.3(1)-release, x86_64-pc-linux-gnu

When putting the code to automatically source blesh in .bashrc, my shell freezes with this and does not take any input:

image

However, manual source has no problems, as you can see below:

image

Thank you for such a great tool by the way, really useful =D

Incompatibility with colored prompts (PS1 with colors)

ble version:0.4.0-devel1+4f442d0
Bash version: 4.4.20

Weird characters appear if the PS1 environment variable is set to have colors.
My setup: \[\e[1;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;31m\]\h\[\e[m\]:\[\e[34m\]\w\[\e[32m\]$(__git_ps1 "  %s ")\[\e[m\]\$
Output of my shell: ��user����@����hostname��:��~����$
Note: the characters here are not decoded by the terminal so I am seeing something like
__
|00|
|01|

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.