Re: [Fish-users] evaluating $COLUMNS in a loop

2013-09-18 Thread David Adam
On Thu, 19 Sep 2013, Martin Bähr wrote: > On Wed, Sep 18, 2013 at 12:15:59PM -0700, ridiculous_fish wrote: > > > one minor issue i still have is that in the above $COLUMNS appears to be > > > evaluated only once. i'd like it to be reevaluated every time. > > > > > > is there a way to do that? > >

Re: [Fish-users] evaluating $COLUMNS in a loop

2013-09-18 Thread Martin Bähr
On Wed, Sep 18, 2013 at 12:15:59PM -0700, ridiculous_fish wrote: > > one minor issue i still have is that in the above $COLUMNS appears to be > > evaluated only once. i'd like it to be reevaluated every time. > > > > is there a way to do that? > Try using 'tput cols' to get the terminal width inst

Re: [Fish-users] evaluating $COLUMNS in a loop

2013-09-18 Thread ridiculous_fish
On Sep 17, 2013, at 9:44 PM, Martin Bähr wrote: > On Wed, Sep 18, 2013 at 05:00:09AM +0200, Martin Bähr wrote: >> clear >> while true >>echo \e\[H >>for i in (ls -tr) >>du -sh $i >>end | tail -20 | sed -e 's/^/'\e'\[K/' | cut -c -(math $COLUMNS - 2) >>sleep 2 >> end > >

[Fish-users] evaluating $COLUMNS in a loop

2013-09-17 Thread Martin Bähr
On Wed, Sep 18, 2013 at 05:00:09AM +0200, Martin Bähr wrote: > clear > while true > echo \e\[H > for i in (ls -tr) > du -sh $i > end | tail -20 | sed -e 's/^/'\e'\[K/' | cut -c -(math $COLUMNS - 2) > sleep 2 > end one minor issue i still have is that in the above $COLUMNS a