Skip to content

Instantly share code, notes, and snippets.

@borjadotai
Last active March 21, 2018 15:30
Show Gist options
  • Save borjadotai/9f86764227a414254c9ead5c980b5c84 to your computer and use it in GitHub Desktop.
Save borjadotai/9f86764227a414254c9ead5c980b5c84 to your computer and use it in GitHub Desktop.
ZIM config - medium article
setopt EXTENDED_GLOB
for template_file ( ${ZDOTDIR:-${HOME}}/.zim/templates/* ); do
user_file="${ZDOTDIR:-${HOME}}/.${template_file:t}"
touch ${user_file}
( print -rn "$(<${template_file})$(<${user_file})" >! ${user_file} ) 2>/dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment