aboutsummaryrefslogtreecommitdiff
path: root/ksh/kshrc.d
Commit message (Collapse)AuthorAgeFilesLines
* Fix up a few cosmetic shell anti-patternsTom Ryder2019-03-291-3/+4
|
* Clarify control flow in shell scriptsTom Ryder2018-12-311-13/+27
|
* Two-space sentences in shell commentsTom Ryder2018-12-271-1/+1
|
* 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.
* Break sh noglob guard into two lines for clarityTom Ryder2018-06-291-1/+2
| | | | They're nicer to read this way.
* Inline some switch casesTom Ryder2017-06-271-3/+1
|
* Remove user@ prefix from promptTom Ryder2017-06-191-2/+2
|
* Allow setting a prompt mode for the shellTom Ryder2017-06-161-2/+2
|
* Correct a typeset callTom Ryder2017-01-281-1/+1
|
* Extend "fallback" prompt a bitTom Ryder2017-01-271-1/+4
| | | | Include username/hostname if no SSH variables
* Fixed prompt alignment hack for kshTom Ryder2017-01-261-3/+3
| | | | | | | The manual page for mksh hints that the escaped initial character should in fact be a carriage return, not a newline. That seems to work really well. The newline variable was an empty string before this commit anyway because it was stripped by the subshell expansion.
* Show prompt prefix if a shell is exoticTom Ryder2017-01-251-0/+14
| | | | | | | 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.
* Be more specific in ref name trimmingTom Ryder2017-01-251-1/+1
| | | | | e.g. for a namespaced branch "foo/bar/bar", don't strip the leading part off
* Remove SHLVL nested shell feature for nowTom Ryder2017-01-241-8/+0
| | | | | Causes a bit too much curliness in configuration; may need a more comprehensive approach.
* Have ls() func undo aliases in its wayTom Ryder2017-01-111-2/+0
|
* Don't let OpenBSD alias `ls` in kshTom Ryder2017-01-111-0/+2
|
* Tolerate C-M-l for clear window in kshTom Ryder2017-01-071-14/+3
| | | | | | | Already works in ksh93 and mksh. Trapping C-l in ksh93 interferes with the builtin SIGWINCH handling, clearing the screen every time the window resizes, and I can't find a good way to work around it. Probably best not to fight this.
* Rename keyboard trap func less ambiguouslyTom Ryder2017-01-061-2/+2
|
* Add tab completion settings to kshTom Ryder2017-01-061-2/+8
|
* Appease ShellCheckTom Ryder2017-01-061-2/+3
|
* Found workable ^L bindings in all three kshesTom Ryder2017-01-061-8/+6
|
* Clean binding of ^L in ksh93 to clear screenTom Ryder2017-01-061-18/+7
| | | | <http://unix.stackexchange.com/questions/272591/how-to-make-ctrl-l-to-clear-screen-in-ksh-under-red-hat-linux/272720#272720>
* Experimental/not-very-good-yet ksh bindingsTom Ryder2017-01-061-0/+34
| | | | | | Just starting with what I know and seeing if I can make ^L work the same way it does in Bash. Once I understand this a bit better I intend to have a crack at writing some dynamic completion for ksh93.
* Remove unneeded typeset callTom Ryder2016-12-301-1/+0
|
* Deal with the kshes' varying treatment of ! in PS1Tom Ryder2016-12-281-2/+22
|
* Quiet a shellcheck errorTom Ryder2016-12-281-0/+1
| | | | | Like in 3828a1f, this variable actually does get set before use, but not in a place ShellCheck could be reasonably expected to find
* Change quoting mechanismTom Ryder2016-12-271-1/+1
|
* Fix an issueTom Ryder2016-12-271-1/+1
| | | | End the prompt subshell with a : to reset $?
* Preserve job count quickly for kshTom Ryder2016-12-271-3/+1
|
* Tell ShellCheck to ignore an errorTom Ryder2016-12-271-0/+1
| | | | | ret actually is assigned, just not in any place ShellCheck could reasonably be expected to find
* Realised easy win avoiding subshellsTom Ryder2016-12-271-5/+1
| | | | And also the PROMPT_RETURN fudge in Bash/Zsh
* Put exit value of previous command in ksh PS1Tom Ryder2016-12-271-11/+7
| | | | Found a way to do this that seems to work in all the KSHes I've tried
* Use more compatible checkTom Ryder2016-12-221-1/+1
|
* Limit keep() to ksh93Tom Ryder2016-12-221-2/+9
| | | | | FreeBSD pdksh doesn't even have complete typeset -p output, nor printf %q, which I think makes this impractical.
* Use . not sourceTom Ryder2016-12-221-1/+1
|
* Fork keep() to kshTom Ryder2016-12-221-0/+152
| | | | Mostly works.
* Use clearer logic for prompt color settingTom Ryder2016-12-211-8/+7
|
* Attempt at properly escaping non-printing charsTom Ryder2016-12-191-1/+6
| | | | | | | | | | | | | | | | This is supposed to be the equivalent of \[ \] in Bash PS1... >Note that since the command line editors try to figure out how long the >prompt is (so they know how far it is to edge of the screen), escape >codes in the prompt tend to mess things up. You can tell the shell not >to count certain sequences (such as escape codes) by prefixing your >prompt with a non-printing char- acter (such as control-A) followed by >a carriage return and then delimiting the escape codes with this >non-printing character. If you don't have any non-printing characters, >you're out of luck... BTW, don't blame me for this hack; it's in the >original ksh. <http://blog.0xpebbles.org/ksh-prompt-coloring-example>
* Request version with "ver" shortcut not promptTom Ryder2016-12-192-12/+6
|
* Attempt a much saner approach to managing SHLVLTom Ryder2016-12-191-7/+4
|
* Add ksh version distinguisher to promptTom Ryder2016-12-181-2/+12
|
* Change syntax of ksh prompt func declarationTom Ryder2016-12-181-1/+1
| | | | | | Turns out that `typeset` only makes a variable local if the function was declared with this syntax. This actually makes a fair bit of sense if I think about it. Wouldn't do this in Bash though.
* Improve accuracy of commentTom Ryder2016-12-171-1/+2
|
* Remove for loop from ksh prompt defTom Ryder2016-12-171-1/+3
| | | | mksh can't into it
* Knock out $HOST from kshrcTom Ryder2016-12-171-1/+1
| | | | Not needed really
* Add SHLVL handling for kshTom Ryder2016-12-171-0/+8
| | | | Turns out ksh93 at least does actually do it
* Resolve a few ksh version differencesTom Ryder2016-12-171-16/+20
|
* Correct a "local" to "typeset"Tom Ryder2016-12-171-1/+1
|
* Rename all pdksh stuff to kshTom Ryder2016-12-171-0/+201
As part of a foray into more active use of ksh and derivatives.