-
-
Notifications
You must be signed in to change notification settings - Fork 27
London | 25-SDC-July | Priscilla Emebo | Sprint 3 | Implement shell tools #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
London | 25-SDC-July | Priscilla Emebo | Sprint 3 | Implement shell tools #147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work on these files. I have left some comments for where you could improve further
program | ||
.name("myls") | ||
.description("list file(s) in the directory, like the ls command") | ||
.option("-1", "list one file per line") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think about what the purpose of the -1 option here is. Have you missed something in your implementation?
options.c = true; | ||
} | ||
|
||
const showLines = options.l; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you creating new variables here which are the same as accessing the options dictionary?
totalBytes += byteCount; | ||
|
||
let output = ""; | ||
if (showLines) output += `${lineCount.toString().padStart(8)}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is duplication here when you are printing your outputs, can you think how to solve that?
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.