all repos — dotfiles-base @ 51e366dd6001a49634fbf384abd7bba8b800d747

base important configs that can safely be used almost anywhere

.config/fish/functions/touch-script.fish

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
function touch-script --description 'Creates an executable shell script boilerplate file'
    if test (count $argv) -eq 0
        echo "usage: $argv[0] [path(s) to one or more script file(s) to init...]"
        return 1
    end

    for file in $argv
        printf \
            "#!/bin/sh\n\n# script body here...\n" > $file \
        > $file
        chmod +x $file
    end
end