File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 46
46
47
47
# parse suffix from suffix=value
48
48
IFS=' =' read -ra suffix_flag <<< " $suffix_flag"
49
- suffix=${suffix_flag[1]}
49
+ function join_by { local IFS=" $1 " ; shift ; echo " $* " ; }
50
+ suffix=$( join_by " =" " ${suffix_flag[@]: 1} " )
50
51
51
52
# are we in a git repo?
52
53
if ! git rev-parse --is-inside-work-tree & > /dev/null; then
143
144
# Resolve sshconfig aliases
144
145
if [[ -e " $ssh_config " ]]; then
145
146
domain_resolv=$( ssh_resolve " $domain " )
146
- if [[ ! -z " $domain_resolv " ]]; then
147
+ if [[ -n " $domain_resolv " ]]; then
147
148
domain=" $domain_resolv "
148
149
fi
149
150
fi
Original file line number Diff line number Diff line change @@ -172,6 +172,11 @@ setup() {
172
172
assert_output " https://github.com/paulirish/git-open/anySuffix"
173
173
}
174
174
175
+ @test " gh: git open --suffix anySuffix?hello=world" {
176
+ run ../git-open " --suffix" " anySuffix?hello=world"
177
+ assert_output " https://github.com/paulirish/git-open/anySuffix?hello=world"
178
+ }
179
+
175
180
@test " gh: gist" {
176
181
git remote set-url origin
" [email protected] :2d84a6db1b41b4020685.git"
177
182
run ../git-open
You can’t perform that action at this time.
0 commit comments