Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename vis completion to eds | Tom Ryder | 2016-07-30 | 1 | -7/+7 |
| | |||||
* | Move bash completion setup into separate dir | Tom Ryder | 2016-07-30 | 33 | -217/+218 |
| | |||||
* | Change ca from Bash func to sh script | Tom Ryder | 2016-07-30 | 1 | -4/+0 |
| | |||||
* | Change mkmv/mkcp from Bash funcs to sh scripts | Tom Ryder | 2016-07-30 | 2 | -8/+0 |
| | |||||
* | Remove md.bash | Tom Ryder | 2016-07-24 | 1 | -4/+0 |
| | | | | Not really justified | ||||
* | Remove custom length limit on login fortunes | Tom Ryder | 2016-07-23 | 1 | -1/+1 |
| | | | | OpenBSD doesn't have -n | ||||
* | Replace use of ${var:?} with explicit errors | Tom Ryder | 2016-07-15 | 1 | -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 expansions | Tom Ryder | 2016-07-15 | 13 | -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 ''` idiom | Tom Ryder | 2016-07-15 | 11 | -12/+12 |
| | |||||
* | Use set rather than building arg arrays | Tom Ryder | 2016-07-02 | 5 | -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 implementations | Tom Ryder | 2016-07-02 | 2 | -6/+4 |
| | |||||
* | Switch back to read array split for targets | Tom Ryder | 2016-06-25 | 1 | -2/+8 |
| | | | | Works better than the well-intended while-read loop | ||||
* | More efficient/terser make(1) completion | Tom Ryder | 2016-06-24 | 1 | -21/+29 |
| | |||||
* | Remove unneeded linebreak backslashes | Tom Ryder | 2016-06-21 | 6 | -17/+14 |
| | | | | | | | | | | | Handy command: $ find bin sh bash -type f -exec grep \ -e '|| \\$' \ -e '&& \\$' \ -e '^\s*||' \ -e '^\s*&&' \ {} + | ||||
* | Correct td(1) completion | Tom Ryder | 2016-06-15 | 1 | -4/+4 |
| | | | | Forgot to narrow completions down to ones that match the current word | ||||
* | Add per-file editing and completion for td(1) | Tom Ryder | 2016-06-14 | 1 | -0/+18 |
| | | | | I have "todo", "comp", and "writ". | ||||
* | Switch from prompt image to plain text | Tom Ryder | 2016-06-09 | 1 | -1/+1 |
| | | | | More compatible, want to display this in Cgit as well | ||||
* | Move PROMPT_RETURN declaration to top of func | Tom Ryder | 2016-05-04 | 1 | -1/+4 |
| | |||||
* | Add means to change prompt color | Tom Ryder | 2016-04-23 | 1 | -3/+8 |
| | |||||
* | Remove curly braces | Tom Ryder | 2016-04-14 | 1 | -1/+1 |
| | |||||
* | Remove blank lines at end of files | Tom Ryder | 2016-03-28 | 58 | -58/+0 |
| | |||||
* | Add readv function | Tom Ryder | 2016-03-28 | 1 | -0/+26 |
| | |||||
* | Complete man pages only for exact section match | Tom Ryder | 2016-03-19 | 1 | -1/+1 |
| | |||||
* | Refactor ed() wrapper, add rlwrap(1) | Tom Ryder | 2016-03-16 | 1 | -7/+22 |
| | |||||
* | Remove unneeded read junk var | Tom Ryder | 2016-03-15 | 1 | -1/+1 |
| | |||||
* | Protect PS1 variable expansions | Tom Ryder | 2016-03-15 | 1 | -2/+2 |
| | |||||
* | Only show git VCS stuff by default | Tom Ryder | 2016-03-14 | 1 | -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 Ryder | 2016-03-05 | 1 | -0/+5 |
| | |||||
* | Tell shellcheck it's wrong about this line | Tom Ryder | 2016-03-03 | 1 | -3/+2 |
| | |||||
* | Add clwr() func | Tom Ryder | 2016-03-02 | 1 | -0/+9 |
| | |||||
* | Unsigned integers for printf | Tom Ryder | 2016-02-27 | 3 | -3/+3 |
| | |||||
* | Variable assignments are not Makefile targets | Tom Ryder | 2016-01-07 | 1 | -1/+1 |
| | |||||
* | Add man page section to comment | Tom Ryder | 2015-12-24 | 1 | -2/+2 |
| | |||||
* | Add missing case terminator | Tom Ryder | 2015-12-24 | 1 | -0/+2 |
| | |||||
* | Remove unneeded extglob set | Tom Ryder | 2015-12-24 | 1 | -3/+2 |
| | |||||
* | Improve pattern matching a bit | Tom Ryder | 2015-12-24 | 1 | -1/+1 |
| | |||||
* | Better section management for man completion | Tom Ryder | 2015-12-22 | 1 | -8/+15 |
| | |||||
* | Avoid calling cat(1) by using builtins | Tom Ryder | 2015-12-18 | 2 | -2/+6 |
| | |||||
* | Flatten _path completion spec a bit | Tom Ryder | 2015-12-15 | 1 | -54/+51 |
| | |||||
* | Make short-circuits a bit more explicit | Tom Ryder | 2015-12-15 | 3 | -8/+22 |
| | |||||
* | Flatten bash_profile.d subscripts a bit | Tom Ryder | 2015-12-15 | 3 | -16/+34 |
| | |||||
* | Remove unneeded args spec | Tom Ryder | 2015-12-15 | 1 | -1/+1 |
| | |||||
* | Localise a stray variable | Tom Ryder | 2015-12-14 | 1 | -0/+1 |
| | |||||
* | Switch to a faster method of array appending | Tom Ryder | 2015-12-14 | 19 | -58/+59 |
| | | | | | Does away with the nasty hack around man page discovery, and still compatible with Bash 2.05a | ||||
* | Fix some English | Tom Ryder | 2015-12-13 | 1 | -1/+1 |
| | |||||
* | Add more detail on bashkeep usage | Tom Ryder | 2015-12-11 | 1 | -6/+25 |
| | |||||
* | Whoops, dropped an important character | Tom Ryder | 2015-12-11 | 1 | -1/+1 |
| | |||||
* | Put printing/globbing in subshell | Tom Ryder | 2015-12-11 | 1 | -5/+9 |
| | |||||
* | Create bashkeep directory if it doesn't exist | Tom Ryder | 2015-12-11 | 1 | -0/+1 |
| | |||||
* | Restore previous fnl syntax for shellcheck | Tom Ryder | 2015-12-11 | 1 | -2/+3 |
| |