-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# (C) 2025 magicant | ||
|
||
# Completion script for the "git-mv" command. | ||
# Supports Git 2.48.1. | ||
|
||
function completion/git-mv { | ||
WORDS=(git mv "${WORDS[2,-1]}") | ||
command -f completion//reexecute | ||
} | ||
|
||
function completion/git::mv:arg { | ||
|
||
OPTIONS=( #># | ||
"-f --force; force move/rename even if target exists" | ||
"-k; ignore errors when moving/renaming a file" | ||
"-n --dry-run; don't actually move/rename files" | ||
"-v --verbose; report what is being done" | ||
) #<# | ||
|
||
command -f completion//parseoptions | ||
case $ARGOPT in | ||
(-) | ||
command -f completion//completeoptions | ||
;; | ||
('') | ||
command -f completion//getoperands | ||
case ${WORDS[#]} in | ||
(0) | ||
command -f completion/git::completepath -r | ||
;; | ||
(*) | ||
complete -P "$PREFIX" -f | ||
;; | ||
esac | ||
;; | ||
esac | ||
|
||
} | ||
|
||
|
||
# vim: set ft=sh ts=8 sts=8 sw=8 et: |