all repos — scriptura @ 1ec690340ff66e93e6a54be54fc2f0f3bc3c239b

a corner in $HOME for your scripts

functions/__scriptura_new.fish (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function __scriptura_new --argument-names target
    if not path is --type dir (path dirname $target)
        mkdir -p $target
    end

    if path is --type file $target
        echo "Error: $target already exists"
        return 1
    end

    printf "%s\n\n" "#!/usr/bin/env fish" >$target
    chmod +x $target

    __scriptura_edit $target
end