Why Sponsor Oils? | source | all docs for version 0.24.0 | all versions | oilshell.org
Oils Reference — Chapter Plugins and Hooks
This chapter describes extension points for OSH and YSH.
(in progress)
SIGTERM is the default signal sent by kill
. It asks a process to terminate.
You can register a SIGTERM handler with the trap builtin.
SIGINT is usually generated by Ctrl-C. It interrupts what the shell is doing and returns to the prompt.
You can register a SIGINT handler with the trap builtin.
SIGQUIT is usually generated by Ctrl-.
Used by the job control implementation.
Used by the job control implementation.
Oils receives this signal when the terminal window size changes.
Runs code before "leaf" commands, like
echo hi
a=b
[[ x -eq y ]]
(( a = 42 ))
But not before {
:
{ echo one; echo two; }
See the Quirks doc for an interaction between the DEBUG
trap, pipelines, and interactive shells.
TODO
TODO
TODO
First line of the shell prompt.
Second line of the shell prompt (unimplemented).
For the select
builtin (unimplemented).
The prefix of each line of output in set -x
aka set -o xtrace
. The leading
character is special.
The complete builtin calls back into the shell evaluator to create candidate strings for autocompletion:
-C
is an external command that's executed-F
is the name of a shell function name that's run-W
is a word list that's evalutaedA command that's executed before each prompt.
This feature is taken from bash.
Users may define this func to customize their prompt.
The func should take the global value.IO
instance, and return a prompt string
(type value.Str
).
To construct the prompt, it can make calls like
io->promptVal('$')
.
To render the prompt, YSH first checks if this function exists. Otherwise, it
uses $PS1
with a ysh
prefix.