Skip to content

Commit f136946

Browse files
authored
Merge pull request #54 from AleixMT/commit_feature
Commit feature solved #37
2 parents 3586a26 + d86b5a0 commit f136946

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

data/features/commit/commit.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
commit()
44
{
5+
if echo "$1" | grep -qE "^\-am\$|^\-ma\$|^\-m\$|^\-a\$"; then
6+
shift
7+
fi
8+
59
messag="$@"
6-
while [ -z "$messag" ]; do
10+
while [ -z "${messag}" ]; do
711
read -p "Add message: " messag
812
done
9-
git commit -am "$messag"
13+
14+
git commit -am "${messag}"
1015
}
1116
if [ -f "€{BASH_COMPLETIONS_PATH}" ]; then
1217
source "€{BASH_COMPLETIONS_PATH}"

src/core/functions_common.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,12 +681,11 @@ argument_processing()
681681
# But first check that the argument has characters and also check that those characters are valid characters
682682
# for a variable in bash (regexp [a-zA-Z_][a-zA-Z_0-9]*, which is equal to any string using alphanumeric
683683
# characters beginning with ant alphabetic characters and containing underscores at any position)
684-
if [ -z "${key}" ] || ! echo "${key}" | grep -Eo "^[aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_][aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_0-9]*$"; then
684+
if [ -z "${key}" ] || ! echo "${key}" | grep -Eqo "^[aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_][aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ_0-9]*$"; then
685685
output_proxy_executioner "The current argument \"${key}\" is empty or not valid" "WARNING"
686686
shift
687687
continue
688688
fi
689-
690689
# Indirect expand wrapper variable
691690
generate_wrappers # Fill WRAPPERS_KEYNAMES dictionary
692691
local wrapper_key

0 commit comments

Comments
 (0)