Create from a template instead of a new file
$ npm install --global touch-alt
$ touch-alt --help
Create from a template instead of a new file
Usage
$ touch-alt <source>
$ touch-alt --add <source>
Options
-a, --add Create new template file
-o, --overwrite Overwrite by template
Example
$ touch-alt .editorconfig
$ cat .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
$ touch-alt --add .editorconfig
# Use touch
$ touch .editorconfig
$ cat .editorconfig
$ rm .editorconfig
# Use touch-alt
$ touch-alt .editorconfig
$ cat .editorconfig
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
Add alias touch=touch-alt
to your .zshrc/.bashrc to reduce typing & create file easily.
Default: ~/.touch-alt
$ ls ~/.touch-alt
ISSUE_TEMPLATE.md index.js readme.md
Thanks goes to these wonderful people (emoji key):
akameco 💻 📖 |
ryota-murakami� 🚇 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
MIT © akameco