Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use vared in zsh instead of read. #50

Merged
merged 1 commit into from

3 participants

@anonfunc

This change seems to do what you want. It passes ! and \ untouched, it gets history from the shell and it uses the zsh line editor for arrow keys and home/end.

@anonfunc anonfunc Use vared in zsh instead of read.
This change seems to do what you want.  It passes ! and \ untouched, it gets history from the shell and it uses the zsh line editor for arrow keys and home/end.
e6f4cd8
@ndbroadbent
Owner

Awesome, thanks very much!

@ndbroadbent ndbroadbent merged commit 8a81311 into ndbroadbent:master
@travisbot

This pull request fails (merged e6f4cd8 into f5d7d68).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 27, 2012
  1. @anonfunc

    Use vared in zsh instead of read.

    anonfunc authored
    This change seems to do what you want.  It passes ! and \ untouched, it gets history from the shell and it uses the zsh line editor for arrow keys and home/end.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 3 deletions.
  1. +1 −3 lib/git/status_shortcuts.sh
View
4 lib/git/status_shortcuts.sh
@@ -175,9 +175,7 @@ theirs(){ _git_resolve_merge_conflict "their" "$@"; }
git_commit_prompt() {
local commit_msg
if [[ $shell == "zsh" ]]; then
- # zsh 'read' is weak. If you know how to make this better, please send a pull request.
- # (Bash 'read' supports prompt, arrow keys, home/end, up through bash history, etc.)
- echo -n "Commit Message: "; read commit_msg
+ vared -h -p "Commit Message: " commit_msg
else
read -r -e -p "Commit Message: " commit_msg
fi
Something went wrong with that request. Please try again.