3 ms·
rails g migration add_foo_to_bar vi db/migrate/*!$* or bundle exec !! or rake db:migrate RAILS_ENV=test !!
by pjungwir 13y ago
rails g migration add_foo_to_bar
vi db/migrate/*!$*
or
bundle exec !!
or
rake db:migrate
RAILS_ENV=test !!
- pestaa 13y agoIt's shell syntax. !! is replaced by the whole previous command, !$ is replaced by the last argument in the previous command. There are tons of others, but these two I use the most. Feels great to yell sudo !!.