aboutsummaryrefslogtreecommitdiff
path: root/bash
Commit message (Collapse)AuthorAgeFilesLines
...
* Add explicit -n to hgrep() $HISTFILE checkTom Ryder2016-08-101-1/+1
|
* Remove "hg" from possible completions for prompt()Tom Ryder2016-08-101-1/+1
|
* Remove Mercurial support from Bash promptTom Ryder2016-08-101-37/+0
| | | | | | Since Vim and Fanboy's list both moved to Git, I have no reason to use it anymore. Also added a note explaining why I've left the SVN stuff in there (I don't like SVN, but I do need to use it for work)
* Switch fnl()/scr() to use mktd(1)Tom Ryder2016-08-042-6/+3
|
* Remove error in expansion quotingTom Ryder2016-08-031-1/+1
|
* Move clrd()/clwr() to scriptsTom Ryder2016-08-022-13/+0
| | | | | clrd(1) is POSIX sh, but clwr(1) ideally needs Readline, so I've left it as #!/bin/bash for now.
* Strip trailing newline from clrd()Tom Ryder2016-08-021-1/+0
|
* Add clrd()Tom Ryder2016-08-021-0/+6
|
* Change apf() to a shell scriptTom Ryder2016-08-021-99/+0
|
* Change bell() to a POSIX sh scriptTom Ryder2016-08-011-4/+0
|
* Tidy completion filesTom Ryder2016-07-3010-7/+10
| | | | Add comments, add short-circuit to vared() completion
* Change cf() from Bash func to shell scriptTom Ryder2016-07-301-29/+0
|
* Move sprunge() Bash function to spr(1)Tom Ryder2016-07-301-5/+0
|
* Change pa and paz bash funcs to sh scriptsTom Ryder2016-07-302-11/+0
|
* Use terser syntax for .d loop sourcesTom Ryder2016-07-301-16/+10
|
* Rename vis completion to edsTom Ryder2016-07-301-7/+7
|
* Move bash completion setup into separate dirTom Ryder2016-07-3033-217/+218
|
* Change ca from Bash func to sh scriptTom Ryder2016-07-301-4/+0
|
* Change mkmv/mkcp from Bash funcs to sh scriptsTom Ryder2016-07-302-8/+0
|
* Remove md.bashTom Ryder2016-07-241-4/+0
| | | | Not really justified
* Remove custom length limit on login fortunesTom Ryder2016-07-231-1/+1
| | | | OpenBSD doesn't have -n
* Replace use of ${var:?} with explicit errorsTom Ryder2016-07-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <http://mywiki.wooledge.org/BashFAQ/100#Default_or_alternate_values> >Nobody ever uses ${var?word} or ${var:?word}. Please pretend they don't >exist, just like you pretend set -e and set -u don't exist. ><tejr> from FAQ 100: >Nobody ever uses ${var?word} or ${var:?word}. ><tejr> why is that? just because it's unwieldy, or are there other >technical reasons? ><ormaaj> tejr: Putting random fatal unhandlable errors into a script is >generally useless. ><tejr> ormaaj: is it less handleable than a more explicit check, like >`[[ $var ]] || exit 1` ? ><ormaaj> yes ><ormaaj> # : ; ${_[RANDOM%2]?:you win} ><shbot> ormaaj: no output ><ormaaj> didn't win ><tejr> i was thinking more as a terse means of perhaps asserting a >variable had a value, like a positional parameter; are you saying if >you really did just want to write to stderr and exit with failure, it's >still inappropriate? ><ormaaj> depends on the complexity I suppose but I'd not consider that >unless it's the global scope in a file you know isn't going to be >sourced and has no other explicit error handling. Even then it's ugly >because it bails out in the middle of evaluating parameters that >technically could have side-effects and such. ><tejr> ahh yes, kinda a separation of concerns ><tejr> that makes more sense now! thank you > * tejr combs his scripts to see if he's used it anywhere ><ormaaj> tejr: another reason is the type of error is a bash error >which usually indicates a problem with the script where bash itself >can't continue. An unset var isn't a " bash error", You can even make >it print counterintuitive error messages that look like bash internal >errors. ><tejr> ormaaj: also compelling ><tejr> i've found a few "{@:?}"s in here so i'm fixing them up now ><tejr> thanks for the analysis
* Quote expansions within parameter expansionsTom Ryder2016-07-1513-22/+21
| | | | | | I made the incorrect assumption that it was safe not to do this; expansions that include glob characters, for example, can cause problems.
* Terser `read -rd ''` idiomTom Ryder2016-07-1511-12/+12
|
* Use set rather than building arg arraysTom Ryder2016-07-025-32/+27
| | | | | | Allows for terser functions and avoids error-prone local variables; also nicer to have a single `command` call at the end of the function (although there are still two at the end of the ed(1) wrapper)
* Terser pa/paz implementationsTom Ryder2016-07-022-6/+4
|
* Switch back to read array split for targetsTom Ryder2016-06-251-2/+8
| | | | Works better than the well-intended while-read loop
* More efficient/terser make(1) completionTom Ryder2016-06-241-21/+29
|
* Remove unneeded linebreak backslashesTom Ryder2016-06-216-17/+14
| | | | | | | | | | | Handy command: $ find bin sh bash -type f -exec grep \ -e '|| \\$' \ -e '&& \\$' \ -e '^\s*||' \ -e '^\s*&&' \ {} +
* Correct td(1) completionTom Ryder2016-06-151-4/+4
| | | | Forgot to narrow completions down to ones that match the current word
* Add per-file editing and completion for td(1)Tom Ryder2016-06-141-0/+18
| | | | I have "todo", "comp", and "writ".
* Switch from prompt image to plain textTom Ryder2016-06-091-1/+1
| | | | More compatible, want to display this in Cgit as well
* Move PROMPT_RETURN declaration to top of funcTom Ryder2016-05-041-1/+4
|
* Add means to change prompt colorTom Ryder2016-04-231-3/+8
|
* Remove curly bracesTom Ryder2016-04-141-1/+1
|
* Remove blank lines at end of filesTom Ryder2016-03-2858-58/+0
|
* Add readv functionTom Ryder2016-03-281-0/+26
|
* Complete man pages only for exact section matchTom Ryder2016-03-191-1/+1
|
* Refactor ed() wrapper, add rlwrap(1)Tom Ryder2016-03-161-7/+22
|
* Remove unneeded read junk varTom Ryder2016-03-151-1/+1
|
* Protect PS1 variable expansionsTom Ryder2016-03-151-2/+2
|
* Only show git VCS stuff by defaultTom Ryder2016-03-141-1/+6
| | | | | | | | On my work machines, I'll make a file ~/.bashrc.d/prompt.bash which includes a PROMPT_VCS=(git svn) line. I don't really use Mercurial at all, now that the Vim sources have moved to Git; certainly not enough to check for it on every prompt load ...
* md() shortcut for mkdir(1)Tom Ryder2016-03-051-0/+5
|
* Tell shellcheck it's wrong about this lineTom Ryder2016-03-031-3/+2
|
* Add clwr() funcTom Ryder2016-03-021-0/+9
|
* Unsigned integers for printfTom Ryder2016-02-273-3/+3
|
* Variable assignments are not Makefile targetsTom Ryder2016-01-071-1/+1
|
* Add man page section to commentTom Ryder2015-12-241-2/+2
|
* Add missing case terminatorTom Ryder2015-12-241-0/+2
|
* Remove unneeded extglob setTom Ryder2015-12-241-3/+2
|