aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/grep.bash
Commit message (Collapse)AuthorAgeFilesLines
* Port grep() and ls() to POSIX shTom Ryder2016-08-181-35/+0
| | | | | | Check capabilities of wrapped programs at runtime, not declaration time. Also do away with the silly GREP_COLORS and GREP_OPTS variables. Considering doing the same with LS_COLORS.
* Keep grep(1) option metadata in cacheTom Ryder2016-08-151-9/+11
| | | | | | | | | It's stupid to run `grep --help` once per shell (twice for login shells!) when it's so unlikely to change, and way faster to check for the presence or absence of hint files rather than pattern-match the output with the shell. ls(1) will get the same treatment in a minute.
* Remove blank lines at end of filesTom Ryder2016-03-281-1/+0
|
* Switch to a faster method of array appendingTom Ryder2015-12-141-4/+4
| | | | | Does away with the nasty hack around man page discovery, and still compatible with Bash 2.05a
* Undo hare-brained last few commitsTom Ryder2015-06-241-24/+19
| | | | | GREP_OPTIONS doesn't work if it's not exported, which ought to have been painfully obvious. Oh well.
* Use Bashy syntax to build GREP_OPTIONS more nicelyTom Ryder2015-06-241-22/+12
|
* Remove GREP_OPTIONS exportTom Ryder2015-06-241-5/+0
|
* Move GREP_OPTIONS building to bashrcTom Ryder2015-06-241-0/+35
| | | | | Shouldn't be exported because it changes the behaviour of grep(1), which might have unwanted side effects in scripts
* Avoid command substitution inline declarationTom Ryder2015-06-061-1/+2
|
* Use consistent [[ syntaxTom Ryder2015-06-041-1/+1
| | | | Explicit -n, ! within [[
* Avoid condition definition of functionsTom Ryder2015-05-311-11/+14
|
* Consistent color count methodTom Ryder2015-05-311-2/+4
|
* Overhaul grep(1) and ls(1) options and wrappersTom Ryder2015-05-301-39/+12
|
* Ignore tput(1) stderrTom Ryder2015-05-301-1/+1
|
* Move array decs inline, remove quotesTom Ryder2014-10-101-6/+3
|
* Remove brace expansion for grep aliasTom Ryder2014-10-101-3/+7
|
* Use space before semicolon as command separatorTom Ryder2014-02-101-3/+3
|
* Fix some hare-brained commentsTom Ryder2013-09-151-1/+1
|
* Some more array syntax fixesTom Ryder2013-09-101-4/+4
|
* Turns out older Bash is muddled by var=()Tom Ryder2013-09-011-1/+1
| | | | Initialisation with an array literal doesn't work in 2.05a
* More sensible use of localTom Ryder2013-09-011-4/+4
| | | | | | Don't declare integers/arrays, just use them. Also includes a minor scope fix -- don't need to count number of colors on every call to prompt(), just for `prompt on`.
* Fix commentTom Ryder2013-08-301-1/+1
|
* Specify -f for unsetting helper functionsTom Ryder2013-08-281-1/+1
|
* Remove unneeded underscores before helper funcsTom Ryder2013-08-281-3/+3
|
* Standardise use of printfTom Ryder2013-08-211-1/+1
|
* Remove unnecessary quoting in simple assignmentsTom Ryder2013-08-201-2/+2
|
* Remove unneeded quoting within [[ ]]Tom Ryder2013-08-201-4/+4
|
* Move --color option for grep to end of aliasTom Ryder2013-08-181-7/+7
|
* Add some comments to the ls/grep alias functionsTom Ryder2013-08-181-0/+15
|
* Use arithmetic expression for color space testsTom Ryder2013-08-181-1/+2
|
* Use arrays to collect options for ls/grep aliasesTom Ryder2013-08-181-5/+6
|
* Improve color detection logic for prompt/ls/grepTom Ryder2013-08-051-1/+1
| | | | Use tput properly and only when found and necessary
* Use standard structure for if/for in shellTom Ryder2013-07-311-6/+9
| | | | | | | | | | | | | | | | | | | Mostly for clarity reasons; using this syntax: if [ condition ]; then commands fi As opposed to: if [ condition ] then commands fi Or: [ condition ] && command
* Place missing quotesTom Ryder2013-07-301-2/+2
|
* Fix grep/ls aliasing for efficiency/correctnessTom Ryder2013-07-301-5/+5
| | | | Avoiding the use of echo, using builtins whereever possible
* More portable non-surprise syntax for functionsTom Ryder2013-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | <tyrmored> is this syntax actually problematic? <tyrmored> function whatever { <tyrmored> thangs <tyrmored> } <zendeavor> !pf function <greybot> http://mywiki.wooledge.org/BashPitfalls#pf25 -- Don't do this! -- function foo() <tyrmored> i know it's bashism, but is it bad practice <tyrmored> yeah i know that much <tyrmored> (no parens, that is) <zendeavor> it's not necessarily a bashism, but the function keyword has implications in other shells <zendeavor> and, perhaps someday in the future, for bash as well <tyrmored> hmm, so i should use this syntax even if the scripts are explicitly bash? <ffio> hi zendeavor :) <zendeavor> you should use foo() { echo bar; } <tyrmored> rightoh <zendeavor> no surprising behaviour that way, ever <tyrmored> makes sense <zendeavor> it won't matter *much* but element of least surprise
* Unset helper functions for ls/grep setupTom Ryder2013-07-211-0/+3
| | | | These are no longer needed after the alias has been established.
* Remove trailing spaces before closing parenthesesTom Ryder2013-07-211-1/+1
| | | | I was only doing this to work around a Bash syntax highlighting bug
* Just check ls/grep option calls onceTom Ryder2013-06-241-3/+4
|
* Massive overhaul of structure for Bash filesTom Ryder2013-06-201-0/+15
* No longer using .bash_logout * No longer using .bash_profile, using POSIX-compliant .profile * instead; in particular, moved most of environment settings into .profile * Moved some of the separable functionality of both .profile and .bashrc into subdirectories (some scripts shared, some not) * Tidied implementation of ls/grep aliases * Updated install script to reflect all of the above