summaryrefslogtreecommitdiff
path: root/etc/bash_completion.d/vyatta-cfg
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2011-05-16 19:57:39 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2011-05-16 19:57:39 -0700
commit76ff750a6b057dacba1361726f15cd5bd4bfe14b (patch)
tree8eea69cfa6ba3377883d2caa4aeca874c100b2a3 /etc/bash_completion.d/vyatta-cfg
parent7ea935bc47f37111b95ed8a4f989a2ae3f578e5a (diff)
downloadvyatta-cfg-76ff750a6b057dacba1361726f15cd5bd4bfe14b.tar.gz
vyatta-cfg-76ff750a6b057dacba1361726f15cd5bd4bfe14b.zip
reimplement commit hooks mechanism
* do NOT reinvent the wheel (directory traversal, sorting, script execution, etc.) when the functionality is already provided by the system. * eliminate hard-coded hook directory in various feastures. everyone should obtain the directory path from the config backend.
Diffstat (limited to 'etc/bash_completion.d/vyatta-cfg')
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 0a62267..dfd73ac 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -123,11 +123,12 @@ commit ()
args[${#args[@]}]="$arg"
fi
done
- args+=("-C '$comment'")
+ export COMMIT_COMMENT="$comment"
export COMMIT_VIA=cli
/opt/vyatta/sbin/my_commit "${args[@]}"
unset COMMIT_VIA
+ unset COMMIT_COMMENT
}
commit-confirm ()