diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-03 11:03:39 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-03 11:03:39 -0200 |
commit | 6c62a1906b59e4ab8eb3475ebfe3c3b7cfa67f0b (patch) | |
tree | ee989361e1451ed2980270d8fb70c0ed4bd3dda7 /lib/keyringer/actions/tree | |
parent | 5f0fb30328d9b37ee53aafd65690a1ee90ea6799 (diff) | |
parent | 7fca7cd0433e6f97080ecf12bee64ec4f38948ba (diff) | |
download | keyringer-6c62a1906b59e4ab8eb3475ebfe3c3b7cfa67f0b.tar.gz keyringer-6c62a1906b59e4ab8eb3475ebfe3c3b7cfa67f0b.tar.bz2 |
New upstream version 0.5.2upstream_keyringer_0.5.2
Diffstat (limited to 'lib/keyringer/actions/tree')
-rwxr-xr-x | lib/keyringer/actions/tree | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/keyringer/actions/tree b/lib/keyringer/actions/tree index 7bf173d..a877548 100755 --- a/lib/keyringer/actions/tree +++ b/lib/keyringer/actions/tree @@ -5,7 +5,7 @@ # Thanks http://www.centerkey.com/tree/ function keyringer_tree { - ls -R $* | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' + find $* | sed -e 's/[^-][^\/]*\//| /g' | sed -r -e 's/\| ([^|])/|- \1/' } # Load functions @@ -19,6 +19,11 @@ CWD="`pwd`" shift ARGS="`echo "$*" | sed -e "s|^/*||"`" +# on *BSD, find expects at least one argument with the path +if [ "$ARGS" == "" ]; then + ARGS="./" +fi + # Check implementation if which tree &> /dev/null; then TREE="tree" |