Skip to content
/ snake Public

Simple command line utility for transforming input to different cases

Notifications You must be signed in to change notification settings

DanielDe/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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"

About

Simple command line utility for transforming input to different cases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages