Revision 7a91596e ide/setup_IDE.sh

View differences:

ide/setup_IDE.sh
111 111
  eval set -- "$arguments"
112 112

  
113 113
  # evaluate arguments
114
  local numchars=1
114
  local numchars=0
115 115
  local options=""
116 116
  local outvar=""
117 117
  while [ true ]; do
......
137 137
  # read user input
138 138
  local _userinput=""
139 139
  while [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); do
140
    read -p "your selection: " -n $numchars -e _userinput
140
    if [ $numchars == 0 ]; then
141
      read -p "your selection: " -e _userinput
142
    else
143
      read -p "your selection: " -n $numchars -e _userinput
144
    fi
141 145
    if [ -z $_userinput ] || ( [ $numchars == 1 ] && [ ! -z "$options" ] && [[ ! $_userinput =~ ^["$options"]$ ]] ); then
142 146
      printWarning "[$_userinput] is no valid action\n"
143 147
    fi
......
375 379
  if [[ $@ == *"--help"* || $@ == *"-h"* ]]; then
376 380
    printHelp
377 381
    printf "\n"
378
    exitScript
382
    quitScript
379 383
  fi
380 384

  
381 385
  # handle command line arguments

Also available in: Unified diff