Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use opening parens for case safety in subshell | Tom Ryder | 2016-12-11 | 2 | -10/+10 |
| | |||||
* | Prevent getopts call in tree() panicking | Tom Ryder | 2016-12-07 | 1 | -1/+2 |
| | |||||
* | Remove setterm(1) call | Tom Ryder | 2016-12-03 | 1 | -3/+0 |
| | | | | More trouble than it's worth | ||||
* | Terser way to implement quiet command failures | Tom Ryder | 2016-12-03 | 1 | -3/+1 |
| | | | | Wrap it in curly brackets to make it a compound command | ||||
* | Split ~/.shrc off stub ~/.shinit file | Tom Ryder | 2016-12-03 | 3 | -9/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | NetBSD sh(1) and possible others don't tolerate a `return` short-circuit for ENV, which means that because that implementation also sources ENV if set regardless of whether the shell is interactive or not, all of the interactive stuff in ~/.shrc and ~/.shrc.d gets uselessly sourced and loaded up for non-interactive invocations of sh(1). To work around this, I've set ENV to be a new ~/.shinit file instead, which sources the ~/.shrc file only if the shell is interactive. ~/.shinit is the filename suggested in the man page for NetBSD sh(1) and Debian dash(1) as well. NetBSD's documented behaviour seems to be contrary to POSIX 2003: > ENV: This variable, when and only when an interactive shell is > invoked, shall be subjected to parameter expansion (see Parameter > Expansion ) by the shell, and the resulting value shall be used as a > pathname of a file containing shell commands to execute in the > current environment. No matter; this works fine, and makes non-interactive invocations of sh(1) on NetBSD much faster. | ||||
* | setterm(1) isn't as standard as I thought | Tom Ryder | 2016-12-01 | 1 | -3/+5 |
| | | | | | | | | | | | | | | | | | It's not available on default installs of any of the three major open-source BSDs, and isn't specified by POSIX. I only noticed this because the implement of sh(1) in NetBSD 7.0 seems to emit errors from calls to `command -p` to the terminal, regardless of any redirection of standard output and error: $ uname -a NetBSD faeroes 7.0.1_PATCH NetBSD 7.0.1_PATCH (GENERIC.201607220540Z) amd64 $ command -p setterm setterm: not found $ command -p setterm >/dev/null setterm: not found $ command -p setterm >/dev/null 2>&1 setterm: not found | ||||
* | Remove some trailing whitespace | Tom Ryder | 2016-10-19 | 2 | -2/+2 |
| | |||||
* | Use simpler method for `path check` | Tom Ryder | 2016-09-26 | 1 | -5/+6 |
| | | | | Easier to read and does not require a subshell | ||||
* | Correct a comment | Tom Ryder | 2016-09-18 | 1 | -2/+2 |
| | |||||
* | Move HISTSIZE and MAILCHECK to shrc | Tom Ryder | 2016-09-01 | 1 | -0/+6 |
| | | | | Turns out they're POSIX variables! | ||||
* | Refactor welcome.sh | Tom Ryder | 2016-09-01 | 1 | -38/+29 |
| | |||||
* | Use terser syntax for path addition | Tom Ryder | 2016-09-01 | 1 | -3/+1 |
| | |||||
* | Use more compatible block size for ls(1) | Tom Ryder | 2016-08-31 | 1 | -1/+1 |
| | | | | | Ancient GNU ls(1) accepts this even if it doesn't use it in the same way a more modern one does (requiring -S to show the blocks used). | ||||
* | Make comment on BROWSER more useful | Tom Ryder | 2016-08-31 | 1 | -1/+2 |
| | |||||
* | Add x() | Tom Ryder | 2016-08-30 | 1 | -0/+7 |
| | |||||
* | Fix mysql() | Tom Ryder | 2016-08-30 | 1 | -6/+12 |
| | |||||
* | Use command -p to find tty(1) | Tom Ryder | 2016-08-27 | 1 | -1/+1 |
| | |||||
* | Move SSH_ASKPASS setup to ~/.xinitrc | Tom Ryder | 2016-08-27 | 1 | -4/+0 |
| | |||||
* | Use only system-path mkdir/grep for options setup | Tom Ryder | 2016-08-27 | 1 | -2/+2 |
| | | | | A little quicker | ||||
* | Move bash-independent code ~/.bashrc -> ~/.shrc | Tom Ryder | 2016-08-27 | 1 | -0/+9 |
| | |||||
* | Fix some comments in options.sh | Tom Ryder | 2016-08-27 | 1 | -2/+2 |
| | |||||
* | Improvements to tree() to handle color options | Tom Ryder | 2016-08-26 | 1 | -3/+25 |
| | |||||
* | Add tree() | Tom Ryder | 2016-08-26 | 1 | -0/+9 |
| | |||||
* | Combine welcome messages into one script | Tom Ryder | 2016-08-25 | 4 | -69/+54 |
| | |||||
* | Remove default PS1 for sh | Tom Ryder | 2016-08-25 | 1 | -5/+0 |
| | |||||
* | Remove gore() and lore() | Tom Ryder | 2016-08-25 | 2 | -51/+0 |
| | | | | Changed my mind | ||||
* | Remove unneeded { } around options() func | Tom Ryder | 2016-08-25 | 1 | -2/+2 |
| | | | | I'm learning a lot from izabera today | ||||
* | Switch ls()/readline to horizontal list/complete | Tom Ryder | 2016-08-25 | 2 | -0/+5 |
| | | | | <https://github.com/izabera/libash/blob/9e709a56a148b4311792cc66cd21b61a73434573/extras/sample_inputrc#L33> | ||||
* | Reassure shellcheck about ls(1) piping | Tom Ryder | 2016-08-24 | 1 | -0/+1 |
| | |||||
* | Add -n to grep(1) call for gore() | Tom Ryder | 2016-08-24 | 1 | -1/+2 |
| | |||||
* | Add lore() | Tom Ryder | 2016-08-24 | 1 | -0/+28 |
| | |||||
* | Force --hide-control-chars on ls(1) if available | Tom Ryder | 2016-08-24 | 2 | -5/+12 |
| | | | | | I prefer it to literal or C-style escaping representations, and ls(1) isn't for scripting output anyway. | ||||
* | Rename gress() to gore() | Tom Ryder | 2016-08-24 | 1 | -5/+4 |
| | | | | Important work going on here, folks | ||||
* | Add gress() | Tom Ryder | 2016-08-24 | 1 | -0/+22 |
| | |||||
* | Improve a comment | Tom Ryder | 2016-08-24 | 1 | -1/+1 |
| | |||||
* | Initialise last var | Tom Ryder | 2016-08-23 | 1 | -0/+1 |
| | |||||
* | Abbreviation in fortune.sh | Tom Ryder | 2016-08-23 | 1 | -2/+1 |
| | |||||
* | Set POSIX PS1 in a less silly way | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | |||||
* | Change verse login check to use numeric test | Tom Ryder | 2016-08-23 | 1 | -2/+2 |
| | | | | shellcheck warned me that \> isn't POSIX | ||||
* | Swap `builtin` for POSIX `command` in mkcd() | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | |||||
* | Explicitly return from failed `cd` call in scr() | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | |||||
* | Remove stray Bashism from pwgen() wrapper | Tom Ryder | 2016-08-23 | 1 | -2/+1 |
| | |||||
* | Set POSIX PS1 before loading subscripts | Tom Ryder | 2016-08-23 | 2 | -3/+5 |
| | | | | So that it's overridden in the correct order by pdksh | ||||
* | Add comment to vague block | Tom Ryder | 2016-08-23 | 1 | -0/+2 |
| | |||||
* | Remove commented apostrophe from within subshell | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | |||||
* | Fix up ?d() functions | Tom Ryder | 2016-08-23 | 6 | -104/+98 |
| | | | | | | Count arguments in right places; return 2 on usage errors where possible; minimise subshell activity; move directory replacement functionality to its own function `rd()` rather than overloading `cd`. | ||||
* | Correct stderr redirection for keychain(1) check | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | |||||
* | Use whoami(1) rather than `id -nu` | Tom Ryder | 2016-08-23 | 1 | -1/+1 |
| | | | | | A little bit clearer, and still POSIX; FreeBSD and OpenBSD seem to both have it | ||||
* | Avoid repetition of KSH_ENV param expansion | Tom Ryder | 2016-08-22 | 1 | -2/+2 |
| | |||||
* | Stop versioning go.sh | Tom Ryder | 2016-08-21 | 1 | -6/+0 |
| | | | | | Pretty simple script, and only in active use on one of my systems at the moment anyway; just cluttering environment otherwise |