https://github.com/danielde/snake
Simple command line utility for transforming input to different cases
https://github.com/danielde/snake
Last synced: over 1 year ago
JSON representation
Simple command line utility for transforming input to different cases
- Host: GitHub
- URL: https://github.com/danielde/snake
- Owner: DanielDe
- Created: 2020-02-18T04:26:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-18T04:51:52.000Z (over 6 years ago)
- Last Synced: 2025-02-15T18:49:37.815Z (over 1 year ago)
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# snake
A simple command line utility for transforming input with spaces to different cases:
```
$ snake add date of birth to users table
add_date_of_birth_to_users_table
$ snake --kebab add date of birth to users table
add-date-of-birth-to-users-table
$ snake --pascal add date of birth to users table
AddDateOfBirthToUsersTable
$ snake --camel add date of birth to users table
addDateOfBirthToUsersTable
```
## Installation
Put the `snake` file somewhere in your path, like in `/usr/bin/`.
I'm also working on getting this on Homebrew!
## Why?
Hitting the space bar is easier than typing an underscore. And this was easy to do.
This was my motivating use case:
```
rails g migration $(snake add date of birth to users table)
```
But I bet it'll be useful elsewhere too.
## Aliasas
I recommend creating some shell aliases for cases you use often:
```
alias kebab="snake --kebab"
alias camel="snake --camel"
alias pascal="snake --pascal"
```