-
-
Notifications
You must be signed in to change notification settings - Fork 42
LONDON | SDC-NOV-2025| JESUS DEL MORAL | Sprint 4 | Feature / Implement Shell Tools Python #268
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?
LONDON | SDC-NOV-2025| JESUS DEL MORAL | Sprint 4 | Feature / Implement Shell Tools Python #268
Conversation
828014f to
a93b794
Compare
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, some things to consider:
Can you think of any problems that might arise from the filenames you have given your scripts?
See also my comment in the files. Mostly these implementations are very good and neat, well done
| args = parser.parse_args() | ||
|
|
||
| # Only -1 is supported, but it's always required in this assignment | ||
| if not args.one_per_line: |
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.
Why is this required? is there a reason i should not output the files on the same line?
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.
There is no technical reason to require -1.
The program already outputs one file per line regardless, so enforcing -1 is unnecessary.
I added the check because I thought the assignment required explicitly using -1, but in practice the program should either: treat -1 as the default behaviour, or Ignore it entirely since only one output format is implemented.
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.
If you re-read the readme for the ls task, can you see where it is asking for -1 to be implemented? You need to be able to test with it on and off. Right now, every time it runs it prints each file on a new line, so even though you removed the option, how will you test if this option is implemented?
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.
You are right and I understand now perfectly the exercise.... I did some changes in the code wehere the program:
-1 changes output behaviour
-a includes dotfiles
- Clean error handling
- Easy to extend later (-l, multiple paths, etc.)
I have tested:
./ls.py
./ls.py -1
./ls.py -a
./ls.py -1 -a
./ls.py sample-files
./ls.py -1 -a sample-files
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.
Great work,this task is complete now
Re-implement shell tools you have used (Used Python)
Each directory contains instructions for one shell tool to re-implement.
3 files changed in this PR cat (script-02.py), ls (script-02.py), ws (script-02.py)