Skip to content
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

Type builtin command #361

Merged
merged 3 commits into from
Mar 31, 2024
Merged

Conversation

AryanAb
Copy link
Contributor

@AryanAb AryanAb commented Jan 14, 2024

Added the type command. Currently it is capable of detecting aliases, builtins, and files in the PATH. It supports four flags: -a, -p, -P, and -t..

AryanAb and others added 2 commits January 14, 2024 01:29

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@MrPicklePinosaur MrPicklePinosaur marked this pull request as ready for review January 31, 2024 07:07
Copy link
Owner

@MrPicklePinosaur MrPicklePinosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall good stuff

rt: &mut Runtime,
) -> anyhow::Result<CmdOutput> {
let mut name_found = false;
if !path_search_only {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to reduce nesting, i would rephrase this control flow as:

// path search logic

if path_search_only {
  return
}

// rest of logic


#[derive(Parser)]
struct Cli {
#[arg(short = 'P')]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long flags for each of these and also some docs would be nice (we don't need to follow basic type builtin exactly)

@MrPicklePinosaur MrPicklePinosaur changed the title Added the type builtin command Type builtin command Jan 31, 2024
@MrPicklePinosaur MrPicklePinosaur merged commit 4d7c344 into MrPicklePinosaur:master Mar 31, 2024
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.

None yet

2 participants