Skip to content

Commit

Permalink
Follow symlinks properly
Browse files Browse the repository at this point in the history
  • Loading branch information
newbthenewbd committed Aug 8, 2022
1 parent 0c641e0 commit 7d9e29e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ prints the file with **cat**.

If an argument evaluates to a directory, **cod** prints the path to the
directory, then prints the names of its contents, as well as some other useful
stuff - using **ls -Al**, because it's better than **dir**, and because fish
stuff - using **ls -AlH**, because it's better than **dir**, and because fish
aluminum poisoning is a problem, maybe much smaller than many other problems,
but one nevertheless.

If there are no arguments, **cod** prints the path to the current directory and
runs **ls -Al** in it.
runs **ls -AlH** in it.

**cod** is intended for humans, and not further scripts. Get your scripts
together, it's not that hard.
Expand Down
4 changes: 2 additions & 2 deletions cod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [ "$#" = 0 ]; then
if ! [ "${COD_NONAME}" = 1 ]; then
echo "$(pwd):"
fi
ls -Al
ls -AlH
fi
for arg in "$@"; do
if [ -f "${arg}" ]; then
Expand All @@ -38,6 +38,6 @@ for arg in "$@"; do
if ! [ "${COD_NONAME}" = 1 ]; then
echo "${arg}:"
fi
ls -Al -- "${arg}"
ls -AlH -- "${arg}"
fi
done

0 comments on commit 7d9e29e

Please sign in to comment.