Skip to content

London | 26-SDC-March | Zobeir Rigi | Sprint 3 | implement-shell-tools#502

Open
Zobeir-Rigi wants to merge 12 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:implement-shell-tools
Open

London | 26-SDC-March | Zobeir Rigi | Sprint 3 | implement-shell-tools#502
Zobeir-Rigi wants to merge 12 commits into
CodeYourFuture:mainfrom
Zobeir-Rigi:implement-shell-tools

Conversation

@Zobeir-Rigi

Copy link
Copy Markdown

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

Shell tools implementation: cat, ls, and wc

@Zobeir-Rigi Zobeir-Rigi added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 2026

@LonMcGregor LonMcGregor left a comment

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.

Can you try rewriting these using a package to manage the arguments? This can make it easier to handle options and command line access.

continue;
}

console.log(file);

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.

Are you correctly handling the -1 argument?

@Zobeir-Rigi Zobeir-Rigi Jun 18, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I’ve fixed it. -1 is handled now. When it’s used, nothing changes since console.log already prints one per line.

Comment thread implement-shell-tools/wc/wc.js Outdated
@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. labels Jun 3, 2026

@LonMcGregor LonMcGregor left a comment

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.

Think about why we have the -1 argument. What do we do if we want to change whether it prints on one line or over individual lines?

About WC, you now offer different argument combinations which is good. You might consider using a library/module to handle arguments as this makes it a lot easier.

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