Bug 146242
Summary: | piping ls command into less shows weird line controls | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Joachim Backes <joachim.backes> |
Component: | less | Assignee: | Jindrich Novy <jnovy> |
Status: | CLOSED NOTABUG | QA Contact: | Mike McLean <mikem> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3 | CC: | jnovy, pknirsch |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-07-04 13:53:00 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Joachim Backes
2005-01-26 12:13:22 UTC
This works for me with less-382-4 in gnome-terminal. This looks like you terminal refuses to interpret escape sequences properly. Which one do you use? On the console, I have TERM=linux-c. gnome-terminal is started in a gnome session, and inside gnome-terminal, I have TERM=xterm, and the other settings in gnome-terminal are: BASH=/bin/bash BASH_ARGC=() BASH_ARGV=() BASH_ENV=/usr/people/backes/.bashrc BASH_LINENO=() BASH_SOURCE=() BASH_VERSINFO=([0]="3" [1]="00" [2]="14" [3]="1" [4]="release" [5]="i386-redhat- linux-gnu") BASH_VERSION='3.00.14(1)-release' COLORTERM=gnome-terminal COLUMNS=80 DIRSTACK=() DISPLAY=:0.0 EUID=1001 GNOME_DESKTOP_SESSION_ID=Default GNOME_KEYRING_SOCKET=/tmp/keyring-EJMYGr/socket GROUPS=() GS_LIB=/usr/share/fonts/default/Type1 GTK_RC_FILES=/etc/gtk/gtkrc:/usr/people/backes/.gtkrc-1.2-gnome2 G_BROKEN_FILENAMES=1 HISTFILE=/usr/people/backes/.bash_history HISTFILESIZE=1000 HISTSIZE=1000 HOME=/usr/people/backes HOSTNAME=sunny.rhrk.uni-kl.de HOSTTYPE=i386 IFS=$' \t\n' INPUTRC=/etc/inputrc KDEDIR=/opt/kde LANG=en LC_ALL=C LESSCHARSET=latin1 LESSOPEN='|/usr/bin/lesspipe.sh %s' LINES=24 LINGUAS=en LOGNAME=backes LS_COLORS= MACHTYPE=i386-redhat-linux-gnu MAIL=/var/spool/mail/backes MAILCHECK=60 MANPATH=/usr/man:/usr/share/man:/usr/local/man:/usr/X11R6/man:/usr/local/share/m an:/opt/schily/man MM_CHARSET=ISO-8859-1 OPTERR=1 OPTIND=1 OSTYPE=linux-gnu PATH=/usr/kerberos/bin:/opt/schily/bin:/bin:/usr/bin:/usr/local/bin:/bin:/usr/bi n:/usr/X11R6/bin:/usr/adsm:/opt/kde/bin:/sbin:/usr/sbin:/usr/rhrk::/usr/local/Ac robat5/bin:/usr/local/jdk1.2.2/bin:/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm /client/admin/bin:/usr/local/matlab-14sp1/bin:/usr/local/netscape:/usr/bin/mh:/u sr/people/backes/bin:/usr/people/backes/scripts:/usr/people/backes/scripts/Login :/usr/people/backes/cxoffice/bin PIPESTATUS=([0]="0") PPID=11644 PS1='\[\033[7m\]\u@\h\[\033[m\] [\W]: ' PS2='> ' PS4='+ ' PWD=/usr/people/backes QTDIR=/usr/lib/qt-3.3 SESSION_MANAGER=local/sunny.rhrk.uni-kl.de:/tmp/.ICE-unix/4982 SHELL=/bin/bash SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:moni tor SHLVL=4 TAPE=/dev/nst0 TERM=xterm UID=1001 USER=backes USERNAME= WINDOWID=18888633 XAUTHORITY=/usr/people/backes/.Xauthority _=xterm font=-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1 iconFont=-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1 menuFont=-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1 terminalFont=-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1 Suggest setting LESSCHARSET=utf-8. Do you see display problems with LESSCHARSET=latin1? Is the issue present for either console or gnome-terminal? setting LESSCHARSET=utf-8 does not help. Setting LESSCHARSET=latin1 does not help too. The issue is present for both console and gnome-terminal (and xterm too) I have no clue where the problem is. Ray could you help? Hi Jindrich, To reproduce this problem run: ls -l --color | less (the reporter may have an alias setup, i'm not sure) So it seems less is filtering out the escape sequences and printing out what they are. According to the less man page -R prevents this from happening. Indeed, ls -l --color | less -R seems to work fine. It's possible that less used to default to -R but now doesn't or our configuration of less changed between FC2 and FC3. I don't know. You might want to verify that the behavior changed between FC2 and FC3, look through the changes between FC2 and FC3 in the spec file and the upstream changelog to see if any defaults changed and if so why, and change back the behavior if it was changed and there wasn't a good reason for it being changed. Hi, indeed my ls is an alias: alias ls alias ls='ls --color ' Now, \ls -l |less is running correctly, and ls -l|less -R too. I see from the FC2/FC3 specs that the upstream version hasn't changed and the packages are identical for both the versions. Please add alias less='less -R'. This is a specific configuration problem and doesn't affect FC3 users. |