[][src]Crate sunrise_shell

Shell

Creates an interactive terminal window, providing a few functions useful to test Sunrise. Type help followed by enter to get a list of allowed commands.

Modules

subcommands

Shell builtin subcommands

Structs

CURRENT_WORK_DIRECTORY

Represent the current work directory.

Command

A command to run as part of a pipeline.

Enums

Job

Represents a command currently running.

Statics

CAPABILITIES
HEADER

Functions

cat

Print a file on the standard output.

generate_cmd

Generate a list of command from a given command line.

generate_jobs

Generate a vector of Job from a command line.

get_absolute_path

Get an absolute path from an user path

get_next_line

Read key presses until a \n is detected, and return the string (excluding \n). The key presses should be written to stdout.

get_next_line_no_echo

Read key presses until a \n is detected, and return the string (excluding \n). Don't print the key presses on stdout.

get_path_relative_to_current_directory

Get a path relative to the current directory

login

Asks the user to login repeatedly. Returns with an error if the /etc/passwd file is invalid or doesn't exist.

main
parse_line

Parses a single command from the given string. Returns the command and the amount of bytes read from the string.

split_path

Splits a path at the first / it encounters.