瀏覽代碼

Update sssh.sh

Changed regex for project number backward compatible to old bash versions
erdo_king 8 年之前
父節點
當前提交
933eeab17a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      sssh.sh

+ 1 - 1
sssh.sh

@@ -92,7 +92,7 @@ function print_projectmenu() {
         GROUP_FILTER=
 
         ## check if given projectname or projectnumber
-        if [[ "$1" == ?(-)+([0-9]) ]]; then
+        if [[ $1 =~ ^[0-9]+$ ]] ; then
           ## projectnumber, read projectname from "projects" string
           project=$( echo $projects | cut -d ":" -f "$1" )
         else