Skip to content

akameco/touch-alt

Repository files navigation

touch-alt

Build Status All Contributors

Create from a template instead of a new file

Install

$ npm install --global touch-alt

Demo

demo

Usage

$ 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

Example

Add new template file

$ 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

Usage

# 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

Tip

Add alias touch=touch-alt to your .zshrc/.bashrc to reduce typing & create file easily.

Config

Default: ~/.touch-alt

$ ls ~/.touch-alt
ISSUE_TEMPLATE.md        index.js                 readme.md

Contributors

Thanks goes to these wonderful people (emoji key):


akameco

💻 📖 ⚠️ 🚇

ryota-murakami�

🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco