mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
139 lines
1.8 KiB
TOML
139 lines
1.8 KiB
TOML
command = "git"
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"is not a git command"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[err_contains(the most similar command is)]
|
|
{{command[0]}} {{err::(?:the most similar command is )(\S+)}} ''',
|
|
'''
|
|
#[!err_contains(the most similar command is)]
|
|
{{command[0]}} {{typo[1](
|
|
add,
|
|
am,
|
|
archive,
|
|
bisect,
|
|
branch,
|
|
bundle,
|
|
checkout,
|
|
cherry-pick,
|
|
citool,
|
|
clean,
|
|
clone,
|
|
commit,
|
|
describe,
|
|
diff,
|
|
fetch,
|
|
format-patch,
|
|
gc,
|
|
gitk,
|
|
grep,
|
|
gui,
|
|
init,
|
|
log,
|
|
maintenance,
|
|
merge,
|
|
mv,
|
|
notes,
|
|
pull,
|
|
push,
|
|
range-diff,
|
|
rebase,
|
|
reset,
|
|
restore,
|
|
revert,
|
|
rm,
|
|
scalar,
|
|
shortlog,
|
|
show,
|
|
sparse-checkout,
|
|
stash,
|
|
status,
|
|
submodule,
|
|
switch,
|
|
tag,
|
|
worktree,
|
|
config,
|
|
fast-export,
|
|
fast-import,
|
|
filter-branch,
|
|
mergetool,
|
|
pack-refs,
|
|
prune,
|
|
reflog,
|
|
remote,
|
|
repack,
|
|
replace,
|
|
)}} {{command[2:]}}'''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"did not match any file"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[cmd_contains(checkout)]
|
|
git checkout {{typo[2]({{shell(git branch | sed 's/^*//')}})}} ''',
|
|
'''
|
|
#[cmd_contains(checkout)]
|
|
git branch {{command[2]}} && \
|
|
git checkout {{command[2]}} '''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"has no upstream branch"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[cmd_contains(push)]
|
|
git push --set-upstream origin {{shell(git rev-parse --abbrev-ref HEAD)}} '''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"no tracking information for the current branch"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[cmd_contains(pull)]
|
|
git pull --set-upstream origin {{shell(git rev-parse --abbrev-ref HEAD)}} '''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"a branch named"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[cmd_contains(branch)]
|
|
git checkout {{command[2]}} '''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"updates were rejected"
|
|
]
|
|
suggest = [
|
|
'''
|
|
#[cmd_contains(push)]
|
|
git pull && \
|
|
{{command}} ''',
|
|
'''
|
|
#[cmd_contains(push)]
|
|
{{command}} --force '''
|
|
]
|
|
|
|
[[match_err]]
|
|
pattern = [
|
|
"you have unstaged changes"
|
|
]
|
|
suggest = [
|
|
'''
|
|
git stash && \
|
|
{{command}} && \
|
|
git stash pop '''
|
|
]
|