[issue1351] etc/zsh/zshrc: make sll() do actually s.th. usefull
Thilo Six
bts at bts.grml.org
Mon May 18 19:35:33 CEST 2015
Thilo Six <tech at xk2c.de> added the comment:
Michael Prokop schrieb/wrote:
-- <snip> --
>> 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
ahh ok. I have not been aware of this = thing.
I tried like this:
% l
total 0
-rw------- 1 user user 0 19:23 18.05.2015 file
lrwxrwxrwx 1 user user 4 19:24 18.05.2015 lnk1 -> file
% sll lnk1
lrwxrwxrwx 1 user user 4 Mai 18 19:24 lnk1 -> file
Which gave me nothing more usefull over ls -l. But as i understand its purpose
is to do a $path lookup first, which in turn is neat.
> 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.
I look into this. And also in updating its comment and usage hint.
Thanks!
kind regards,
Thilo
----------
files: 0001-etc_zsh_zshrc-fix-func-sll.patch
messages: 4955, 4956, 4957, 4958
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