tiny-shell 0.2
A mini shell project aiming to gain knowledge about Win32 and Linux API
|
Go to the source code of this file.
Functions | |
void | get_cwd (unsigned int buffer_size, os_char *buffer) |
Fetch current working directory and copy them into buffer | |
bool | change_cwd (const os_char *new_dir) |
Attempt to change current working directory. | |
void | clear_screen () |
Clear the console. | |
bool | kill_process (int proc_id) |
Kill a process. | |
bool | resume (int proc_id) |
Resume running a process. | |
bool | show_child_processes (int proc_id) |
Show child processes. | |
bool | delete_file (const os_char *filename) |
Delete a specific file. | |
bool | lsdir (const os_char *dir) |
List of files or folders in specific directory. | |
bool | launch_executable (const struct args args) |
Launch the executable. | |
bool | set_shell_env (const os_char *name, const os_char *val) |
Set environment variable of the shell process. | |
bool | unset_shell_env (const os_char *name) |
Unset environment variable of the shell process. | |
bool | get_shell_env (const os_char *var, unsigned int buffer_size, os_char *buffer) |
Get value of an an environment variable. | |
bool | has_shell_env (const os_char *var) |
Check if a variable environment exists. | |
os_char * | get_all_shell_env_display () |
Get all current environment variable. | |
bool | enum_proc () |
List all running processes. | |
bool | get_time () |
Get current time. | |
bool | get_date () |
Get current date. | |
bool | stop_proccess (int proc_id) |
Stop a process use it ID. | |
bool | minibat (const struct args args) |
Launch shell executable and execute the file specified by args.argv[0] | |
bool change_cwd | ( | const os_char * | new_dir | ) |
Attempt to change current working directory.
Referenced by run_cd().
void clear_screen | ( | ) |
bool delete_file | ( | const os_char * | filename | ) |
bool enum_proc | ( | ) |
List all running processes.
Referenced by run_get_list_process().
os_char * get_all_shell_env_display | ( | ) |
Get all current environment variable.
Referenced by run_get_all_env().
void get_cwd | ( | unsigned int | buffer_size, |
os_char * | buffer ) |
Fetch current working directory and copy them into buffer
Referenced by prompt_input().
bool get_date | ( | ) |
bool get_shell_env | ( | const os_char * | var, |
unsigned int | buffer_size, | ||
os_char * | buffer ) |
Get value of an an environment variable.
Referenced by add_path(), and run_get_env().
bool get_time | ( | ) |
bool has_shell_env | ( | const os_char * | var | ) |
Check if a variable environment exists.
Referenced by main().
bool kill_process | ( | int | proc_id | ) |
bool launch_executable | ( | const struct args | args | ) |
Launch the executable.
Referenced by run_launch_executable().
bool lsdir | ( | const os_char * | dir | ) |
List of files or folders in specific directory.
Referenced by run_lsdir().
bool minibat | ( | const struct args | args | ) |
Launch shell executable and execute the file specified by args.argv[0]
Referenced by run_minibat().
bool resume | ( | int | proc_id | ) |
bool set_shell_env | ( | const os_char * | name, |
const os_char * | val ) |
Set environment variable of the shell process.
`val` | may be NULL |
Referenced by add_path(), and run_set_env().
bool show_child_processes | ( | int | proc_id | ) |
Show child processes.
Referenced by run_child_processes().
bool stop_proccess | ( | int | proc_id | ) |
bool unset_shell_env | ( | const os_char * | name | ) |
Unset environment variable of the shell process.
Referenced by run_unset_env().