OSDN Git Service

yash: share/completion/git-checkout: バージョン 2.1.2 対応
authormagicant <magicant@048f04df-13f5-43d7-8114-9f9ceecaec24>
Wed, 1 Oct 2014 14:45:12 +0000 (14:45 +0000)
committermagicant <magicant@048f04df-13f5-43d7-8114-9f9ceecaec24>
Wed, 1 Oct 2014 14:45:12 +0000 (14:45 +0000)
-B, -b, --orphan の引数の構文も修正

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/yash/yash/trunk@3279 048f04df-13f5-43d7-8114-9f9ceecaec24

NEWS
NEWS.ja
share/completion/git-checkout

diff --git a/NEWS b/NEWS
index 6b76db6..1466375 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,8 @@ History of Yash
 ----------------------------------------------------------------------
 Yash 2.37
 
-  +  Updated completion script for: git-push (Git 2.0.1).
+  +  Updated completion scripts for:
+     git-checkout (Git 2.1.2), git-push (Git 2.0.1).
 
 ----------------------------------------------------------------------
 Yash 2.36
diff --git a/NEWS.ja b/NEWS.ja
index 40448b9..e205473 100644 (file)
--- a/NEWS.ja
+++ b/NEWS.ja
@@ -10,7 +10,8 @@ Yash 更新履歴
 ----------------------------------------------------------------------
 Yash 2.37
 
-  +  補完スクリプトを更新: git-push (Git 2.0.1)
+  +  補完スクリプトを更新:
+     git-checkout (Git 2.1.2), git-push (Git 2.0.1)
 
 ----------------------------------------------------------------------
 Yash 2.36
index e6eac1d..6560296 100644 (file)
@@ -1,7 +1,7 @@
-# (C) 2011 magicant
+# (C) 2011-2014 magicant
 
 # Completion script for the "git-checkout" command.
-# Supports Git 1.7.7.
+# Supports Git 2.1.2.
 
 function completion/git-checkout {
        WORDS=(git checkout "${WORDS[2,-1]}")
@@ -11,15 +11,16 @@ function completion/git-checkout {
 function completion/git::checkout:arg {
 
        OPTIONS=( #>#
-       "B; create or reset a new branch and check it out"
-       "b; create a new branch and check it out"
+       "B:; create or reset a new branch and check it out"
+       "b:; create a new branch and check it out"
        "--conflict:; like --merge, but specify format of unmerged files"
        "--detach; leave HEAD in detached head state"
        "f --force; overwrite local changes or ignore unmerged files"
+       "--ignore-skip-worktree-bits; ignore sparse patterns"
        "l; enable reflog for the new branch"
        "m --merge; do 3-way merge for destination branch"
        "--no-track; create a non-tracking branch"
-       "--orphan; create a new branch with no parent"
+       "--orphan:; create a new branch with no parent"
        "--ours; checkout local version for unmerged files"
        "p --patch; interactively choose hunks to check out"
        "q --quiet; print error and warning messages only"
@@ -32,6 +33,9 @@ function completion/git::checkout:arg {
                (-)
                        command -f completion//completeoptions
                        ;;
+               ([Bb]|--orphan)
+                       command -f completion/git::completeref --branches
+                       ;;
                (--conflict) #>>#
                        complete -P "$PREFIX" -D "ours and theirs" merge
                        complete -P "$PREFIX" -D "ours, theirs, and original" diff3