Use [TODO: Code shorthand span ] To Get The Number Of Columns And Lines/Rows Count In A Terminal Window On A Mac
TL;DR - Columns
bash
TL;DR - Lines/Rows
bash
- I generally use [TODO: Code shorthand span ] when I need to figure out the number of columns or lines/rows a terminal window has
- This probably works on lots of linux machines too. ymmv are on windows
- I'm not sure if [TODO: Code shorthand span ] is installed by default or if it got installed by homebrew. I don't remember installing it, but if you don't have it you may have to do that work
- ` bash ` , ` zsh ` , and some other shells also set ENV vars that can be used to pull the numbers (link below)
Footnotes And References
- •
- •