help change

This commit is contained in:
Jakub Adamski 2019-01-11 17:17:03 +01:00
parent 7efd27a635
commit 08b7d9962a
3 changed files with 20 additions and 7 deletions

View File

@ -3,14 +3,27 @@ Microshell Help
------------- -------------
General info General info
Author= Jakub Adamski Author= Jakub Adamski
Index number=s444341
Limits
Max length of line=1000
Max number of arguments=100
Max length of argument=100
------------- -------------
Working commands Working commands
help - manual help - manual
exit - ends microshell exit - ends microshell
cd - changing directory cd - changing directory
(nie dziala dla np ~/) needs exacly 1 argument
jak zrobie echo $HOME tez nie dziala prints error when more/less
dodac informacje o limitach dlugosci albo zrobic spath:
to dynamicznie help - shows help page
0 - turns off displaying current directory
1 - turns on displaying current directory
PATH commands
WARNING
dont use path shorcuts
example cd ~/
or echo $HOME
-------------
q to exit!

Binary file not shown.

View File

@ -106,7 +106,7 @@ int main (){
} }
else if (!strcmp(argv[0], "help")){ else if (!strcmp(argv[0], "help")){
if (fork() == 0){ if (fork() == 0){
execlp("cat", "cat", "help", NULL); execlp("less", "less", "help", NULL);
perror("execlp"); perror("execlp");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }