Module init_file

Source
Expand description

Running initialization files

This module provides functions for running initialization files in the shell. The initialization file is a script that is executed when the shell starts up.

Currently, this module only supports running the POSIX-defined rcfile, whose path is determined by the value of the ENV environment variable. (TODO: Support for yash-specific initialization files will be added later.)

The run_rcfile function is the main entry point for running the rcfile. Helper functions that are used by run_rcfile are also provided in this module.

Enums§

DefaultFilePathError
Errors that can occur when finding the default initialization file path

Functions§

default_rcfile_path
Finds the path to the default rcfile.
resolve_rcfile_path
Resolves the path to the rcfile.
run_init_file
Runs an initialization file, reading from the specified path.
run_rcfile
Runs the rcfile specified by the file argument.