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

fix conflicts between git-completions.nu and git-aliases.nu #651

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

fdncred
Copy link
Collaborator

@fdncred fdncred commented Oct 26, 2023

This PR fixes the conflicts between git-completions.nu and git-aliases.nu.

Prior to this PR you would see problems like this

 use custom-completions\git\git-completions.nu *
 use aliases\git\git-aliases.nu
Error: nu::parser::missing_flag_param

  × Missing flag argument.
    ╭─[D:\nu_scripts\aliases\git\git-aliases.nu:64:1]
 64  export alias gco = git checkout
 65  export alias gcor = git checkout --recurse-submodules
    ·                                  ──────────┬─────────
    ·                                            ╰── flag missing string argument
 66  export alias gcount = git shortlog --summary --numbered
    ╰────

This is because, in this example, in git-completions.nu, there is a custom command named git checkout that takes a --recurse-submodules: string parameter, which means it's expecting a string. Removing the : string part fixes the issue and allows the files to be sourced/used as expected.

This seems more like a hack than a fix. I'm not sure if this behavior is intended or not, but this PR fixes it anyway.

close #493

@fdncred fdncred merged commit 310b1df into nushell:main Oct 26, 2023
@fdncred fdncred deleted the fix_conflicts branch October 26, 2023 20:11
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.

Missing flag argument in git aliases
1 participant