Projects STRLCPY git-open Commits 3e8c908d
🤬
  • ■ ■ ■ ■ ■
    git-open
    skipped 45 lines
    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
    skipped 90 lines
    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
    skipped 128 lines
  • ■ ■ ■ ■ ■
    test/git-open.bats
    skipped 171 lines
    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
    skipped 522 lines
Please wait...
Page is in error, reload to recover