MiniDevil As beautiful as a shell
command.c File Reference

Command input handling. More...

#include "minishell_ui.h"
+ Include dependency graph for command.c:

Detailed Description

Command input handling.

Definition in file command.c.

Functions

static int exec_ui_builtin (t_shell *shell)
 Handle "exit" and "clear" commands directly. More...
 
void cmd_execute (t_shell *shell)
 Execute the current command buffer & reset it. More...
 

Function Documentation

◆ exec_ui_builtin()

static int exec_ui_builtin ( t_shell shell)
static

Handle "exit" and "clear" commands directly.

Parameters
shellShell state
Returns
1 if the command was handled as UI builtin and 0 otherwise

Definition at line 24 of file command.c.

References t_cmd::buf, t_ui::cmd, t_ui::out, out_clear(), t_ui::running, and t_shell::ui.

Referenced by cmd_execute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmd_execute()

void cmd_execute ( t_shell shell)

Execute the current command buffer & reset it.

Parameters
shellShell state

Definition at line 52 of file command.c.

References t_cmd::buf, t_ui::cmd, exec_ui_builtin(), execute_minishell_cmd(), t_cmd::len, MAX_CMD_LEN, MOOD_HAPPY, t_ui::out, out_clear(), t_shell::ui, and update_waifu_mood().

Referenced by handle_key().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Go to the source code of this file.