Skip to main content

Module init

Module init 

Source
Expand description

Shell initialization for zshrs

Port from zsh/Src/init.c

Provides shell initialization, startup script sourcing, and main loop.

Structs§

ShellOptions
Shell initialization options
ShellState
Global shell state

Enums§

LoopReturn
Loop result
ShellEmulation
Shell emulation mode
SourceReturn
Source result

Functions§

get_exe_path
Get the executable path of the current process
get_zdotdir
Get the ZDOTDIR
init_hashtable
Set up the hash tables (from init.c init_hashtable equivalent)
init_io
Initialize shell I/O
init_main
Full initialization sequence (from init.c init_main)
init_term
Initialize terminal settings (from init.c init_term)
init_tty
Set up the tty (from init.c init_tty)
is_login_shell
Determine if shell is a login shell from argv[0]
parseargs
Parse command line arguments
pathprog
Find a command in PATH (from init.c pathprog equivalent)
run_exit_scripts
Run logout scripts (from init.c run_exit_scripts counterpart)
run_init_scripts
Run initialization scripts
set_pwd_env
Set up the PWD variable (from init.c set_pwd_env)
setup_emulation_opts
Set up options from emulation mode (from init.c setupvals emulation portion)
setupvals
Set up shell values
source
Source a file
sourcehome
Source a file from home directory
zexit
Close the shell (from init.c zexit)