Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.

Plugins and Hooks

This chapter in the Oils Reference describes extension points for OSH and YSH

Table of Contents
Signals
Traps
Words
PS1
PS2
PS3
PS4
Completion
Other Plugin
YSH
renderPrompt()

Signals

TODO

Traps

TODO

Words

PS1

First line of a prompt.

PS2

Second line of a prompt.

PS3

For the 'select' builtin (unimplemented).

PS4

For 'set -o xtrace'. The leading character is special.

Completion

Other Plugin

YSH

renderPrompt()

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.


Generated on Wed, 06 Dec 2023 01:04:01 -0500