~eli_oat/moon-maker

bd66ac2da46d9374443de8f32aa49333af3c1793 — eli_oat 1 year, 4 months ago 38af855
better listing
1 files changed, 4 insertions(+), 2 deletions(-)

M mm
M mm => mm +4 -2
@@ 83,13 83,15 @@ open-moons () {

list-moons-by-planet () {
    if [[ -d ".moons" ]]; then
        ls -a .moons/"$1"*
        LIST=$(ls -a .moons/"$1"*)
        echo -e "${LIST##*/}"
    else
        path=$(pwd)
        while [ -n "$path" ]; do
            path=${path%/*}
            if [ -d "$path/.moons" ]; then
                ls -a "$path/.moons/$1"*
                LIST=$(ls -a "$path/.moons/$1"*)
                echo -e "${LIST##*/}"
                return
            fi
        done