diff --git a/CHANGELOG.md b/CHANGELOG.md index 1384041..365121c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,19 +4,19 @@ ### modulecmd * arguments to CMake and autotools can now be defined in the YAML configuration file. (issue #249, #253) -* Required patches can now be defined in the YAML configuration - file (issue #249) * BUGFIX: parsing the version number and setting the variables V_MAJOR, V_MINOR, V_PATCHLVL was broken in cases where the version number consist of less then three numbers and plus a suffix. (issue #248) * BUGFIX: don't abbreviate out of search if not running in a - terminal. (issue #250) + terminal. (issues #250,#255) ### build-system * Option '--clean-install' added. If this option is set, the module is removed before building, if the module already exist. (issue #247) +* Required patches can now be defined in the YAML configuration + file (issue #249) * Check added whether all required group dependencies are specified and also not more than required. (issue #251) * The number of directory components to be removed while diff --git a/Pmodules/modulecmd.bash.in b/Pmodules/modulecmd.bash.in index 57c73e1..3a52f41 100644 --- a/Pmodules/modulecmd.bash.in +++ b/Pmodules/modulecmd.bash.in @@ -1271,7 +1271,7 @@ subcommand_avail() { # get number of columns of terminal, set to a default if not running # in a terminal. local -i cols=80 - [[ -t 1 -a -t 2 ]] && cols=$(tput cols) + [[ -t 1 && -t 2 ]] && cols=$(tput cols) #...................................................................... output_header() { @@ -2118,7 +2118,7 @@ subcommand_list() { colsize+=2 local -i cols=80 - [[ -t 1 -a -t 2 ]] && cols=$(${tput} cols) + [[ -t 1 && -t 2 ]] && cols=$(${tput} cols) local -i column=0 printf "Currently Loaded Modules:\n" 1>&2 for s in "${strs[@]}"; do @@ -2300,7 +2300,7 @@ subcommand_search() { local groups=() local with_modules='//' local -i cols=80 - [[ -t 1 -a -t 2 ]] && cols=$(${tput} cols) # get number of columns of terminal + [[ -t 1 && -t 2 ]] && cols=$(${tput} cols) # get number of columns of terminal local -i max_len_modulename=0 local src_prefix=() local opt_print_header='yes' @@ -2348,7 +2348,7 @@ subcommand_search() { print_line_default() { write_line() { local str="$1" - if [[ -t 1 -1 -t 2 ]] && (( ${#str} >= cols )); then + if [[ -t 1 && -t 2 ]] && (( ${#str} >= cols )); then str="${str:0:$((cols-1))}>" fi std::info "${str}"