path: root/bash
AgeCommit message (Collapse)AuthorFilesLines
2018-12-06Refactor bd()/sd() completion a lotTom Ryder2-31/+66
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$
2018-12-02Use native filename quoting for td(1df) completeTom Ryder1-2/+2
2018-12-02Make bd() and sd() match quoted and unquoted wordsTom Ryder2-13/+31
I suspect there's a more correct way to do this, but it's working well for the moment.
2018-12-02Remove unneeded bracesTom Ryder1-1/+1
2018-12-02Use variable for node count, not expansionTom Ryder1-1/+1
Cheaper (I think).
2018-12-02Use simple loop rather than glob tricks in keepTom Ryder1-6/+6
2018-12-02Move error increment to outside of if blockTom Ryder1-7/+5
2018-12-02Add missing source of helper func to man completeTom Ryder1-0/+5
2018-12-02Remove unneeded local varTom Ryder1-1/+1
2018-12-02Trim some trailing whitespaceTom Ryder1-1/+1
2018-12-02Correct manpath(1) command in man completionTom Ryder1-1/+1
I added the "a" as a quick-and-dirty test for the fallback condition below it, and accidentally committed it in 7d6fe8b.
2018-12-02Adjust quoting and termination for man completionTom Ryder1-3/+3
2018-12-02Update glob settings for manual page completionTom Ryder1-12/+4
2018-12-02Make `sec` a local var in man page completionTom Ryder1-0/+1
2018-12-02Remove unneeded `local` declarationTom Ryder1-1/+0
2018-12-02Reorder pattern filters for Makefile linesTom Ryder1-2/+2
2018-12-02Add some comments to keep() completionTom Ryder1-0/+4
2018-12-02Correct find(1) completion to subshell exitTom Ryder1-1/+1
2018-12-02Correct completion quoting for eds(1df)Tom Ryder1-2/+2
2018-12-02Overhaul Bash completion scriptsTom Ryder17-430/+437
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.
2018-12-02Reduce ud() completion to just dirnamesTom Ryder1-35/+2
This was really overdoing it.
2018-12-02Apply syntax fixes to last _text_filenames specsTom Ryder4-4/+8
2018-12-02Rearrange _text_filenames completion a littleTom Ryder1-12/+14
Use an integer index for adding values.
2018-12-02Remove prompt() completionTom Ryder1-2/+0
This is just overkill in retrospect.
2018-12-02Throw away chgrp completionTom Ryder1-14/+0
I almost never run this as my own user.
2018-12-02Throw away Git Bash completionTom Ryder1-198/+0
Too complicated, for too little benefit. What would probably be better would be bindings in Bash specifically for completing Git remotes, tags, etc.
2018-12-02Remove mysql(1) completionTom Ryder1-42/+0
It would be better to refactor this as just listing databases.
2018-12-02Use consistent temp names for shell subfile varsTom Ryder2-11/+29
2018-12-02Overhaul pass(1) completionTom Ryder1-23/+23
Remove Bash 4.0 requirement by using globstar dynamically if found.
2018-12-02Adjust syntax of two more completion loadsTom Ryder2-2/+4
These were missed for 65e47bf, somehow.
2018-12-02Remove ftp(1) completionTom Ryder1-33/+0
I don't remember the last time I used a .netrc file.
2018-12-01Remove `kill` completionTom Ryder2-17/+2
Completing PIDs is stupid, in retrospect.
2018-12-01Use the positional parameter aliases for wordsTom Ryder20-47/+43
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.
2018-12-01Overhaul bd() completion againTom Ryder1-16/+43
I forgot that the second positional parameter $2 to these completion functions is the word currently being completed. That's going to make things a bit less verbose.
2018-12-01Remove unneeded -q option to shopt -s commandsTom Ryder2-2/+2
2018-12-01Don't include dotfiles in keep() namesTom Ryder1-1/+1
Variable and function names in Bash can't start with a period, so it's not appropriate to use the `dotglob` shell option to include dotfiles.
2018-12-01Use consistent comments for version numbersTom Ryder1-1/+1
2018-12-01Fix backwards test for gpg(1) completionTom Ryder1-1/+2
2018-12-01Overhaul and expand abook address Bash completionTom Ryder1-7/+30
2018-12-01Restore correct completion function for mutt(1)Tom Ryder1-2/+2
This was mistakenly changed to _text_filenames in 65e47bf.
2018-12-01Use simpler keyword complete for `path` subcommandTom Ryder1-3/+11
2018-12-01Break up a couple of long linesTom Ryder2-2/+5
2018-12-01Remove unneeded local array declarationTom Ryder1-1/+0
2018-12-01Remove unneeded empty result short circuitTom Ryder1-3/+0
2018-12-01Remove redundant error code in short circuitsTom Ryder8-10/+10
2018-12-01Adjust loop short circuits and pattern matchesTom Ryder10-20/+45
2018-12-01Remove unneeded quoting in case statementTom Ryder1-1/+1
2018-12-01Remove needless line breaks from git completionTom Ryder1-6/+2
2018-12-01Use inverting exclam mark outside conditionalTom Ryder1-4/+4
2018-12-01Remove stray comment no longer applicableTom Ryder1-2/+0