Browse Source

bash: git: Временно отключено дополнение текста коммитов

Maxim Likhachev 5 years ago
parent
commit
9e17b27716
  1. 6
      etc/shell/bash/bash_completion_custom

6
etc/shell/bash/bash_completion_custom

@ -1,6 +1,6 @@
#!/bin/bash ######################### #!/bin/bash #########################
# #
# Изменён: Ср 05 фев 2020 14:10:12 # Изменён: Ср 05 фев 2020 14:38:27
# #
#complete <что дополнять> <программа> #complete <что дополнять> <программа>
@ -94,7 +94,7 @@ _updirs() {
complete -F _updirs up complete -F _updirs up
_git-commit () { _git-commit() {
if git rev-parse --git-dir 2>&1 >&-; then if git rev-parse --git-dir 2>&1 >&-; then
if [[ $2 == "commit" ]] || [[ $2 == "cm" ]]; then if [[ $2 == "commit" ]] || [[ $2 == "cm" ]]; then
COMPREPLY=("$2 \"$(git log -1 --pretty=format:%B | grep -v "Merge" | grep : | cut -d : -f 1)") COMPREPLY=("$2 \"$(git log -1 --pretty=format:%B | grep -v "Merge" | grep : | cut -d : -f 1)")
@ -102,5 +102,5 @@ _git-commit () {
fi fi
} }
complete -F _git-commit git g #complete -c _git-commit git g

Loading…
Cancel
Save