feat: add essential shell commands - pwd, uptime and clearhistory#59
Merged
anshumanjadiya1102 merged 3 commits intoDrive-for-Java:mainfrom Oct 18, 2025
Merged
Conversation
Contributor
|
🚀 Hi @yuvii-b! Thank you for contributing to MyCMD. A maintainer will review your PR shortly. 🎉 |
1 similar comment
Contributor
|
🚀 Hi @yuvii-b! Thank you for contributing to MyCMD. A maintainer will review your PR shortly. 🎉 |
Contributor
Author
|
This repo was fun to explore! Appreciate how clean and beginner-friendly it is! |
Member
|
Hello @yuvii-b, I really love your contribution. Do you want to be a part of our Community. |
anshumanjadiya1102
approved these changes
Oct 18, 2025
Contributor
Author
Thanks! I’d love to join. @anshumanjadiya1102 |
Member
|
Hello @yuvii-b, You are invited to our Organization. Now you are a part of Drive-for-Java Community. Thanks for sharing love. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds three essential command-line utilities to MyCMD that enhance the shell's functionality and user experience.
(Closes: #51)
Commands
pwd- Prints the current working directory pathuptime- Displays how long the shell has been running since startupclearhistory- Clears the stored command historyChanges Made
PwdCommand.java,UptimeCommand.java, andClearHistoryCommand.javaShellContext.javawith uptime tracking and history managementApp.javaHelpCommand.javaargument parsing bug (was usingargs[1]instead ofargs[0])target/directory to.gitignoresince pushing it just bloats the repo and causes unnecessary merge conflicts.Usage Examples
Technical Details
Commandinterface patternTesting
helplisting with descriptionshelp <command>works for all new commands