all repos — scriptura @ 2ad533210f375712ba2e16104c2bf49b9096e9e0

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