London | 25-SDC-July | Priscilla Emebo | Sprint 3 | Implement shell tools#147
London | 25-SDC-July | Priscilla Emebo | Sprint 3 | Implement shell tools#147Priscilla-EM wants to merge 6 commits intoCodeYourFuture:mainfrom
Conversation
LonMcGregor
left a comment
There was a problem hiding this comment.
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.
Think about what the purpose of the -1 option here is. Have you missed something in your implementation?
implement-shell-tools/wc/mywc.js
Outdated
| options.c = true; | ||
| } | ||
|
|
||
| const showLines = options.l; |
There was a problem hiding this comment.
Why are you creating new variables here which are the same as accessing the options dictionary?
implement-shell-tools/wc/mywc.js
Outdated
| totalBytes += byteCount; | ||
|
|
||
| let output = ""; | ||
| if (showLines) output += `${lineCount.toString().padStart(8)}`; |
There was a problem hiding this comment.
There is duplication here when you are printing your outputs, can you think how to solve that?
|
Thank you so much. I've made the corrections |
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
1 similar comment
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.