[issue1351] etc/zsh/zshrc: make sll() do actually s.th. usefull
Michael Prokop
bts at bts.grml.org
Mon May 18 13:15:42 CEST 2015
Michael Prokop <mika at grml.org> added the comment:
* Thilo Six wrote in grml's BTS on 20150517 / 17:01:
> looking at sll() in etc/zsh/zshrc i think two lines should be swapped to
> actually do s.th. useful in that function.
> Excuse me if i miss s.th. obvious.
> Attached patch fixes this.
I think the present logic is fine:
| % sll =java
| lrwxrwxrwx 1 root root 22 Nov 28 2013 /usr/bin/java -> /etc/alternatives/java
| lrwxrwxrwx 1 root root 46 Nov 28 2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
So /usr/bin/java is my java binary in $PATH, pointing to
/etc/alternatives/java which itself points to
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java.
With your patch we would get:
| % sll =java
| lrwxrwxrwx 1 root root 46 Nov 28 2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
| -rwxr-xr-x 1 root root 6368 Apr 26 15:48 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
... which dereferences the files before listing them, so the
output is incomplete because of the missing /usr/bin/java ->
/etc/alternatives/java connection.
What we might want do though is actually adding a full listing of
the resulting target file, so being
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java in the above example
- maybe that's the point you're trying to address? So what might be
interesting to get is:
| % sll =java
| lrwxrwxrwx 1 root root 22 Nov 28 2013 /usr/bin/java -> /etc/alternatives/java
| lrwxrwxrwx 1 root root 46 Nov 28 2013 /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
| -rwxr-xr-x 1 root root 6368 Apr 26 15:48 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
I'd definitely appreciate and welcome a patch which implements that.
regards,
-mika-
----------
files: 0001-etc_zsh_zshrc-fix-func-sll.patch
messages: 4955, 4956, 4957
nosy: Xk2c
status: chatting
title: etc/zsh/zshrc: make sll() do actually s.th. usefull
_____________________________________
GRML issue tracker <bts at bts.grml.org>
<http://bts.grml.org/grml/issue1351>
_____________________________________
More information about the Bugs-changes
mailing list