On 6/13/13 3:58 PM, Linda Walsh wrote:
>
> I have a small function in my bashrc:
>
> function showsize () {\
> local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
> echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
> }
> export -f showsize
> trap showsize SIGWINCH
> ---
> Tha
Dave Gibson wrote:
Trial and error suggests it's something to do with new-style command
substitution. Try backticks:
local s=`stty size`
Yes... you are right. This works... while
local s=$(stty size) does not.
That's icky! I thought they were identical, they appea
Greg Wooledge wrote:
This makes me continue to suspect that the problem is being triggered by
something else in your setup (possibly multiple things working together).
You might try to reproduce the problem in a simpler setup, to see if you
can isolate what factors must be present for it to o
Linda Walsh wrote:
>
> I have a small function in my bashrc:
>
> function showsize () {\
> local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
> echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
> }
> export -f showsize
> trap showsize SIGWINCH
> ---
> That has the effect of
On Thu, Jun 13, 2013 at 04:42:36PM -0700, Linda Walsh wrote:
> Chris F.A. Johnson wrote:
> > The baskspaces (\b) are erasing your input, not the function's
> > output.
That's incorrect. A backspace character sent to a terminal device
moves the cursor (or does whatever else the terminal choose
Dennis Williamson wrote:
read _CRST < <(tput sgr0)
instead of
_CRST=$(tput sgr0)
Run both of them with trace turned on and you'll find out.
;-)
I used to have the 2nd one...got tired of
having my tracing change colors when it got to that...
On Jun 13, 2013 4:09 PM, "Linda Walsh" wrote:
>
>
>
> Greg Wooledge wrote:
>>
>> On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote:
>>>
>>> So how can my showsize function be mangling the input in a way that
>>> prevents proper execution, but isn't recorded by bash?
>>
>>
>> What makes y
Chris F.A. Johnson wrote:
On Thu, 13 Jun 2013, Linda Walsh wrote:
I have a small function in my bashrc:
function showsize () {\
local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
}
export -f showsize
trap showsize SIGWINCH
On Thu, 13 Jun 2013, Linda Walsh wrote:
I have a small function in my bashrc:
function showsize () {\
local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
}
export -f showsize
trap showsize SIGWINCH
---
That has the effect of sh
Greg Wooledge wrote:
On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote:
So how can my showsize function be mangling the input in a way that
prevents proper execution, but isn't recorded by bash?
What makes you believe it's this function that's causing your problem,
and not somethin
It only happens when I alter the window size and the window
size is printed out.
Greg Wooledge wrote:
On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote:
So how can my showsize function be mangling the input in a way that
prevents proper execution, but isn't recorded by bash?
What ma
On Thu, Jun 13, 2013 at 12:58:02PM -0700, Linda Walsh wrote:
> So how can my showsize function be mangling the input in a way that
> prevents proper execution, but isn't recorded by bash?
What makes you believe it's this function that's causing your problem,
and not something else, such as a PROMP
I have a small function in my bashrc:
function showsize () {\
local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\
echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \
}
export -f showsize
trap showsize SIGWINCH
---
That has the effect of showing me my current window size
when I
13 matches
Mail list logo