Skip to content

Commit

Permalink
Force select to use one column on wide terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Oct 16, 2024
1 parent 72c4e10 commit d0da070
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions job_scripts/slurm/chainslurm-menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ if [[ $job_count -gt 0 ]]; then
# (${#job_count} gets the length of the string "$job_count")
printf '%*s %s\n' ${#job_count} '' "$header"
PS3='> '
# override the terminal width so select displays all options in one column
COLUMNS=1
select line in "${job_lines[@]}"; do
# If the user entered a valid option number, the full contents of that line
# will be placed in $line. Otherwise, $line will be empty and the entered
Expand Down

0 comments on commit d0da070

Please sign in to comment.