Skip to content

Commit 621a151

Browse files
committed
- Fix input normalization to ignore anything after the double dash (--) operator
1 parent 0696ca4 commit 621a151

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/bashly/views/command/normalize_input.gtx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
= view_marker
22

33
> normalize_input() {
4-
> local arg flags
4+
> local arg flags passthru
55
>
66
> while [[ $# -gt 0 ]]; do
77
> arg="$1"
8-
> if [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
8+
> if [[ $passthru == true ]]; then
9+
> input+=("$arg")
10+
> elif [[ $arg =~ ^(--[a-zA-Z0-9_\-]+)=(.+)$ ]]; then
911
> input+=("${BASH_REMATCH[1]}")
1012
> input+=("${BASH_REMATCH[2]}")
1113
> elif [[ $arg =~ ^(-[a-zA-Z0-9])=(.+)$ ]]; then
@@ -20,6 +22,9 @@ if Settings.compact_short_flags
2022
> done
2123
end
2224

25+
> elif [[ "$arg" == "--" ]]; then
26+
> passthru=true
27+
> input+=("$arg")
2328
> else
2429
> input+=("$arg")
2530
> fi

0 commit comments

Comments
 (0)