Unix Technical Forum

ksh command line problem

This is a discussion on ksh command line problem within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Is there any way to get ksh to display complete lines when running in a wide window instead of ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 08:10 AM
dave
 
Posts: n/a
Default ksh command line problem

Is there any way to get ksh to display complete lines when running in a
wide window instead of just printing pieces of the line?

Thanks,
Dave Feustel

--
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 08:10 AM
Joachim Schipper
 
Posts: n/a
Default Re: ksh command line problem

dave <daf@amd.localhost.comcast.net> wrote:
> Is there any way to get ksh to display complete lines when running in a
> wide window instead of just printing pieces of the line?


Yes; occasionally, ksh can get a bit confused [1], but resizing the
window usually fixes that.

Joachim

[1] There is of course a more technical explanation, but I'm not sure I
understand enough of the issues to attempt to give it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 08:10 AM
dave
 
Posts: n/a
Default Re: ksh command line problem

Joachim Schipper <jdNoOtSPAMschipper@math.uu.nl> wrote:
> dave <daf@amd.localhost.comcast.net> wrote:
>> Is there any way to get ksh to display complete lines when running in a
>> wide window instead of just printing pieces of the line?

>
> Yes; occasionally, ksh can get a bit confused [1], but resizing the
> window usually fixes that.
>
> Joachim
>
> [1] There is of course a more technical explanation, but I'm not sure I
> understand enough of the issues to attempt to give it.


I normally have trouble with this when my pwd (printed in the prompt) gets
long when I am 5 levels down in a build file system. But right now I am
editing a 170 character command line 5 levels down in the buiild file system
and the combo is particularly aggravating. I just put the command line in
a script file for editing convenience. I am being plagued by ergoonometric
aggravations today, including problems with my vision. I need new glasses.
But the OS is working well.
--
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 08:10 AM
Christian Weisgerber
 
Posts: n/a
Default Re: ksh command line problem

dave <daf@amd.localhost.comcast.net> wrote:

> Is there any way to get ksh to display complete lines when running in a
> wide window instead of just printing pieces of the line?


ksh needs to be made aware that the window size has changed. Normally
xterm should send a SIGWINCH... but somehow this doesn't happen.
Hmm, something to look into.

You can manually tell ksh to pick up the new window size with
"kill -WINCH $$".

--
Christian "naddy" Weisgerber naddy@mips.inka.de
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 08:10 AM
dave
 
Posts: n/a
Default Re: ksh command line problem

Christian Weisgerber <naddy@mips.inka.de> wrote:
> dave <daf@amd.localhost.comcast.net> wrote:
>
>> Is there any way to get ksh to display complete lines when running in a
>> wide window instead of just printing pieces of the line?

>
> ksh needs to be made aware that the window size has changed. Normally
> xterm should send a SIGWINCH... but somehow this doesn't happen.
> Hmm, something to look into.
>
> You can manually tell ksh to pick up the new window size with
> "kill -WINCH $$".
>


That worked and is very handy. Thanks!
--
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-16-2008, 08:10 AM
Christian Weisgerber
 
Posts: n/a
Default Re: ksh command line problem

Christian Weisgerber <naddy@mips.inka.de> wrote:

> ksh needs to be made aware that the window size has changed. Normally
> xterm should send a SIGWINCH... but somehow this doesn't happen.
> Hmm, something to look into.


Now that I've looked, I see that I was mistaken. ksh *is* sent a
SIGWINCH. However, it won't take the new window width into account
until the input line after the current one...

> You can manually tell ksh to pick up the new window size with
> "kill -WINCH $$".


.... so just pressing return does the trick, too.

--
Christian "naddy" Weisgerber naddy@mips.inka.de
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-16-2008, 08:10 AM
dave
 
Posts: n/a
Default Re: ksh command line problem

Christian Weisgerber <naddy@mips.inka.de> wrote:
> Christian Weisgerber <naddy@mips.inka.de> wrote:
>
>> ksh needs to be made aware that the window size has changed. Normally
>> xterm should send a SIGWINCH... but somehow this doesn't happen.
>> Hmm, something to look into.

>
> Now that I've looked, I see that I was mistaken. ksh *is* sent a
> SIGWINCH. However, it won't take the new window width into account
> until the input line after the current one...
>
>> You can manually tell ksh to pick up the new window size with
>> "kill -WINCH $$".

>
> ... so just pressing return does the trick, too.


This did not work for me. I made konsole window as wude asmy screen
but ksh still printed only partial lines about half the width of
the screen. I think I will disable pwd in the prompt when pwd gets long.

--
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-16-2008, 08:10 AM
Christian Weisgerber
 
Posts: n/a
Default Re: ksh command line problem

dave <daf@amd.localhost.comcast.net> wrote:

> This did not work for me. I made konsole window as wude asmy screen
> but ksh still printed only partial lines about half the width of
> the screen. I think I will disable pwd in the prompt when pwd gets long.


Well, then konsole--you mean the KDE terminal emulator, right?--does
something wrong.

--
Christian "naddy" Weisgerber naddy@mips.inka.de
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:49 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com