Skip to content

git cherry -v: unknown option version #1263

Description

@rossnomann

After installing git completions git cherry -v stopped working.

Actual behavior:

> git cherry -v master
error: unknown option `version'
usage: git cherry [-v] [<upstream> [<head> [<limit>]]]

    --[no-]abbrev[=<n>]   use <n> digits to display object names
    -v, --[no-]verbose    be verbose

Expected behavior:

> sh -c 'git cherry -v master'
+ fa019d10c3e8d58ceb312ac6005d72ddf467ec95 test 1

--verbose works however:

> git cherry --verbose master
+ fa019d10c3e8d58ceb312ac6005d72ddf467ec95 test 1

~/.config/nushell/env.nu:

use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/bat/bat-completions.nu *
use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/git/git-completions.nu *
use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/less/less-completions.nu *
use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/make/make-completions.nu *
use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/rg/rg-completions.nu *
use /nix/store/gf4qsarmpm9wipglhcvy6y7baa525haj-nu_scripts-0-unstable-2026-06-03/share/nu_scripts/custom-completions/tar/tar-completions.nu *

def create_left_prompt [] {
    let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
    let path_dir = match (do { $env.PWD | path relative-to $nu.home-dir }) {
        null => $env.PWD
        '' => '~'
        $relative_pwd => ([~ $relative_pwd] | path join)
    }
    let path_segment = $"($path_color)($path_dir)"
    let exit_code_color = ansi magenta_bold
    let exit_code_segment = $"($exit_code_color)[ ($env.LAST_EXIT_CODE) ]"
    let time_color = ansi green_bold
    let time_value = (date now | format date '%H:%M:%S')
    let time_segment = $"($time_color)[ ($time_value) ]"
    $"($time_segment) ($path_segment) ($exit_code_segment) "
}

$env.PROMPT_COMMAND = {|| create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = {|| }

cherry -v without git-completions works as expected.

> nu --version
0.113.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions