~eli_oat/moon-maker

133f3cac5301f069696c82ef0b847d6d9009b9ea — eli-oat 1 year, 4 months ago a2b3112
*
1 files changed, 10 insertions(+), 8 deletions(-)

M mm
M mm => mm +10 -8
@@ 67,19 67,21 @@ delete-moons-by-planet () {

open-moons () {
    if [[ -d ".moons" ]]; then
        for file in .moons/$1; do
            echo -e "$file"
            $EDITOR "$file"
        done
        $EDITOR "$1" .moons/"$1".*
        # for file in .moons/$1; do
        #     echo -e "$file"
        #     $EDITOR "$file"
        # done
    else
        path=$(pwd)
        while [ -n "$path" ]; do
            path=${path%/*}
            if [ -d "$path/.moons" ]; then
                for file in $path/.moons/$1; do
                    echo -e "$file"
                    $EDITOR "$file"
                done
                $EDITOR "$1" "$path/.moons/$1"*
                # for file in $path/.moons/$1; do
                #     echo -e "$file"
                #     $EDITOR "$file"
                # done
                return
            fi
        done