Script to manage skeleton files/directories using little more than a simple filesystem.
wget https://raw.githubusercontent.com/edemko/skel/master/skel.sh -O ~/bin/skel
Skeleton files/folders are stored in ${XDG_CONFIG_HOME:-$HOME/.config}/skel
.
The first level of directories in this folder are called "packages".
All the files and folders under a package are valid templates.
The skel
program takes a command, one of list
, mk
, or read
.
Run skel --help
for a full listing of the commands and their options/arguments.
Both file contents and file names can be have template holes. A template hole takes one of two forms:
@@@
varname@@@
: where the varname can be any non-empty sequence of characters i nA-Z0-9_
.@@@
varname=$(
bash command)@@@
: the default value is generated by the bash command (e.g.date +'%Y'
).
For security, shell commands are not executed until the user submits an empty line in response to a prompt.