[issue1351] etc/zsh/zshrc: make sll() do actually s.th. usefull

Frank Terbeck bts at bts.grml.org
Sun May 24 11:29:31 CEST 2015


Frank Terbeck <ft at grml.org> added the comment:

Hi,

Mika highlighted this to me for review. So here goes:

-#f1# List symlinks in detail (more detailed version of 'readlink -f' and
'whence -s')
+#f1# List symlinks in detail (more detailed version of 'readlink -f', 'whence
-s' and 'namei -l')
+#
+# Usage:
+#
[...]

The #f1# line needs to be located directly above the "sll() {" line, because
the reference-chart generation script takes a look at the line below to
determine the name of the function that is documented.

 sll() {
-    [[ -z "$1" ]] && printf 'Usage: %s <file(s)>\n' "$0" && return 1
-    local file
-    for file in "$@" ; do
+    if [[ -z ${1} ]]
+    then

I'd like this to be

    if ...; then

for consistency with most of the existing code.

[...]
+    local curdir="${PWD}"
+    declare -i RTN LINODE i
+    declare -a SEENINODES

Also for consistency, "local -i RTN ..." and "local -a SEENINODES" here.

[...]
+                LINODE=$(zstat -L +inode "${file}")
+                for i in ${SEENINODES}
+                do

Also for consistency

    for i in ...; do


Other than that, this looks good to me.

Thanks for your work!


Regards, Frank

----------
files: 0001-modified-sll-to-among-others-detect-symlink-loops-an.patch, test.sh
messages: 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4969, 4970
nosy: Xk2c
priority: feature
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