| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid very many forks; and work around Bash 3.0 bugs with array
behaviour:
bash-3.0$ nodes=(a b c)
bash-3.0$ printf '%s\n' "${nodes[@]:1}"
b
c
bash-3.0$ nodes=(a b)
bash-3.0$ printf '%s\n' "${nodes[@]:1}"
bash-3.0
Compare:
bash-5.0$ nodes=(a b c)
bash-5.0$ printf '%s\n' "${nodes[@]:1}"
b
c
bash-5.0$ nodes=(a b)
bash-5.0$ printf '%s\n' "${nodes[@]:1}"
b
bash-5.0$
|
|
|
|
|
| |
I suspect there's a more correct way to do this, but it's working well
for the moment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Some general changes:
* Apply case sensitivity switching in more contexts, using a dynamically
loaded helper function
* Use array counters for appending to COMPREPLY where possible
* Lots more short-circuiting to limit structural depth
These changes are expansive and there will definitely be bugs.
|
|
|
|
|
| |
The current word is available in $2, and the previous word in $3. That's
easier (and maybe a bit less expensive) to dig out, so let's use it.
|
| |
|
| |
|
|
|
|
| |
I don't believe these are needed anymore, or possibly ever were.
|
| |
|
|
|
|
|
| |
This helps older versions of Bash understand that the surrounding
subshell isn't terminating.
|
| |
|
|
|
|
|
|
| |
This involves a little too much boilerplate for my liking, but it's
still an improvement over what I had before. I might find a way to make
this into a generic function.
|
| |
|
| |
|
|
|
|
|
|
| |
Bash 4.4 hangs in an awkward way (probably outputting the literal null
char in some unexpected context) without this; I'm not sure if this is a
bug or whether it's just been tolerated behaviour until now.
|
|
|