Skip to content

Commit 358c8c1

Browse files
make show use your actual terminal width, instead of defaulting to 80 cols
1 parent 274d7e6 commit 358c8c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bin/sr3d

+7-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ if [[ "$action" == "convert" ]] ; then
3030
exit "$?"
3131
fi
3232

33-
sr3r "sr3 $*"
33+
# Pass COLUMNS env var so show knows the correct terminal width
34+
# and doesn't default to 80 characters wide.
35+
if [[ "$action" == "show" ]]; then
36+
pre="export COLUMNS=$(tput cols); "
37+
fi
38+
39+
sr3r "${pre}sr3 $*"
3440

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

0 commit comments

Comments
 (0)