gitbash 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/_utils.sh +7 -0
- package/commands/create.sh +14 -5
- package/package.json +1 -1
package/commands/_utils.sh
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
# shellcheck disable=SC2155
|
|
3
3
|
# Common utilities for gitbash commands - compatible with bash and zsh
|
|
4
4
|
|
|
5
|
+
# Load config file if it exists
|
|
6
|
+
CONFIG_FILE="$HOME/.gitbashrc"
|
|
7
|
+
if [[ -f "$CONFIG_FILE" ]]; then
|
|
8
|
+
# shellcheck disable=SC1090
|
|
9
|
+
source "$CONFIG_FILE"
|
|
10
|
+
fi
|
|
11
|
+
|
|
5
12
|
# Color codes for consistent output
|
|
6
13
|
COLOR_RED='\033[0;31m'
|
|
7
14
|
COLOR_GREEN='\033[0;32m'
|
package/commands/create.sh
CHANGED
|
@@ -163,12 +163,21 @@ TYPES
|
|
|
163
163
|
|
|
164
164
|
if [[ ${#positional_args[@]} -gt 0 ]]; then
|
|
165
165
|
# Arguments provided - use one-liner mode
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
166
|
+
# Use array index 1 for zsh compatibility (zsh arrays are 1-indexed, bash uses 0)
|
|
167
|
+
if [[ -n "${ZSH_VERSION:-}" ]]; then
|
|
168
|
+
jira_link="${positional_args[1]}"
|
|
169
|
+
if [[ ${#positional_args[@]} -gt 1 ]]; then
|
|
170
|
+
branch_title="${positional_args[*]:1}"
|
|
171
|
+
else
|
|
172
|
+
branch_title=""
|
|
173
|
+
fi
|
|
170
174
|
else
|
|
171
|
-
|
|
175
|
+
jira_link="${positional_args[0]}"
|
|
176
|
+
if [[ ${#positional_args[@]} -gt 1 ]]; then
|
|
177
|
+
branch_title="${positional_args[*]:1}"
|
|
178
|
+
else
|
|
179
|
+
branch_title=""
|
|
180
|
+
fi
|
|
172
181
|
fi
|
|
173
182
|
else
|
|
174
183
|
# Interactive mode
|