aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/path.bash
Commit message (Collapse)AuthorAgeFilesLines
* Port path() to POSIX shTom Ryder2016-08-201-180/+0
| | | | That was a lot easier than I thought
* Move bash completion setup into separate dirTom Ryder2016-07-301-61/+0
|
* Terser `read -rd ''` idiomTom Ryder2016-07-151-1/+1
|
* Remove unneeded linebreak backslashesTom Ryder2016-06-211-2/+1
| | | | | | | | | | | Handy command: $ find bin sh bash -type f -exec grep \ -e '|| \\$' \ -e '&& \\$' \ -e '^\s*||' \ -e '^\s*&&' \ {} +
* Remove blank lines at end of filesTom Ryder2016-03-281-1/+0
|
* Avoid calling cat(1) by using builtinsTom Ryder2015-12-181-1/+3
|
* Flatten _path completion spec a bitTom Ryder2015-12-151-54/+51
|
* Localise a stray variableTom Ryder2015-12-141-0/+1
|
* Switch to a faster method of array appendingTom Ryder2015-12-141-13/+9
| | | | | Does away with the nasty hack around man page discovery, and still compatible with Bash 2.05a
* Change COMP_REPLY to intended COMP_WORDSTom Ryder2015-10-211-1/+1
|
* When expanding with globbing, use prefixTom Ryder2015-10-211-3/+1
| | | | | Rather than generating all possible completions and then filtering them down, use the completing word as a prefix for the glob
* Switch compopt back outTom Ryder2015-10-211-3/+6
| | | | | Damn, looks like 2.05a doesn't have compopt; put it back into the complete line
* Tidy up completion considerably; no more compgenTom Ryder2015-10-211-80/+97
| | | | | | | | | | | | | | * Remove all instances of compgen; for filename completion it's quite broken as it relies on implicit wordsplitting in array context, and doesn't have an option to print with a null delimiter; replaced with manual for/while loops instead * Add IFS= to while/read loops over filenames * Use "dirname/s" instead of "dir/s" variables to avoid keyword collisions and for clarity * Remove some unnecessary variables * Use shorter syntax for loop exit conditions * Move completion options into functions where applicable rather than having them on the completion definition itself
* Handle spaces correctly in completionsTom Ryder2015-10-201-0/+2
| | | | | | This is technically still wrong; COMPREPLY needs to be specified with null-delimited IFS, as done in the pass() function. This will do for now.
* Put path func help into heredocTom Ryder2015-09-081-20/+22
| | | | A little more manageable
* More intelligent trailing-slash filteringTom Ryder2015-08-051-7/+10
|
* Remove unneeded 'in "$@"' for argument iterationTom Ryder2015-06-261-1/+1
| | | | for defaults to iterating over the arguments
* Improve directory completion for $PATHTom Ryder2015-06-151-0/+2
|
* Remove unneeded quotesTom Ryder2015-06-121-4/+4
|
* Separate declaration from assignmentTom Ryder2015-06-061-8/+14
|
* Missing word as possible completionTom Ryder2015-06-051-1/+1
|
* Thorough completion for pathTom Ryder2015-06-051-1/+45
|
* Don't print empty line for empty PATHTom Ryder2015-06-051-1/+3
|
* Don't allow dirs with : in nameTom Ryder2015-06-051-0/+10
| | | | | | | <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03> "Since <colon> is a separator in this context, directory names that might be used in PATH should not include a <colon> character."
* Remove redundant arg checkTom Ryder2015-06-051-2/+2
|
* Couple of minor tweaks to path()Tom Ryder2015-06-051-1/+1
|
* Add path() functionTom Ryder2015-06-051-0/+158