path: root/bash
AgeCommit message (Collapse)AuthorFilesLines
2018-11-30Remove redundant return short-circuitTom Ryder1-1/+1
2018-11-30Add explanatory comments for version checkTom Ryder1-3/+3
2018-11-30Use ||/&& short-circuiting only for flow controlTom Ryder4-28/+61
If we're doing something besides return/exit, it should be a proper `if` condition so that the semantics are clearer.
2018-11-30Drop support for Bash <= 3.0Tom Ryder14-95/+15
This allows removing a fair bit of boilerplate checking for the availability of `-o bashdefault` for the `complete` builtin, and greatly simplifies the minimum version check.
2018-10-31Add left-parens to inner case statementsTom Ryder9-18/+18
This helps older versions of Bash understand that the surrounding subshell isn't terminating.
2018-10-31Add missing ;; terminatorsTom Ryder9-0/+9
2018-10-30Respect completion-ignore-case in custom functionsTom Ryder9-0/+129
This involves a little too much boilerplate for my liking, but it's still an improvement over what I had before. I might find a way to make this into a generic function.
2018-08-22Add .m4a to text filenames completion skipsTom Ryder1-2/+2
2018-07-25Stamp down three new ShellCheck 0.5.0 errorsTom Ryder2-2/+2
All of these are false positives.
2018-06-29Break sh noglob guard into two lines for clarityTom Ryder3-3/+6
They're nicer to read this way.
2018-06-29Correct typo in .bashrcTom Ryder1-1/+1
2017-11-08Quote all Bash completion targets literallyTom Ryder1-45/+46
This helps ShellCheck understand them as literal strings for linting purposes, but it seems (and highlights) a little bit clearer this way anyway.
2017-11-06Add "do", "then" keywords to Bash completionTom Ryder1-0/+2
The Bash keywords "do" and "then" will be followed by another command. Adding them to this list means that pressing tab after "if foo ; then b" will complete for all command names beginning with "b". I was actually a little surprised that this worked, but there isn't really any reason to be; they're shell words just like everything else, not metasyntactic characters or anything like that.
2017-11-06Break bash/bashrc.d/completion.bash inline listsTom Ryder1-19/+66
Break the sometimes long list of target keywords after the `complete` builtin and its options into newline-separated lists. This should make reading these lists a little easier, and also confuses Vim's syntax highlighting somewhat less.
2017-07-05Escape backslashes in command prompt outputTom Ryder1-4/+10
To stop them getting interpreted as \h, \w etc. None of these *should* be able to emit backslashes (it's an illegal branch name), but best to be thorough.
2017-06-19Remove user@ prefix from promptTom Ryder1-2/+2
2017-06-16Allow setting a prompt mode for the shellTom Ryder1-2/+2
2017-06-10Unset command_not_found_handle in Bash startupTom Ryder1-0/+3
2017-05-26Remove ad()Tom Ryder1-2/+0
It has no real advantages over and isn't as clever as just cd /a*/b*/c*
2017-05-26Correct comment spelling errorTom Ryder1-1/+1
2017-05-23Fix up completions for td(1df)Tom Ryder1-4/+11
Hung on null completion
2017-03-31Handle POSIX correctness in ~/.bash_profileTom Ryder1-0/+7
2017-02-26Remove error-prone git-add(1) completionTom Ryder1-23/+0
Just files and directories will do fine
2017-02-17Revert "Use backslash to escape single char"Tom Ryder1-2/+2
This reverts commit 245c2d6647e34fb432066360499ed02c5711271c. shellcheck worries about this.
2017-02-13Correct comment in `source` completionTom Ryder1-1/+1
2017-02-13Add chgrp(1) completionTom Ryder1-0/+20
2017-02-12Use backslash to escape single charTom Ryder1-2/+2
2017-02-12More accurate commend for hostcomplete (turn off)Tom Ryder1-2/+2
2017-02-12Add mail(1)/mutt(1) abook address completionTom Ryder3-0/+30
2017-02-12Use bashdefault if available in more completionsTom Ryder8-8/+56
2017-02-10Break a long lineTom Ryder1-2/+2
2017-02-10Break a long lineTom Ryder1-1/+2
2017-02-10Improve and correct some commentsTom Ryder2-28/+30
2017-01-28Add completion for finger(1)Tom Ryder1-0/+2
2017-01-28Use FUNCNAME for self-refs in Git completionTom Ryder1-9/+9
2017-01-28Add openssl(1ssl) completionTom Ryder1-0/+32
2017-01-28Fix nc(1) completions, add nmap(1) completionsTom Ryder3-2/+6
2017-01-28Add host completion for some common toolsTom Ryder5-0/+10
2017-01-28Start using Bash host completionTom Ryder2-2/+6
But use ~/.hosts if it's there
2017-01-27Extend "fallback" prompt a bitTom Ryder1-1/+4
Include username/hostname if no SSH variables
2017-01-25Add "pop" and "shift" methods to path()Tom Ryder1-1/+1
2017-01-25Show prompt prefix if a shell is exoticTom Ryder1-0/+6
That is, include e.g. "ksh:" as a prefix to the prompt if the user appears to have Bash or Zsh (or anything else) as their login shell. This is probably imperfect, but it's a start.
2017-01-25Clear away all aliases for interactive shellsTom Ryder1-0/+5
Some systems like OpenBSD or Slackware set up well-meaning aliases that I don't want. We do this for Bash, Yash, and Zsh, but not for Ksh, because it looks like its implementations all variously use aliases to implement some POSIX builtins like fc(1) or type(1) in terms of their own builtins.
2017-01-25Be more specific in ref name trimmingTom Ryder1-1/+1
e.g. for a namespaced branch "foo/bar/bar", don't strip the leading part off
2017-01-24Remove SHLVL nested shell feature for nowTom Ryder1-6/+0
Causes a bit too much curliness in configuration; may need a more comprehensive approach.
2017-01-07Remove misplaced \0 in completion funcTom Ryder1-1/+1
2017-01-03Soothe a shellcheck errorTom Ryder1-0/+1
2017-01-03Short-circuit in rbash before even loading ENVTom Ryder1-3/+4
2017-01-02Add completion for md()Tom Ryder1-0/+2
2016-12-27Add workaround to what looks like a bug to meTom Ryder1-0/+5