Skip to content

Commit

Permalink
make show use your actual terminal width, instead of defaulting to 80…
Browse files Browse the repository at this point in the history
… cols
  • Loading branch information
reidsunderland committed Sep 4, 2024
1 parent 274d7e6 commit 358c8c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/sr3d
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ if [[ "$action" == "convert" ]] ; then
exit "$?"
fi

sr3r "sr3 $*"
# Pass COLUMNS env var so show knows the correct terminal width
# and doesn't default to 80 characters wide.
if [[ "$action" == "show" ]]; then
pre="export COLUMNS=$(tput cols); "
fi

sr3r "${pre}sr3 $*"

# Special cases for certain actions AFTER running on nodes
if [[ "$action" == "remove" ]] ; then
Expand Down

0 comments on commit 358c8c1

Please sign in to comment.