USF-OS / FogOS

Other
1 stars 24 forks source link

Added Ls in FogOS! #29

Open ajpolintan opened 4 months ago

ajpolintan commented 4 months ago

Added colors to ls function for FogOs with the following flags: -t : list the type of files in a directory -l : list a long listing of files in a directory -i : list the index of each file in a directory -c : list the files in columns -rand: list the files in random colors (added a system call called random that uses unixtime to do this) -fun: list the files in a fun set of colors -h: helper flag to describe each flag

ajpolintan commented 4 months ago

Test Cases

(directory) ls ls . ls -c ls -t ls -i ls -h ls -fun ls -rand ^ (run multiple times to see the random colors)

file: ls -rand cat ls cat -rand ^ (run multiple times to see the random colors) ls cat -i ls cat -t ls cat -sz

file and directory: ls cat . -sz ls . cat -sz ls -sz cat .

error checking: ls dog ls -dog ls -rand -sz ^ (check for multiple flags. should be an error)

andrewdiep1 commented 4 months ago

anson and i will code review this one ;0