42sh
Core
42sh — Shell State
AST — Abstract Syntax Tree
Builtins
Executor
Expander
History
Job Control
Lexer
Parser
Signals
Variables
Tests
minunit.h — Test Framework
test_runner.c
test_btree.c
test_dlist.c
test_history.c
test_lexer.c
test_list.c
test_parser.c
test_executor.c
test_stubs.c
42sh
Index
Index
A
|
B
|
C
|
D
|
E
|
F
|
G
|
H
|
I
|
L
|
M
|
N
|
O
|
P
|
R
|
S
|
T
|
V
A
apply_assignments (C++ function)
apply_dup_redir (C++ function)
apply_one_redir (C++ function)
assert_token_type (C++ function)
ast_free (C++ function)
,
[1]
ast_new_binary (C++ function)
,
[1]
ast_new_command (C++ function)
,
[1]
ast_new_group (C++ function)
,
[1]
ast_walk (C++ function)
B
build_path (C++ function)
builtin_bg (C++ function)
builtin_cd (C++ function)
builtin_echo (C++ function)
builtin_exit (C++ function)
builtin_export (C++ function)
builtin_fg (C++ function)
builtin_get (C++ function)
builtin_history (C++ function)
,
[1]
builtin_is_builtin (C++ function)
builtin_jobs (C++ function)
builtin_set (C++ function)
builtin_type (C++ function)
builtin_unset (C++ function)
C
close_pipes (C++ function)
cmd_free (C++ function)
collect_heredocs_from_command (C++ function)
collect_heredocs_from_group (C++ function)
collect_heredocs_from_list (C++ function)
collect_pipeline (C++ function)
command_build (C++ function)
command_init (C++ function)
command_size (C++ function)
create_operator_token (C++ function)
D
del_dummy (C++ function)
del_int (C++ function)
del_item (C++ function)
detect_and_or (C++ function)
detect_separator (C++ function)
dispatch_node (C++ function)
dummy_new (C++ function)
E
exec_assignment_only (C++ function)
exec_builtin (C++ function)
exec_child (C++ function)
exec_pipeline_external (C++ function)
,
[1]
execute_and (C++ function)
,
[1]
execute_background (C++ function)
,
[1]
execute_block (C++ function)
,
[1]
execute_or (C++ function)
,
[1]
execute_pipeline (C++ function)
,
[1]
execute_sequence (C++ function)
,
[1]
execute_simple_command (C++ function)
,
[1]
execute_subshell (C++ function)
,
[1]
executor_execute (C++ function)
,
[1]
expand_command (C++ function)
expand_word (C++ function)
expand_word_to_fields (C++ function)
extract_io_number (C++ function)
F
find_command (C++ function)
,
[1]
fork_exit_and_get (C++ function)
fork_heredoc (C++ function)
fork_signal_and_get (C++ function)
free_argv (C++ function)
free_cmd_ast (C++ function)
free_echo_ast (C++ function)
free_split (C++ function)
G
g_mu_failed (C++ member)
,
[1]
g_mu_passed (C++ member)
,
[1]
g_sigint_heredoc (C++ member)
g_signal_received (C++ member)
,
[1]
get_exit_status (C++ function)
,
[1]
H
heredoc_expand_config (C++ function)
,
[1]
heredoc_sigint_handler (C++ function)
history_file_path (C++ function)
,
[1]
history_init (C++ function)
,
[1]
history_load (C++ function)
,
[1]
history_save (C++ function)
,
[1]
I
int_cmp (C++ function)
is_assignment (C++ function)
is_operator (C++ function)
,
[1]
is_operator_start (C++ function)
,
[1]
is_redir (C++ function)
,
[1]
L
lexer_check_quotes (C++ function)
lexer_free_tokens (C++ function)
,
[1]
lexer_tokenize (C++ function)
,
[1]
LST_ALIAS (C macro)
lst_append (C++ function)
LST_DUMMY (C macro)
LST_JOB (C macro)
LST_PROC (C macro)
LST_VAR (C macro)
M
main (C++ function)
,
[1]
make_echo_to_file (C++ function)
make_false_cmd (C++ function)
make_true_cmd (C++ function)
MAX_PIPELINE (C macro)
MAX_SAVED_FDS (C macro)
MU_ASSERT (C macro)
mu_assert (C++ function)
MU_ASSERT_INT (C macro)
mu_assert_int (C++ function)
MU_ASSERT_STR (C macro)
mu_assert_str (C++ function)
MU_RUN (C macro)
mu_run (C++ function)
MU_SUMMARY (C macro)
mu_summary (C++ function)
N
nth_token (C++ function)
O
operator_type (C++ function)
operators (C++ member)
P
parse_and_or (C++ function)
,
[1]
parse_assignment (C++ function)
parse_block (C++ function)
,
[1]
parse_command (C++ function)
,
[1]
parse_group (C++ function)
parse_list (C++ function)
,
[1]
parse_options (C++ function)
parse_pipeline (C++ function)
,
[1]
parse_simple_command (C++ function)
,
[1]
parse_subshell (C++ function)
,
[1]
parser_accept (C++ function)
,
[1]
parser_collect_heredocs (C++ function)
,
[1]
parser_error_unexpected (C++ function)
parser_next (C++ function)
,
[1]
parser_parse (C++ function)
,
[1]
parser_peek (C++ function)
,
[1]
pipe_child (C++ function)
print_entries (C++ function)
process_line (C++ function)
R
read_heredoc (C++ function)
read_heredoc_from_pipe (C++ function)
read_line (C++ function)
read_operator (C++ function)
,
[1]
read_operator_crashes (C++ function)
read_word (C++ function)
,
[1]
REDIR (C macro)
redir_free (C++ function)
,
[1]
redir_get_fd (C++ function)
redir_new (C++ function)
redir_open_file (C++ function)
restore_assigns (C++ function)
restore_redirections (C++ function)
,
[1]
result_concat (C++ function)
S
save_and_apply_assigns (C++ function)
search_path (C++ function)
setup_heredoc (C++ function)
,
[1]
setup_redirections (C++ function)
,
[1]
shell_cleanup (C++ function)
shell_init (C++ function)
sigint_handler_interactive (C++ function)
signals_check (C++ function)
,
[1]
signals_setup_child (C++ function)
signals_setup_executing (C++ function)
signals_setup_interactive (C++ function)
,
[1]
split_assignment (C++ function)
,
[1]
strip_tab (C++ function)
stub_shell_cleanup (C++ function)
,
[1]
stub_shell_init (C++ function)
,
[1]
T
t_alias (C++ struct)
t_alias::name (C++ member)
t_alias::value (C++ member)
t_ast (C++ struct)
t_ast::binary (C++ member)
t_ast::cmd (C++ member)
t_ast::data (C++ member)
t_ast::group (C++ member)
t_ast::type (C++ member)
t_binary (C++ struct)
t_binary::left (C++ member)
t_binary::right (C++ member)
t_builtin_fn (C++ type)
t_cmd (C++ struct)
t_cmd::argc (C++ member)
t_cmd::argv (C++ member)
t_cmd::assignments (C++ member)
t_cmd::redirs (C++ member)
t_dummy (C++ struct)
t_dummy::id (C++ member)
t_dummy::name (C++ member)
t_group (C++ struct)
t_group::child (C++ member)
t_group::redirs (C++ member)
t_job (C++ struct)
t_job::cmd_line (C++ member)
t_job::foreground (C++ member)
t_job::id (C++ member)
t_job::notified (C++ member)
t_job::pgid (C++ member)
t_job::processes (C++ member)
t_job::status (C++ member)
t_job_status (C++ enum)
t_job_status::JOB_DONE (C++ enumerator)
t_job_status::JOB_RUNNING (C++ enumerator)
t_job_status::JOB_STOPPED (C++ enumerator)
t_job_status::JOB_TERMINATED (C++ enumerator)
t_node_type (C++ enum)
t_node_type::NODE_AND (C++ enumerator)
t_node_type::NODE_BACKGROUND (C++ enumerator)
t_node_type::NODE_BLOCK (C++ enumerator)
t_node_type::NODE_COMMAND (C++ enumerator)
t_node_type::NODE_OR (C++ enumerator)
t_node_type::NODE_PIPE (C++ enumerator)
t_node_type::NODE_SEQUENCE (C++ enumerator)
t_node_type::NODE_SUBSHELL (C++ enumerator)
t_operator (C++ struct)
t_operator::literal (C++ member)
t_operator::type (C++ member)
t_parser (C++ struct)
t_parser::current (C++ member)
t_parser::error (C++ member)
t_parser::tokens (C++ member)
t_process (C++ struct)
t_process::cmd (C++ member)
t_process::completed (C++ member)
t_process::pid (C++ member)
t_process::status (C++ member)
t_process::stopped (C++ member)
t_redir (C++ struct)
t_redir::fd (C++ member)
t_redir::heredoc_content (C++ member)
t_redir::heredoc_delim (C++ member)
t_redir::heredoc_quoted (C++ member)
t_redir::target (C++ member)
t_redir::type (C++ member)
t_shell (C++ struct)
(C++ type)
,
[1]
,
[2]
t_shell::aliases (C++ member)
t_shell::cmd_entrypoint (C++ member)
t_shell::current_job (C++ member)
t_shell::env (C++ member)
t_shell::env_dirty (C++ member)
t_shell::exit_confirmed (C++ member)
t_shell::history_file (C++ member)
t_shell::interactive (C++ member)
t_shell::jobs (C++ member)
t_shell::last_exit_status (C++ member)
t_shell::original_termios (C++ member)
t_shell::running (C++ member)
t_shell::shell_pgid (C++ member)
t_shell::terminal_fd (C++ member)
t_shell::variables (C++ member)
t_token (C++ struct)
t_token::io_number (C++ member)
t_token::type (C++ member)
t_token::value (C++ member)
t_token_type (C++ enum)
t_token_type::TOK_AMPERSAND (C++ enumerator)
t_token_type::TOK_AND (C++ enumerator)
t_token_type::TOK_EOF (C++ enumerator)
t_token_type::TOK_ERROR (C++ enumerator)
t_token_type::TOK_HEREDOC (C++ enumerator)
t_token_type::TOK_HEREDOC_STRIP (C++ enumerator)
t_token_type::TOK_LPAREN (C++ enumerator)
t_token_type::TOK_NEWLINE (C++ enumerator)
t_token_type::TOK_OR (C++ enumerator)
t_token_type::TOK_PIPE (C++ enumerator)
t_token_type::TOK_REDIR_APPEND (C++ enumerator)
t_token_type::TOK_REDIR_DUP_IN (C++ enumerator)
t_token_type::TOK_REDIR_DUP_OUT (C++ enumerator)
t_token_type::TOK_REDIR_IN (C++ enumerator)
t_token_type::TOK_REDIR_OUT (C++ enumerator)
t_token_type::TOK_RPAREN (C++ enumerator)
t_token_type::TOK_SEMICOLON (C++ enumerator)
t_token_type::TOK_WORD (C++ enumerator)
t_var (C++ struct)
t_var::exported (C++ member)
t_var::name (C++ member)
t_var::readonly (C++ member)
t_var::value (C++ member)
test_and (C++ function)
test_and_newline (C++ function)
test_assignment (C++ function)
test_assignment_after_command (C++ function)
test_assignment_and_args (C++ function)
test_assignment_before_subshell (C++ function)
test_assignment_in_pipeline (C++ function)
test_assignment_only (C++ function)
test_assignment_with_redir (C++ function)
test_background_separator (C++ function)
test_btree_suite (C++ function)
,
[1]
test_builtin_echo_suite (C++ function)
test_command_args (C++ function)
test_complex_logical_chains (C++ function)
test_complex_redir (C++ function)
test_dlist_suite (C++ function)
,
[1]
test_empty_value_assignment (C++ function)
test_execute_and (C++ function)
test_execute_background (C++ function)
test_execute_block (C++ function)
test_execute_builtin_command (C++ function)
test_execute_external_command (C++ function)
test_execute_or (C++ function)
test_execute_pipeline (C++ function)
test_execute_pipeline_three (C++ function)
test_execute_sequence (C++ function)
test_execute_subshell (C++ function)
test_execute_subshell_isolation (C++ function)
test_executor_dispatch (C++ function)
test_executor_suite (C++ function)
,
[1]
test_get_exit_status (C++ function)
test_heredoc (C++ function)
test_heredoc_basic (C++ function)
test_heredoc_group (C++ function)
test_heredoc_multiline (C++ function)
test_heredoc_pipe (C++ function)
test_heredoc_quoted_no_expand (C++ function)
test_heredoc_stripped_basic (C++ function)
test_heredoc_stripped_group (C++ function)
test_heredoc_stripped_multiline (C++ function)
test_heredoc_stripped_pipe (C++ function)
test_heredoc_stripped_quoted_no_expand (C++ function)
test_heredoc_stripped_unterminated (C++ function)
test_heredoc_stripped_with_redir (C++ function)
test_heredoc_unterminated (C++ function)
test_heredoc_with_redir (C++ function)
test_history_suite (C++ function)
,
[1]
test_invalid_assignment_digit (C++ function)
test_is_operator_false (C++ function)
test_is_operator_start_digit_not_redir (C++ function)
test_is_operator_start_io_number (C++ function)
test_is_operator_start_simple (C++ function)
test_is_operator_start_word (C++ function)
test_is_operator_true (C++ function)
test_lexer_suite (C++ function)
,
[1]
test_list_suite (C++ function)
,
[1]
test_multiple_assignments (C++ function)
test_multiple_background_chain (C++ function)
test_multiple_redirs (C++ function)
test_only_and (C++ function)
test_only_or_and (C++ function)
test_only_pipe (C++ function)
test_or (C++ function)
test_parser_suite (C++ function)
,
[1]
test_pipe (C++ function)
test_pipe_newline (C++ function)
test_pipeline_exit_status (C++ function)
test_pipeline_with_heredoc (C++ function)
test_plus_equals_not_assignment (C++ function)
test_read_operator_double_char (C++ function)
test_read_operator_io_number (C++ function)
test_read_operator_malformed_no_crash (C++ function)
test_read_operator_single_char (C++ function)
test_read_word_backslash_escape (C++ function)
test_read_word_double_quote (C++ function)
test_read_word_pipe_in_single_quote (C++ function)
test_read_word_simple (C++ function)
test_read_word_single_quote (C++ function)
test_read_word_stops_at_operator (C++ function)
test_redirection (C++ function)
test_redirections_append (C++ function)
test_redirections_bad_file (C++ function)
test_redirections_heredoc_in_list (C++ function)
test_redirections_input (C++ function)
test_redirections_output (C++ function)
test_redirections_save_restore (C++ function)
test_redirs_in_a_row (C++ function)
test_sequence (C++ function)
test_sequence_mixed (C++ function)
test_simple_command (C++ function)
test_split_assignment (C++ function)
test_subshell_pipe (C++ function)
test_subshell_redir (C++ function)
test_token_new_basic (C++ function)
test_token_new_io_number (C++ function)
test_tokenize_and_or (C++ function)
test_tokenize_empty (C++ function)
test_tokenize_heredoc (C++ function)
test_tokenize_heredoc_strip (C++ function)
test_tokenize_io_number (C++ function)
test_tokenize_newline_separator (C++ function)
test_tokenize_pipe (C++ function)
test_tokenize_quoted_operators (C++ function)
test_tokenize_redirect_out (C++ function)
test_tokenize_simple_command (C++ function)
test_tokenize_subshell (C++ function)
test_tokenize_whitespace_trimmed (C++ function)
test_trailing_background (C++ function)
test_unclose_parenthesis (C++ function)
test_unopen_parenthesis (C++ function)
toggle (C++ function)
TOK (C macro)
token_free (C++ function)
,
[1]
token_new (C++ function)
,
[1]
V
var_export (C++ function)
var_get (C++ function)
var_get_environ (C++ function)
var_get_value (C++ function)
var_init_from_environ (C++ function)
var_set (C++ function)
var_unset (C++ function)