-
-
Notifications
You must be signed in to change notification settings - Fork 42
London | SDC-Nov-25 | Emiliano Uruena | Sprint 3 | Implement Shell Tools #251
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?
Conversation
…n a typical system: cat, ls, and wc.
File doesn’t belong to this branch.
LonMcGregor
left a comment
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 start on these tasks, I've left some comments for where it could be improved
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.
Did you mean to make changes to this file? We try to keep pull requests specific to just the files in the feature we are changing - for this, everything within the sprint task directory.
| process.exit(1); | ||
| } | ||
|
|
||
| //const path = argv[0]; |
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.
We try to avoid comitting commented out code that is no longer needed
| .map((line,index) => `${(index + 1).toString().padStart(6)}\t${line}`) | ||
| .forEach(line => console.log(line)) | ||
|
|
||
| } else if (option.b){ |
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.
Try to be careful of indentation and formatting - can you spot the inconsistency here? You could consider using a formatting tool to help.
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 concise solution
| import {program} from "commander"; | ||
| import { promises as fs } from "node:fs"; | ||
| import process from "node:process"; | ||
| import { glob } from "glob"; |
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.
When I try to run this file, i get this error: Cannot find package 'glob' . Can you figure out why?
Self checklist
Changelist
Implementing common shell tools so that they behave like the real versions on a typical system: CAT, LS, WC. Node commander was installed to run in every directory.