4.3.beta001 ls -F bug, alias.rc and .zsh/colors

You can report problems, make suggestions, about the new BETA versions in this forum. For stuff related to final releases, please post a message in other forums
vanepp
Posts: 85
Joined: 22 Jun 2012, 02:24

4.3.beta001 ls -F bug, alias.rc and .zsh/colors

Postby vanepp » 08 Sep 2014, 04:19

ls -F bug, alias.rc and .zsh/colors

Reproduce:

boot 4.3.beta001 and startx (should work the same in console)

do an ls and note icons and jwm lack a trailing / (i.e. jwm/) and
winmgr.sh lacks a trailing * (i.e. winmgr.sh*) which the ls -F flag
set in /root/.zsh/colors is supposed to do.

Fix:

Comment out OPTIONS -F -T 0 in the .zsh/colors file and move (at least the
-T 0 part) to /root.zsh.rc.alias.rc to maintain current behaviour would be
my preferred solution. If you set the -F flag the expected "/" and "*"
markers show up on the file names. However as all files on a ntfs volume
mounted with ntfs-3g are executable I find the -F flag to be less useful
than coloring the files and chose to leave it off in the alias.rc. As well
I added the -T 0 and --color=auto flags to the other two ls (ll and l)
aliases in the file so all three are consistant in display.
It looks like this is actually a zsh bug, the colors file both doesn't
work (as -F isn't working) and blocks -F from being set in alias.rc but
this is an easy fix.
The patch below also corrects another problem which is that zsh is
brain dead and has reproduced the .dir_colors file in /.zsh/colors, but
the two files are out of sync. A bunch of things that are in DIR_COLORS
(both color settings and terminal types) aren't in .zsh/colors but at some
point zsh has read (or inherited) the DIR_COLORS settings so they are in
effect but it isn't obvious how to change them in the colors file. The
patch updates the colors file to have all the same settings as the
/etc/DIR_COLORS file so at least all the settings that are being used are
in the colors files if you want to change them (you would have to remember
to backport changes to /etc/DIR_COLORS if you want them to work on the other
shells though) . ..

alias.rc.dif

*** /mnt/custom/customcd/files/root/.zsh/rc/alias.rc.orig 2014-09-02 15:55:44.000000000 +0000
--- /mnt/custom/customcd/files/root/.zsh/rc/alias.rc 2014-09-07 18:00:56.000000000 +0000
***************
*** 1,9 ****
alias mydf="df -hPT | column -t"
! alias ll="ls -lah"
alias rm="rm -i"
alias cp="cp -i"
! alias ls="ls --color=auto"
! alias l="ls -ail"
alias cl="clear"

alias reboot="shutdown -r now"
--- 1,9 ----
alias mydf="df -hPT | column -t"
! alias ll="ls -lahT 0 --color=auto"
alias rm="rm -i"
alias cp="cp -i"
! alias ls="ls -T 0 --color=auto"
! alias l="ls -ailT 0 --color=auto"
alias cl="clear"

alias reboot="shutdown -r now"

colors.dif

*** /mnt/custom/customcd/files/root/.zsh/colors.orig 2014-09-02 15:55:32.000000000 +0000
--- /mnt/custom/customcd/files/root/.zsh/colors 2014-09-07 16:13:19.000000000 +0000
***************
*** 4,15 ****
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
! OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
! TERM linux
! TERM screen
! TERM console
TERM con132x25
TERM con132x30
TERM con132x43
--- 4,24 ----
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
! #
! # Commented out as in combination with an alias.rc file that sets ls options
! # this stops working and can't be set in alias.rc so move it to alias.rc
! #
! # OPTIONS -F -T 0

# Below, there should be one TERM entry for each termtype that is colorizable
!
! # (updated to match contents and order from dircolors -p which is the
! # identical information but in a different file (which invisibly sets any
! # value not set here, brain dead and a maintance nightmare!).
!
! TERM Eterm
! TERM ansi # imported from dircolors
! TERM color-xterm # imported from dircolors
TERM con132x25
TERM con132x30
TERM con132x43
***************
*** 20,29 ****
TERM con80x43
TERM con80x50
TERM con80x60
! TERM xterm
TERM rxvt
TERM vt100
! TERM Eterm

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
--- 29,75 ----
TERM con80x43
TERM con80x50
TERM con80x60
! TERM cons25 # imported from dircolors
! TERM cygwin # imported from dircolors
! TERM console
! TERM cygwin # imported from dircolors
! TERM dtterm # imported from dircolors
! TERM eterm-color # imported from dircolors
! TERM gnome # imported from dircolors
! TERM gnome-256color # imported from dircolors
! TERM jfbterm # imported from dircolors
! TERM konsole # imported from dircolors
! TERM kterm # imported from dircolors
! TERM linux
! TERM linux-c # imported from dircolors
! TERM mach-color # imported from dircolors
! TERM mlterm # imported from dircolors
! TERM putty # imported from dircolors
TERM rxvt
+ TERM rxvt-256color # imported from dircolors
+ TERM rxvt-cygwin # imported from dircolors
+ TERM rxvt-cygwin-native # imported from dircolors
+ TERM rxvt-unicode # imported from dircolors
+ TERM rxvt-unicode-256color # imported from dircolors
+ TERM rxvt-unicode256 # imported from dircolors
+ TERM screen
+ TERM screen-256color # imported from dircolors
+ TERM screen-256color-bce # imported from dircolors
+ TERM screen-bce # imported from dircolors
+ TERM screen-w # imported from dircolors
+ TERM screen.Eterm # imported from dircolors
+ TERM screen.rxvt # imported from dircolors
+ TERM screen.linux # imported from dircolors
+ TERM st # imported from dircolors
+ TERM st-256color # imported from dircolors
+ TERM terminator # imported from dircolors
TERM vt100
! TERM xterm
! TERM xterm-16color # imported from dircolors
! TERM xterm-256color # imported from dircolors
! TERM xterm-88color # imported from dircolors
! TERM xterm-color # imported from dircolors
! TERM xterm-debian # imported from dircolors

# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
***************
*** 36,52 ****
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
! LINK 01;35 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
!
! # This is for files with execute permission:
! EXEC 01;32

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
--- 82,110 ----
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
+ #
+
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
+ RESET 00 # reset to "normal" colors (imported from dircolors)
DIR 01;34 # directory
! LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
! # numerical value, the color is as for the file pointed to.)
! MULTIHARDLINK 00 # regular file with more than one link (imported from dircolors)
FIFO 40;33 # pipe
SOCK 01;35 # socket
+ DOOR 01;35 # door (imported from dircolors)
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
! ORPHAN 01;05;37;41 # orphaned syminks (imported from dircolors note blink doesn't work!)
! MISSING 01;05;37;41 # ... and the files they point to (imported from dircolors note blink doesn't work!)
! SETUID 37;41 # file that is setuid (u+s) (imported from dircolors)
! SETGID 30;43 # file that is setgid (g+s) (imported from dircolors)
! CAPABILITY 30;41 # file with capability (imported from dircolors)
! STICKY_OTHER_WRITABLE 30;42 # dir that is sticky and other-writable (+t,o+w) (imported from dircolors)
! OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky (imported from dircolors)
! STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable (imported from dircolors)
! EXEC 01;32 # This is for files with execute permission:

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.

Hope this is helpful.

Peter Van Epp

Return to “Beta versions (report a bug found in a beta)”

Who is online

Users browsing this forum: No registered users and 1 guest