scmbreeze / scm_breeze

Adds numbered shortcuts to the output git status, and much more
https://madebynathan.com/2011/10/19/git-shortcuts-like-youve-never-seen-before/
MIT License
2.82k stars 192 forks source link

ohmyzsh & numbered shortcuts not working #315

Closed Stephen2 closed 4 months ago

Stephen2 commented 2 years ago

Just switched from bash to zsh shell, and using ohmyzsh

Have installed scm_breeze and it's working, and numbering files, e.g.,:

gs

# On branch: master...origin/master  |  [*] => $e*
#
➤ Untracked files
#
#      untracked: [1] foo 
#      untracked: [2] foo2 
#

But wrapped commands that make use of those numbers don't work:

rm 1-2
rm: cannot remove '1-2': No such file or directory

Variables are set properly though:

echo $e1 $e2
/home/stephen/code/REDACTED/foo /home/stephen/code/REDACTED/foo2

Version info:

zsh --version
zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

Any ideas?

ghthor commented 2 years ago

Probably this? https://github.com/scmbreeze/scm_breeze/issues/297

jamesvphan commented 2 years ago

I am also running across something similar. I'm on macOS Monterey and noticed that after installing scm_breeze, I not only don't see the numbered shortcuts, but I also noticed that some of the scm_breeze git commands do not work (gb for example). I believe scm_breeze is conflicting with the command line tools installed. When I run which -a git, I get the following as opposed to the normal message when checking git. If I uninstall scm_breeze, I can use git normally.

    case $1 in
        (commit | blame | add | log | rebase | merge | difftool | switch) exec_scmb_expand_args "$_git_cmd" "$@" ;;
        (checkout | diff | rm | reset | restore) exec_scmb_expand_args --relative "$_git_cmd" "$@" ;;
        (branch) _scmb_git_branch_shortcuts "${@:2}" ;;
        (*) "$_git_cmd" "$@" ;;
    esac
}

/usr/local/bin/git
/usr/bin/git
ghthor commented 2 years ago

@jamesvphan what's the output of the following, I think the head of output is snipped off?

type git
jamesvphan commented 2 years ago

@jamesvphan what's the output of the following, I think the head of output is snipped off?

type git

I get this: git is a shell function from /Users/[name]/.scm_breeze/lib/git/aliases.sh

EDIT: actually, after installing again, seems to be working

Stephen2 commented 4 months ago

Closed by #331