Projects STRLCPY git-open Commits 895240ff
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    git-open
    skipped 69 lines
    70 70   # Host regex
    71 71   # HostName resolved.domain.com
    72 72   read -r -a ssh_array <<<"${ssh_line}"
    73  - ssh_optcode="${ssh_array[0]}"
    74  - if [[ ${ssh_optcode^^} == HOST ]]; then
     73 + ssh_optcode="$(echo "${ssh_array[0]}" | tr '[:upper:]' '[:lower:]')"
     74 + if [[ $ssh_optcode == HOST ]]; then
    75 75   # Host
    76 76   ssh_found=false
    77 77   # Iterate through aliases looking for a match
    skipped 6 lines
    84 84   break
    85 85   fi
    86 86   done
    87  - elif $ssh_found && [[ ${ssh_optcode^^} == HOSTNAME ]]; then
     87 + elif $ssh_found && [[ $ssh_optcode == HOSTNAME ]]; then
    88 88   # HostName, but only if ssh_found is true (the last Host entry matched)
    89 89   # Replace all instances of %h with the Host alias
    90 90   echo "${ssh_array[1]//%h/$domain}"
    skipped 144 lines
Please wait...
Page is in error, reload to recover