Skip to content

London | 26-Mar-SDC | Onur Atas | Sprint 3| Implement shell tools#518

Open
onurat wants to merge 3 commits into
CodeYourFuture:mainfrom
onurat:shell-tools-js
Open

London | 26-Mar-SDC | Onur Atas | Sprint 3| Implement shell tools#518
onurat wants to merge 3 commits into
CodeYourFuture:mainfrom
onurat:shell-tools-js

Conversation

@onurat
Copy link
Copy Markdown

@onurat onurat commented May 5, 2026

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the [style guide]

Implemented ls, cat, and wc in Node.js by manually parsing CLI arguments and replicating core Unix command behaviour.

onurat added 3 commits May 5, 2026 18:25
Complete ls implementation with -1 and -a support
Complete Module Tools: ls, cat, wc implementations
@onurat onurat added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label May 5, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jun 3, 2026
Copy link
Copy Markdown
Contributor

@LonMcGregor LonMcGregor left a 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

Across your solutions you manually check for options in the input arguments. Do you know of any library based solutions that could help build program argument handling that is a bit easier to manage? It would also let you add help text, and combine single letter arguments together like you can on the command line.

See also my other remarks.


const args = process.argv.slice(2);

const showAll = args.includes("-a");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This task also wants you to handle the -1 argument. Can you try that?


let output = [];

if (showLines) output.push(format(stats.lines));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pattern of code is repeated, is there any way you can reduce that?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants