Skip to content

Glasgow | 26-SDC-JUL | Mirabelle Morah | Sprint 3 | Implement Shell Tools - #620

Open
mirabellemorah wants to merge 1 commit into
CodeYourFuture:mainfrom
mirabellemorah:implement-shell-tools
Open

Glasgow | 26-SDC-JUL | Mirabelle Morah | Sprint 3 | Implement Shell Tools#620
mirabellemorah wants to merge 1 commit into
CodeYourFuture:mainfrom
mirabellemorah:implement-shell-tools

Conversation

@mirabellemorah

@mirabellemorahmirabellemorah commented Jul 28, 2026

Copy link
Copy Markdown

Learners, PR Template

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

Changelist

Used node to implement shell command lines

Task ID: CYF-1150

@mirabellemorahmirabellemorah added 📅 Sprint 3 Assigned during Sprint 3 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 28, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 28, 2026
@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@mirabellemorahmirabellemorah added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 28, 2026
@github-actions

This comment has been minimized.

@github-actionsgithub-actionsBot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 28, 2026
@mirabellemorahmirabellemorah changed the title Glasgow | 26-SDC-JUL | Mirabelle Morah | 3 | Implement Shell ToolsGlasgow | 26-SDC-JUL | Mirabelle Morah | Sprint 3 | Implement Shell ToolsJul 28, 2026
@mirabellemorahmirabellemorah added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 28, 2026
@LonMcGregorLonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Aug 4, 2026

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

Good start but there is quite a bit of work still to do.

if (i === lines.length - 1 && line === "") {
break;
}
const prefix = calculatePrefix(

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.

Is running calculatePrefix for every line of output an efficient solution?

import { promises as fs } from "node:fs";
import process from "node:process";

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

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.

Is there a reason you used commander in the cat example, but not here

}
}

const showOnePerLine = flags.includes("-1");

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.

What does the showOnePerLine const do?

import { program } from "commander";
import { promises as fs } from "node:fs";

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

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.

You import the commander program api, but don't use it. Is there a reason for that?

@LonMcGregorLonMcGregor 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 4, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ReviewedVolunteer to add when completing a review with trainee action still to take.📅 Sprint 3Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mirabellemorah@LonMcGregor