Skip to content

Add command mycli self source-code#49

Open
gcbeltramini wants to merge 4 commits into
mainfrom
gb/source-code
Open

Add command mycli self source-code#49
gcbeltramini wants to merge 4 commits into
mainfrom
gb/source-code

Conversation

@gcbeltramini

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI 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.

Pull request overview

Adds a new self-inspection command to the mycli bash CLI that prints the source code for a selected command/subcommand script.

Changes:

  • Introduces self source-code <command> <subcommand> to display a command’s implementation.
  • Uses bat for pretty printing when available, falling back to cat.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread commands/self/source-code.sh Outdated
Comment thread commands/self/source-code.sh Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread commands/self/source-code.sh
Comment on lines +25 to +33
# Resolve file using find to enforce "commands/" boundary (prevents ../.. and glob escapes)
script_path=$(find "${CLI_DIR}/commands" \
-maxdepth 2 \
-type f \
-path "${CLI_DIR}/commands/${command}/${subcommand}.sh")

if [[ -z $script_path ]]; then
exit_with_error "Command 'mycli $command $subcommand' not found."
fi
@gcbeltramini gcbeltramini changed the title Add command mycli source code Add command mycli self source-code Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants