Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Input a long line in bash cannot auto wrap
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Sun Aug 28, 2005 6:11 pm    Post subject: Input a long line in bash cannot auto wrap Reply with quote

enna,if i input a long line in bash,it shows in one line ,and put "<" ">" beside them.
such as:

bash-3.00.16 #: ACCEPT_KEYWORDS="~x86" USE="dvb tga dga xvmc fbcon divx4linux -gif -gtk -oss aac mx dvd" emerge mplayer "

the column is 80 and it shows like this:

bash-3.00.16 #: ACCEPT_KEYWORDS="~x86" USE="dvb tga dga xvmc fbcon >
I had to use Right key to go to see.

so i want to know how to make bash auto wrap the long input line to a newline if need.

how to set this?

shopt
cdable_vars off
cdspell off
checkhash off
checkwinsize on
cmdhist on
dotglob off
execfail off
expand_aliases on
extdebug off
extglob on
extquote on
failglob off
force_fignore on
gnu_errfmt off
histreedit off
histappend off
histverify off
hostcomplete off
huponexit off
interactive_comments on
lithist off
login_shell off
mailwarn off
no_empty_cmd_completion off
nocaseglob off
nullglob off
progcomp on
promptvars on
restricted_shell off
shift_verbose off
sourcepath on
xpg_echo off
_________________
Nothing for happy.
Back to top
View user's profile Send private message
ericcartman
n00b
n00b


Joined: 26 May 2004
Posts: 33
Location: Salzburg

PostPosted: Mon Aug 29, 2005 6:39 am    Post subject: Reply with quote

Quote:
horizontal-scroll-mode (Off)
When set to On, makes readline use a single line for display, scrolling the input horizontally on a single screen line when it becomes longer than the screen width rather than wrapping to a new line.


Took this from the manpage of bash. maybe this is what you're looking for?

greetz ericcartman
_________________
Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin, Historical Review of Pennsylvania 1759
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Tue Aug 30, 2005 6:14 am    Post subject: Reply with quote

the description is quite like my bash's action,
and i add "set "horizontal-scroll-mode off " to both /etc/inputrc ,~/.inputrc
but it seems use less,the problem still exist.
_________________
Nothing for happy.
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Thu Sep 01, 2005 6:47 pm    Post subject: Reply with quote

I have take three screenshot of my bash,charactors scroll in one line.
please help me.

http://baozhu.myopenweb.com/images/before.png
http://baozhu.myopenweb.com/images/after.png
http://baozhu.myopenweb.com/images/middle.png
_________________
Nothing for happy.


Last edited by keykeen on Thu Sep 01, 2005 7:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Sep 01, 2005 7:02 pm    Post subject: Reply with quote

What says:
Code:
echo $TERM
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Thu Sep 01, 2005 7:16 pm    Post subject: Reply with quote

Code:
susu:~$ echo $TERM
xterm


I use aterm ,and i set this in my .bashrc
Code:
export TERM=xterm

_________________
Nothing for happy.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Sep 01, 2005 10:34 pm    Post subject: Reply with quote

Try commenting that TERM setting out in your .bashrc.
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Fri Sep 02, 2005 10:14 am    Post subject: Reply with quote

hmm,i comment the export TERM=xterm in my .bashrc. it seems useless.

Well,what suprised me was ,the TERM under console was xterm,
and when I use startx to start xorg with fvwm,
the TERM shows in aterm was kterm

I even donnot know how comes the kterm,
with kterm,I had to live without colors,only left black and white.
so i set export TERM=xterm in my .bashrc.
text scroll in one line in both this two situation.

but the problem seems too puzzle ,i have no idea to solove it.
_________________
Nothing for happy.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Sep 02, 2005 12:10 pm    Post subject: Reply with quote

kterm is not in /etc/DIR_COLORS or dircolors, so no colors.
aterm is based on rxvt, so TERM should be rxvt?
I do no think the problem is with bash, but with TERM.
What happens when TERM is set to xterm and you start an xterm?
What about
Code:
find /etc/terminfo -name "kterm"
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Fri Sep 02, 2005 5:19 pm    Post subject: Reply with quote

Code:
find /etc/terminfo -name "kterm" 
shows nothing.

enna,while TERM sets to "xterm",
all the terminal such as xterm,aterm,mrxvt have the same circs:
text scroll in one line.

if set TERM to "rxvt" ,the same as above..
_________________
Nothing for happy.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Sep 02, 2005 6:35 pm    Post subject: Reply with quote

You have kterm installed? Does he wrap lines?
Can you find where TERM is being set to kterm? Perhaps somewhere in /etc.
Was ncurses emerged as minimal?
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Sun Sep 04, 2005 10:50 am    Post subject: Reply with quote

hmm,I havenot install kterm yet.
eix kterm
Code:
* x11-terms/kterm
     Available versions:  6.2.0-r2 6.2.0-r3
     Installed:           no
     Homepage:            http://www.asahi-net.or.jp/~hc3j-tkg/kterm/
     Description:         Japanese Kanji X Terminal


I use
grep "kterm" /etc -R
only get this:
/etc/apache/lib/portage/output.py: legal_terms = ["xterm","Eterm","aterm","rxvt","screen","kterm","rxvt-unicode"]

