Closed grozen closed 4 months ago
I feel like I've seen this before. Which shell are you loading into [bash, zsh]?
Oh yes, that would have been a useful bit of information. I'm using zsh.
I also started experiencing this bug. I'm also on zsh.
This is the relevant bit of code that wraps the commands. https://github.com/scmbreeze/scm_breeze/blob/8f5693f3452dbfa181da073bf3090c9b92614a61/lib/git/shell_shortcuts.sh#L26
It does not work as vim emacs gedit cat rm cp mv ln cd ls less subl code
is interpreted as a single element (as @grozen has pointed out).
It seems that in other places in the file, the shwordsplit
option is set to split words on spaces
https://github.com/scmbreeze/scm_breeze/blob/8f5693f3452dbfa181da073bf3090c9b92614a61/lib/git/shell_shortcuts.sh#L126
and indeed conditionally setting that option before the command wrapping loop does resolve the issue.
I have no idea why an array wasn't used in the first place though ... nor if there are any downsides to it
See also https://github.com/scmbreeze/scm_breeze/issues/284 and #283
Recently, built-in shell commands stopped working for my with scm_breeze. Debugging my way around, I found the culprit to be the following line in my ".git.scmbrc" file:
https://github.com/scmbreeze/scm_breeze/blob/8f5693f3452dbfa181da073bf3090c9b92614a61/git.scmbrc.example#L127
What started happening for me (and sadly I cannot say why) is that instead of wrapping each of the commands in
scmb_wrapped_shell_commands
my shell treated the entire string as a single command to try and wrap, which unsurprisingly didn't work.When I changed that line to:
Everything started working again.
I'd submit a pull request but this is the sort of thing that I suspect might only work for a specific set of environments and not others. If anyone has sufficient shell-fu to handle this that would be great, however.