When I want to find a terminal's height and width, I check environment 
variables $LINES and $COLUMNS and/or use the output of tput lines and tput 
cols.  As far as I understand, these techniques are independent of the shell in 
use.

On Mon, Sep 28, 2020, at 15:43, fisherman via Fish-users wrote:
> Hello,
> 
> I am trying to replicate in FISH what I can do in BASH with the below 
> command:
> 
> read -p $'\e[18t' -s -r -d t size; printf "%s\n" "${size#*;}"
> 
> That command gives me the terminal's height and width.
> 
> I can do 'print "\e[18t]' but it puts the result in my prompt rather 
> than returning it to STDOUT like I expect.
> 
> Is there any way to do this in FISH?
> 
> Thank you.
> 
> 
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>


_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to