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 4646
4747# parse suffix from suffix=value
4848IFS=' =' 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} " )
5051
5152# are we in a git repo?
5253if ! git rev-parse --is-inside-work-tree & > /dev/null; then
143144 # Resolve sshconfig aliases
144145 if [[ -e " $ssh_config " ]]; then
145146 domain_resolv=$( ssh_resolve " $domain " )
146- if [[ ! -z " $domain_resolv " ]]; then
147+ if [[ -n " $domain_resolv " ]]; then
147148 domain=" $domain_resolv "
148149 fi
149150 fi
Original file line number Diff line number Diff line change @@ -172,6 +172,11 @@ setup() {
172172 assert_output " https://github.com/paulirish/git-open/anySuffix"
173173}
174174
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+
175180@test " gh: gist" {
176181 git remote set-url origin " git@gist.github.com:2d84a6db1b41b4020685.git"
177182 run ../git-open
You can’t perform that action at this time.
0 commit comments