Closed michaelmior closed 6 years ago
I don't think I use this area of the library. What type of workflow does this support? Is this patch changing how I commit my message if I use gca
or does it only apply to the cases where I use the direct keybindings to open the git_commit_all
dialog?
Everything still works exactly the same except in the case where remappings such as the one I posted above exist. In those cases, assume I have git_commit_all_keys="\C-x "
. After pressing CTRL+x SPACE I would still have to press enter before git_commit_all
is executed. This patch fixes this behaviour. In the case where such bindings are not set, nothing changes.
Thanks!
You are welcome! =)
@michaelmior I'm also seeing $ git_commit_all^M
in iTerm2 on Mac, where ^M
should be simulating the "return" key to submit the command.
Was your PR meant to include the following code somewhere?
if [[ "$MC_SID" != "" || "$MC_CONTROL_PID" != "" ]]; then
bindkey "^J" accept-line
else
bindkey "^J" self-insert
fi
It looks like bindkey
is also only available in zsh. Maybe we could use ^M
for zsh, and stick with \n
on bash. I'm going to revert this for now because I use the Ctrl + x + space
shortcut very frequently, but would like to hear more about the advantage of switching to ^M
My PR did exactly what I was intending it to do on Linux. Unfortunately, I did not have a macOS machine to test on at the time. I use the Ctrl + x + space
shortcut frequently myself and it was not correctly working for me on Linux before this PR.
Ah interesting, are you using Zsh or Bash? Maybe we can check for the OS with something like:
unameOut="$(uname -s)"case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"esac
echo ${machine}
On Sat, Sep 1, 2018 at 12:06 AM Michael Mior notifications@github.com wrote:
My PR did exactly what I was intending it to do on Linux. Unfortunately, I did not have a macOS machine to test on at the time. I use the Ctrl + x + space shortcut frequently myself and it was not correctly working for me on Linux before this PR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/scmbreeze/scm_breeze/pull/246#issuecomment-417730341, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIhEAo6HBSoPte3_jCVqtDR_UrU3ciWks5uWW0egaJpZM4TTZYo .
Your initial comment had some code that referred to bindkey
, so I'm assuming that you're on Zsh (because there is no bindkey
command in bash.)
So please let me know if e8a5f775d1300714d026affffe28bd0c508ed416 works for you
@ndbroadbent Sorry for the delayed response. That does indeed work for me!
Consider adding keybindings to make multiline editing easier such as the following:
When this is done
\n
no longer submits the command but^M
will work in both cases.