You want either:
insert-completions
ALT* for 'insert all completions'
With this, a dir containing files name 'aa ab ac ad'
ls a*
followed by alt + *
would complete to ls aa ab ac ad
Man page entry on binding:
insert-completions (M-*)
Insert all completions of the text before point that would have been generated by possible-completions.
glob-expand-word
On some systems the above will not work with wildchars, the following does work on such systems for me:
ctrlx, * (a two stroke combo)
Example:
I populated a dir with:
touch {a,b,c,d,e,f}{1,2,3,4,5,6,7,8,9,0}00{a,b,c,d,f,e}
I then ls *100*
followed by ctrl + x, *
, which turns my readline into:
ls a100a a100b a100c a100d a100e a100f b100a b100b b100c b100d b100e b100f c100a c100b c100c c100d c100e c100f d100a d100b d100c d100d d100e d100f e100a e100b e100c e100d e100e e100f f100a f100b f100c f100d f100e f100f
Man page entry for binding:
glob-expand-word (C-x *)
The word before point is treated as a pattern for pathname expansion, and the list of matching file names is inserted, replacing the word. If a numeric argument is supplied, a ‘*’ is appended before pathname expansion.
Man Page
You can find old bash source here. In particular I downloaded bash-1.14.7.tar.gz. In the documentation/bash.txt
you will find:
Arithmetic Expansion
Arithmetic expansion allows the evaluation of an arithmetic expression and the substitution of the result. There are two formats for arithmetic expansion:
$[expression]
$((expression))
The references to $[
are gone in doc/bash.html
from the bash-doc-2.0.tar.gz download and the NEWS
file mentions that:
The $[...]
arithmetic expansion syntax is no longer supported, in favor of $((...))
.
$((...))
is also the standard syntax for an arithmetic expansion, but may have been added to the standard later than the original Bash implementation.
However, $[...]
does still seem to work in Bash 5.0, so it's not completely removed.
Best Answer
From
help let
:Since
var++
is post-increment, I guess the last argument does evaluate to zero. Subtle...A perhaps clearer illustration: