-
Notifications
You must be signed in to change notification settings - Fork 22
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestThis is for HacktoberfestThis is for Hacktoberfesthacktoberfest-acceptedThis is for HacktoberfestThis is for Hacktoberfest
Description
Problem:
Currently, the mycmd project lacks a few helpful commands that are standard in many command-line tools.
For example, there’s no command to display the current working directory (pwd), clear the command history (clearhistory), or show how long the shell has been active (uptime).
These additions would make mycmd more feature-complete and user-friendly.
Solution:
Add the following commands:
pwd: Prints the current working directory.clearhistory: Clears the stored command history.uptime: Displays how long the shell has been running since startup.
Implementation and Alternatives:
- Each command will follow the existing command structure and integrate with the core command registry.
- Extending the existing
HistoryCommandto support a-cflag for clearing history, but a dedicatedclearhistorycommand keeps usage simpler. - Tracking uptime as part of the
VersionCommand, though a standaloneuptimecommand provides a cleaner experience.
Example:
mycmd> pwd
C:\Users\root\Projects\mycmd
mycmd> uptime
Up since 0h 12m 45s
mycmd> clearhistory
Command history cleared.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthacktoberfestThis is for HacktoberfestThis is for Hacktoberfesthacktoberfest-acceptedThis is for HacktoberfestThis is for Hacktoberfest