Reputation: 2495
Is there any way to add alembic commands to the bash so that the alembic command autocomplete works like git?
For example, in Quick Tip: Autocomplete Git Commands and Branch Names in Bash the author shows how to add git commands to .bash_profile
how can we achieve the same thing for alembic?
Upvotes: 5
Views: 353
Reputation: 11
I tried to write a bash autocompletion script for alembic: https://gist.github.com/soyo42/65aa0b4d47c76bfb1e069d8989dd5ace
It is based on alembic-1.6.5.
The only advanced feature by now is fetching history to provide --tag
values for upgrade/downgrade.
Feel free to use, comment or modify. Good luck.
Upvotes: 1