fixed so that the help flags work
This commit is contained in:
parent
13a510550e
commit
84b969a98c
@ -26,6 +26,7 @@ func Head(in input_parser.Input, env *environment.Env) {
|
||||
for _, flag := range flagsArray {
|
||||
fmt.Println(flag + flagsDictionary[flag])
|
||||
} // Print flags and there description
|
||||
return
|
||||
}
|
||||
args := in.Args
|
||||
var file_path string
|
||||
|
||||
@ -23,6 +23,7 @@ func Ls(in input_parser.Input, env *environment.Env) {
|
||||
for _, flag := range flagsArray {
|
||||
fmt.Println(flag + flagsDictionary[flag])
|
||||
} // Print flags and their description
|
||||
return
|
||||
}
|
||||
fs, err := os.ReadDir(env.Path)
|
||||
if err != nil {
|
||||
|
||||
@ -21,7 +21,7 @@ func Man(in input_parser.Input, env *environment.Env) {
|
||||
case "cat":
|
||||
fmt.Print("Outputs the contents of the given file")
|
||||
case "head":
|
||||
fmt.Print("Outputs first lines of a given file. 10 if none provided. Argument <file> <number of lines> \nTakes the flag -n in order to display the line numbers")
|
||||
fmt.Print("Outputs first lines of a given file. 10 if none or 0 is provided. Argument <file> <number of lines> \nTakes the flag -n in order to display the line numbers")
|
||||
case "touch":
|
||||
fmt.Print("Creates the given file")
|
||||
case "rm":
|
||||
|
||||
@ -28,6 +28,7 @@ func Tail(in input_parser.Input, env *environment.Env) {
|
||||
for _, flag := range flagsArray {
|
||||
fmt.Println(flag + flagsDictionary[flag])
|
||||
} // Print flags and there description
|
||||
return
|
||||
}
|
||||
args := in.Args
|
||||
var file_path string
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user