Skip to content

Cape Town| 25-SDC-July | Faith Muzondo | Sprint 3| Implement shell tools#128

Open
Faithy4444 wants to merge 9 commits intoCodeYourFuture:mainfrom
Faithy4444:implement-shell-tools
Open

Cape Town| 25-SDC-July | Faith Muzondo | Sprint 3| Implement shell tools#128
Faithy4444 wants to merge 9 commits intoCodeYourFuture:mainfrom
Faithy4444:implement-shell-tools

Conversation

@Faithy4444
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@Faithy4444 Faithy4444 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 29, 2025
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Aug 12, 2025
Copy link

@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.

Great start on this task. There are a few issues still to resolve, though

program.help();
}

const path = args[0]

Choose a reason for hiding this comment

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

Your cat implementation seems to struggle if I try to pass more than one file at a time, e.g. using a * wildcard. Can you find a way to make it work if multiple are passed in?

Copy link
Author

Choose a reason for hiding this comment

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

i have made changes to make it work for multiple files

}

if (opts.one) {
visibleFiles.forEach(file => console.log(file));

Choose a reason for hiding this comment

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

as you are passing an anonymous function which is passing an argument into a single function here, do you know of any way this call could be simplified?

Copy link
Author

Choose a reason for hiding this comment

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

i have simplified it

program.help();
}

const path = args[0];

Choose a reason for hiding this comment

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

In the original wc program I can pass multiple files in to get a different kind of output. Can you see why your program doesn't match this behaviour?

const words = countWords(content);
const bytes = countBytes(content);

if (opts.line) {

Choose a reason for hiding this comment

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

In the original wc program I can combine different combinations of option. For example, to get line and word but not character counts. Can you spot the issue with your implementation?

Copy link
Author

Choose a reason for hiding this comment

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

i have made changes

@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 Aug 12, 2025
@LonMcGregor
Copy link

This looks good

@LonMcGregor LonMcGregor added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 27, 2025
@github-actions
Copy link

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
@github-actions
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants