Skip to content

Commit

Permalink
Merge pull request #40 from yut23/chainslurm-menu-wrapping
Browse files Browse the repository at this point in the history
Force select to use one column on wide terminals
  • Loading branch information
zingale authored Oct 16, 2024
2 parents 72c4e10 + d0da070 commit 1840a73
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 1840a73

Please sign in to comment.