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