Skip to content

Commit

Permalink
Merge pull request #49 from glyif/edit/readme-manpage
Browse files Browse the repository at this point in the history
updated man pages
  • Loading branch information
johncoleman83 authored Apr 17, 2017
2 parents 1dfc3ad + 8bae975 commit c8eb351
Showing 1 changed file with 79 additions and 83 deletions.
162 changes: 79 additions & 83 deletions man_1_simple_shell
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
.\" daVinci man page
.\"
.\"
.TH DAVINCI 1 "09 March 1847" "0.1" "daVinci Shell"



.SH NAME

.B daVinci
.B daVinci (hsh)
- command interpreter (shell)



.SH SYNOPSIS

.B ./hsh
[options] [command_string | file]



Expand All @@ -24,116 +26,108 @@ daVinci is Public Domain, no copyright protection

.SH DESCRIPTION

daVinci replicates a 'shell' or command line interpreter, which is a user\
interface program for access to an operating system's services. This shell has\
a set of custom built-in commands, and also integrates with other commands\
located in the system's PATH. The output is designed to exactly or as close\
as possible replicate the shell 'sh' or 'dash' ($ man dash). daVinci takes\
commands from files, shell scripts or user input in either an interactive or\
non-interactive mode (explained in INVOCATION section).
daVinci replicates a command line interpreter (a shell), which is a user \
interface program for access to an operating system's services. This shell \
is designed to interact with a linux distribution or unix like system that \
uses linux system calls and other commands found in the linux PATH, for \
example, the
.B $PATH:
.P
.RS
.B /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
.P
.RE
daVinci has a set of custom built-in commands, and also integrates with other \
commands located in the system's PATH. The output is designed to exactly or \
as close as possible replicate the shell 'sh' or 'dash'
.B $ man dash
. daVinci \
takes commands from files, shell scripts or user input in either an \
interactive or non-interactive mode (explained in INVOCATION section).




.SH INVOCATION

to initialize daVinci, you must compile all the included files using gcc.\
Then run the output file, with a command such as this: $ ./a.out. daVinci is\
designed to be compiled like with this command:

gcc -Wall -Werror -Wextra -pedantic *.c -o hsh

if daVinci is exectured, it will initialize in what is considered 'interactive\
mode.' In this scenario, the user is prompted for a command and then the\
command is executed after the newline or 'enter' is input. daVinci can also\
to initialize daVinci, you must compile all the included files using the GNU \
compiler collection: gcc. Then run the output file, with a command such as \
this: $ ./a.out. daVinci has been written to pass all of these warning checks \
and was designed to be compiled with the following command:
.P
.RS
.B $ gcc -Wall -Werror -Wextra -pedantic *.c -o hsh
.P
.RE
if daVinci is exectured, it will initialize in what is considered 'interactive \
mode.' In this scenario, the user is prompted for a command and then the \
command is executed after the newline or 'enter' is input. daVinci can also \
function in non-interactive mode by using shell scripts, such as a '|' before
the daVinci executable file ('hsh'). This is an example:

echo 'ls' | ./hsh

.P
.RS
.B $ echo 'ls' | ./hsh
.P
.RE
Commands may also be input into daVinci through a file containing commands:

cat aFile | ./hsh

.P
.RS
.B $ cat aFile | ./hsh
.P
.RE



.SH OPTIONS

daVinci does not take any options but does utilize the variable extern char\
daVinci does not take any options but does utilize the variable extern char \
**environ. This is currently part of the future goals of daVinci


.SH BUILT-IN commands



.IP monalisa
easter egg

.IP env
writes environment to stdout

.IP setenv
sets or changes an environmental variable. example: 'setenv USER=bobby'

.IP unsetenv
removes environmental variable. example: 'unsetenv USER'

.IP history
writes history to stdout

.IP exit
exits daVinci

.IP cd
changes working directory
.SS BUILT-IN COMMANDS

.IP help
used with another command prints help message. example: 'help env'

.IP alias
creates an alias. example 'alias ll='ls -la''

.IP unalias
removes an alias. exmample 'unalias ll'
.RS
This secion has information on the included builtin commands with daVinci

.IR foo.conf .
Overridden by the
.B -c
option.
.Bl -tag -width "PAGEIN" -compact -offset indent

.It
.B env
- writes environment to stdout

.IT
.B setenv
- sets or changes an environmental variable. example: 'setenv USER=bobby'

.IT
.B unsetenv
- removes environmental variable. example: 'unsetenv USER'

.SH Another big header
.IT
.B history
- writes history to stdout

.P
.SS subheader
.P
.B bold word
paragraph here
.P
.SS
.B Subheader

.IT
.B exit
- exits daVinci

.IT
.B cd
- changes working directory

.SH FILES
.IT
.B help
- used with another command prints help message. example: 'help env'

.I /etc/foo.conf
.RS
The system wide configuration file. See
.BR foo (5)
for further details.
.IT
.B alias
- creates an alias. example 'alias ll='ls -la''

.IT
.B unalias
- removes an alias. example 'unalias ll'
.RE
.I ~/.foorc
.RS
Per user configuration file. See
.BR foo (5)
for further details.



.SH "SEE ALSO"
Expand All @@ -151,4 +145,6 @@ none known. daVinci does not currently replicate these tasks:

Bobby Yang <[email protected]>

David John Coleman II <[email protected]>
David John Coleman II <[email protected]>

special thanks to: monalisa

0 comments on commit c8eb351

Please sign in to comment.