aboutsummaryrefslogtreecommitdiff
path: root/sh
Commit message (Collapse)AuthorAgeFilesLines
* Fix up a few cosmetic shell anti-patternsTom Ryder2019-03-291-1/+1
|
* Return to vi as default visual editorTom Ryder2019-01-071-7/+2
| | | | | | This is getting in the way of my work a bit too much. I'm still learning how to use it, but throwing myself into the deep end at this point turned out to be a bad idea.
* Further attempts at sane Emacs VISUAL settingTom Ryder2019-01-041-21/+5
|
* Block stderr from emacs daemon startupTom Ryder2019-01-021-1/+1
|
* Use short switches for emacs server pgrepTom Ryder2019-01-021-2/+1
| | | | | Turns out the pgrep from procps version 3.2.8 doesn't support these longer options.
* Add emacsclient logic to $VISUAL setTom Ryder2019-01-021-4/+20
|
* Switch to using GNU Emacs on development machinesTom Ryder2019-01-011-2/+8
| | | | | | | | | | | | | | > Andromeda, by Perseus sav'd and wed, > Hanker'd each day to see the Gorgon's head: > Till o'er a fount he held it, bade her lean, > And mirror'd in the wave was safely seen > That death she liv'd by. > Let not thine eyes know > Any forbidden thing itself, although > It once should save as well as kill: but be > Its shadow upon life enough for thee. > > --Dante Gabriel Rossetti
* Add clarifying commentTom Ryder2018-12-311-1/+1
|
* Translate a short-circuit into a conditionalTom Ryder2018-12-311-1/+3
| | | | | I only want to use the `||` short-circuits for control flow changes (return, continue, break etc).
* Add a cheeky error message to sd()Tom Ryder2018-12-311-0/+6
|
* Strip trailing slashes from sd() targetTom Ryder2018-12-311-0/+8
|
* Correct error message from sd()Tom Ryder2018-12-311-1/+1
|
* Two-space sentences in shell commentsTom Ryder2018-12-278-10/+10
|
* Follow ShellCheck's recommendation of -z over !-nTom Ryder2018-12-172-2/+2
| | | | I think !-n is a little clearer, but -z is OK.
* Adjust PS1-PS4 resetTom Ryder2018-12-171-5/+12
|
* Use exec for clearer subshell semanticsTom Ryder2018-12-171-1/+1
|
* Use `command` consistently, silence ShellCheckTom Ryder2018-12-1711-13/+23
| | | | | | | | | | ShellCheck (SC2164) is upset about these `cd` commands where the return type isn't being checked, but they're all by design, as they're the last command in the function, and thereby constitute the function's return value implicitly. Otherwise, this commit changes the shrc.d and profile.d subfiles to use the `command` wrapper only where it's actually needed.
* Refactor some conditionalsTom Ryder2018-12-1115-48/+91
|
* Factor out zsh ENV hack into one fileTom Ryder2018-12-111-8/+0
| | | | | It's a bit silly to have this in ~/.profile; it doesn't need to be there for such a niche case.
* Refactor "path list" not to require a subshellTom Ryder2018-12-111-8/+9
|
* Remove unneeded semicolon from sh "for VAR ; do"Tom Ryder2018-12-061-1/+1
| | | | | It turns out the semicolon belongs to the "in" syntax, and is optional without it.
* Remove a lot of alignment spacingTom Ryder2018-11-233-10/+10
|
* Use case statement for sudo -v switchingTom Ryder2018-10-241-1/+4
| | | | This is slightly more idiomatic shell.
* Add e() and v() wrappersTom Ryder2018-08-072-0/+8
|
* Break sh noglob guard into two lines for clarityTom Ryder2018-06-292-2/+4
| | | | They're nicer to read this way.
* Remove redundant NR==1 in awk(1) callTom Ryder2018-06-131-1/+1
| | | | Duhhhhh.
* Silence errors from missing mesg(1)Tom Ryder2018-02-241-1/+1
| | | | | Funtoo Linux does not include this tool by default. It's not important enough to raise the error message on every login.
* Quote EDITOR/VISUAL assignments for clarityTom Ryder2018-01-152-4/+4
| | | | | | | | | | | | | | | | | This appeases ShellCheck 0.4.7, which is fretting that I meant a command expansion. I didn't, but it seems a bit nicer to quote these anyway. In sh/profile.d/editor.sh line 4: EDITOR=ed ^-- SC2209: Use var=$(command) to assign output (or quote to assign string). In sh/profile.d/editor.sh line 22: EDITOR=ex ^-- SC2209: Use var=$(command) to assign output (or quote to assign string). In sh/profile.d/visual.sh line 2: VISUAL=vi ^-- SC2209: Use var=$(command) to assign output (or quote to assign string).
* Explicitly ignore uninteresting tree(1) optsTom Ryder2018-01-151-0/+1
| | | | | | | | ShellCheck 0.4.7 complained about this: In sh/shrc.d/tree.sh line 12: case $opt in ^-- SC2220: Invalid flags are not handled. Add a *) case.
* Remove --batch option and wrapper for gpg(1)Tom Ryder2017-12-291-10/+0
| | | | | | | | This was originally added to cut the decryption boilerplate, which no longer seems to be an issue; I think that --quiet may be correctly blocking it now. Even without this, it caused more problems than it solved when gpg(1) genuinely did need user interaction from me, for example for --update-trustdb.
* Strip trailing whitespaceTom Ryder2017-11-131-1/+1
|
* Merge branch 'master' into port/bsd/freebsdTom Ryder2017-07-2813-47/+15
|\
| * Adjust linebreak behaviour around downloads checkTom Ryder2017-07-261-1/+4
| |
| * Gracefully handle two failed tput color callsTom Ryder2017-07-113-3/+3
| |
| * Put local gamesdir at end of PATHTom Ryder2017-07-011-1/+1
| | | | | | | | | | So that if anything actually important has the same name, that's used instead
| * Remove env(1) sortingTom Ryder2017-06-301-8/+0
| | | | | | | | | | Not worth the potential confusion. If I want nice sorted information I can either pipe it through sort myself, or use `declare -px` in Bash.
| * Use short hostname in default promptTom Ryder2017-06-241-1/+1
| |
| * Fix up an error messageTom Ryder2017-06-231-1/+1
| |
| * Add ed() options file checkTom Ryder2017-06-231-0/+4
| |
| * Remove user@ prefix from promptTom Ryder2017-06-191-2/+2
| |
| * More segmentation/tidyingTom Ryder2017-06-182-9/+0
| |
| * Break plenv stuff into its own targetTom Ryder2017-06-182-22/+0
| |
* | Merge branch 'master' into port/bsd/freebsdTom Ryder2017-06-0212-324/+213
|\|
| * Conditions for downloads.shTom Ryder2017-05-311-0/+15
| |
| * Some extra newlinesTom Ryder2017-05-311-1/+1
| |
| * Add "downloads.sh" profile eventTom Ryder2017-05-311-0/+13
| | | | | | | | | | | | Looks for ~/.downloads, checks each named dir, if there are any files in it, warns you once per dir including a count. This is to prompt me into sorting my downloads directory.
| * Simplify rd() a lotTom Ryder2017-05-271-35/+10
| | | | | | | | Including removing the pesky subshell
| * Revert "Remove redundant `|| return` from gd()"Tom Ryder2017-05-271-1/+1
| | | | | | | | | | | | This reverts commit 1302b279bf2b1b2ae76ea8251a32e480d64f2f7a. This was added because of Shellcheck being fussy
| * More error-resistant sd()Tom Ryder2017-05-273-32/+62
| |
| * Remove redundant `|| return` from gd()Tom Ryder2017-05-271-1/+1
| | | | | | | | It will do that implicitly anyway