dotfiles/scripts/new

13 lines
290 B
Plaintext
Raw Permalink Normal View History

2022-04-14 21:26:15 +02:00
#!/usr/bin/env bash
TEMPLATE_DIR="$HOME/Templates/src"
src=`ls "$TEMPLATE_DIR" | fzf --preview="$HOME/.dots/scripts/template_preview $TEMPLATE_DIR/{}"`
if [ -n "$src" ]; then
read -p "File name: " name
if [ -n "$name" ]; then
cp "$TEMPLATE_DIR/$src" "$name" -r
fi
fi