Code:
root:~# emerge ncurses -pv                                                     

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] sys-libs/ncurses-5.4-r6  -bootstrap -build* -debug -doc +gpm* -minimal -nocxx -unicode 0 kB

Total size of downloads: 0 kB

_________________
Nothing for happy.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Thu Sep 08, 2005 4:03 pm    Post subject: Reply with quote

I can come close to replicating the behavior by setting TERM=dumb.
With that the comand is all on one line, but the line scrolls off to the left, instead of to the right, as for you.

I do not understand why aterm would want to use kterm settings. Have you ever done anything with kanji?
Have you always have this behavior?

Have you tried re-emerging aterm?
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Thu Sep 08, 2005 9:21 pm    Post subject: Reply with quote

I have a similar problem on my other box. It's a fresh install and not only this behaviour, but the input prompt actually returns to the begining of the line when $COLS is reached. Then it just overwrites what you typed earlier. That's how it looks, it's actually still working on the end of the line.
This happens in vts too. :evil: :?:
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Fri Sep 09, 2005 1:58 pm    Post subject: Reply with quote

I emerged aterm and bash many times.hmm,And both happend also on xterm,rxvt,urxvt.....

Code:
susu:~$ aterm -version                                                         
aterm version 0.4.2 from 06 September 01
(background image,XPM,menubar,line space,Kanji+XIM,Thai,transparency,fading,NeXT scrollbar,XGetDefaults)

aa
Code:

susu:~$ bash -version                                                         
GNU bash, version 3.00.16(1)-release (i686-pc-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

_________________
Nothing for happy.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Sep 09, 2005 3:04 pm    Post subject: Reply with quote

That explains TERM=kterm:
Quote:
(aterm version 0.4.2 from 06 September 01
background image,XPM,menubar,line space,Kanji+XIM,Thai,transparency,fading,NeXT
scrollbar,XGetDefaults)

aterm was emerged with USE=cjk.
Here may be the problem:
Quote:
Calculating dependencies ...done!
[ebuild R ] sys-libs/ncurses-5.4-r6 -bootstrap -build* -debug -doc +gpm* -minimal -nocxx -unicode 0 kB

It says ncurses was last emerged with build:
Quote:
- - build : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.

and without unicode.

Suggest you enable unicode support and re-emerge ncurses.
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Fri Sep 09, 2005 3:13 pm    Post subject: Reply with quote

NOOP, mine are compiled with unicode support and without the build useflag.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Fri Sep 09, 2005 4:57 pm    Post subject: Reply with quote

lynxnyl:
What says your
Code:
echo $TERM
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Fri Sep 09, 2005 5:08 pm    Post subject: Reply with quote

xterm in the konsole (this may be fixed some time, I think I've read about it in the gwn) and linux in the vts. Nothing unusual here.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Sun Sep 11, 2005 2:12 pm    Post subject: Reply with quote

lynxnyl:
By
Quote:
$COLS
do you mean $COLUMNS?
The behavior can be caused where columns for the device is less than $COLUMNS.
If that is the case
Code:
resize

should sync them.
Back to top
View user's profile Send private message
lynxnyl
Apprentice
Apprentice


Joined: 15 Aug 2004
Posts: 253
Location: Ljubljana, Slovenija

PostPosted: Sun Sep 11, 2005 2:59 pm    Post subject: Reply with quote

Maybe it does, but it doesn't fix my problem. :(

I used genkernel on that machine, maybe it has some bad options set - will see once I recompile it.
Back to top
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Sun Sep 11, 2005 6:34 pm    Post subject: Reply with quote

lynxnyl:
No, of course not, it tells something more about your problem.
Back to top
View user's profile Send private message
keykeen
n00b
n00b


Joined: 31 Jan 2005
Posts: 44
Location: Athena

PostPosted: Mon Sep 12, 2005 7:56 pm    Post subject: Reply with quote

hmm,I re-emerge nucrses with USE="-build unicode"
but the stat keep go on.
_________________
Nothing for happy.
Back to top
View user's profile Send private message
rek2
Guru
Guru


Joined: 05 Jan 2003
Posts: 477
Location: Boston USA/Barcelona Spain

PostPosted: Tue Sep 13, 2005 5:57 pm    Post subject: We are experiencing the same problem Reply with quote

only in new instalations... for some reason is not working right.
I have a user that notes it today and after searching google nothing came up, finally this threat pop up,
hopefully we get a fix ASAP.

Cheers.
_________________
http://www.dailyradical.org
http://www.binaryfreedom.info
use jabber!!! sing on now, register an account:
http://jabber.binaryfreedom.info
Back to top
View user's profile Send private message
rek2
Guru
Guru


Joined: 05 Jan 2003
Posts: 477
Location: Boston USA/Barcelona Spain

PostPosted: Tue Sep 13, 2005 6:41 pm    Post subject: ok is working now Reply with quote

ok seens that is already patch, re emerge..
_________________
http://www.dailyradical.org
http://www.binaryfreedom.info
use jabber!!! sing on now, register an account:
http://jabber.binaryfreedom.info
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum