Any way to get table output to respect screen width?

Now that more and more columns are being added (e.g. types with long names like VIRTUAL-MACHINE) is there any way to get the table output to respect the window size and not wrap? Something like export CLIFF_FIT_WIDTH=1 does for the OpenStack CLI?

I’m not seeing anything obvious in https://github.com/olekukonko/tablewriter which would let us do that through an env variable.

You can customize what columns to show though and then make that permanent by setting up an alias.

stgraber@castiana:~$ lxc alias add list "list -c nstd"
stgraber@castiana:~$ lxc list
+-------------+---------+-----------+-------------+
|    NAME     |  STATE  |   TYPE    | DESCRIPTION |
+-------------+---------+-----------+-------------+
| centos3     | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| centos4     | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| focal       | RUNNING | CONTAINER |             |
+-------------+---------+-----------+-------------+
| keybase     | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| maas01      | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| redis       | RUNNING | CONTAINER |             |
+-------------+---------+-----------+-------------+
| snapcraft   | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| steam       | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| test-snapd  | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| ups-monitor | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+
| zerotier    | STOPPED | CONTAINER |             |
+-------------+---------+-----------+-------------+