|
Bugzilla – Full Text Bug Listing |
| Summary: | tcsh / coreutils ls time format changed or wrong | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Volker Kuhlmann <bugz57> |
| Component: | Basesystem | Assignee: | E-mail List <bnc-team-screening> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P4 - Low | CC: | bugz57, markgray+to-suse, pth |
| Version: | Factory | ||
| Target Milestone: | RC 1 | ||
| Hardware: | Other | ||
| OS: | openSUSE 11.4 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Volker Kuhlmann
2011-05-24 10:28:10 UTC
This effects the gnu-emacs dired display as well, and since I have gotten quite used to the benefits of long-iso over the years I find the change to the absurd posix date display to be most unwelcome. The reason is that the coreutils don't know LS_OPTIONS. This is set by /etc/profile.d/ls.{bash|tcsh} and then used in the aliases for ls. So to have changes to LS_OPTIONS be applied you need to either login anew or source one of those files.
For the next version of openSUSE it might be a good idea to define the alias as
alias='ls $LS_OPTIONS'
then changes to LS_OPTIONS would immediately be effective. What do you think?
Thanks Philip. If that's the reason dunno how I missed that. Sure nothing has changed in the coreutils package between May and now, other than the default format for ls? I ended up setting TIME_STYLE instead.
Your suggestion is good, there is not much point in having LS_OPTIONS if it isn't evaluated once the shell has started up. I use something like this
alias d 'ls -lF $LS_OPTIONS \!*'
With bash I found that aliases are not really useful, but functions do the same thing well:
d() { ls -lF $LS_OPTIONS "$@"; }
I would not alias ls itself, but do this with the dir, ll, l etc. that's always been in the shell rc files.
That's what ls.bash has now:
case "$is" in
bash) alias ls='ls $LS_OPTIONS' ;;
zsh) alias ls='\ls $=LS_OPTIONS' ;;
*) alias ls='/bin/ls $LS_OPTIONS' ;;
esac
alias dir='ls -l'
alias ll='ls -l'
alias la='ls -la'
alias l='ls -alF'
alias ls-l='ls -l'
I'll turn those into functions. ANd as this is something for 12.1 I'm moving the bug there.
OK, the alias for ls can't be changed to a shell function as you'll then get recursion. I have changed the others so. BTW, as you see, the alias for ls is ls='ls $LS_OPTIONS', so LS_OPTIONS are evaluated every time you call ls or one of its other aliases. |