Skip to main content

Module render

Module render 

Source
Expand description

Rendering of the shell integration scripts.

The scripts are bash.sh and fish.fish next to this file, compiled in with include_str!. They are static: everything that varies per machine (the binary path, the script path, the fd-hook launcher) reaches the shell through environment variables, so nothing is ever quoted into script text. The only thing rendering does is to put the developer shortcuts in place of a @DEV_SHORTCUTS@ placeholder, using plain str::replace.

Structs§

ScriptOptions
What can differ between two renderings of the same script.

Constants§

DEV_SHORTCUTS
Developer shortcuts for --devmode: bash aliases and fish abbreviations.

Functions§

render
Renders the integration script for shell.
render_bash
Renders the bash integration script (bash --rcfile <script> -i).
render_fish
Renders the fish integration script (source $SHELLGAME_INIT).