loading...

SHORTCUT FOR RUNNING COMMANDS: “python manage.py runserver” and “source ./venv/bin/activate”

yobretyo profile image Bret ・1 min read

What is a keyboard shortcut to enter in a line of code into terminal? Instead of typing out the commands to start my env and server?

Discussion

pic
Editor guide
Collapse
ylhn15 profile image
ylhn15

You could write an alias in the shell configuration of your choice like this:
alias runserver='python manage.py runserver'
Then you can start your server by typing runserver.

Collapse
yobretyo profile image
Bret Author

I made “tasks” in VSCode, it works really well instead of 2 times a code, just 4 presses and it works

Collapse
ylhn15 profile image
ylhn15

That's a good idea, better than aliases if you use VSCode.

Thread Thread
yobretyo profile image
Bret Author

What makes it better than a alias?

Thread Thread
ylhn15 profile image
ylhn15

I'd say it keeps the development "local" inside VSCode and doesn't clog your bashrc with very specific aliases for a project.

Thread Thread
yobretyo profile image
Bret Author

I didn’t have those folders before

Collapse
yobretyo profile image
Bret Author

I made a bashrc and bash file, I entered commands, but it’s not working

Collapse
yobretyo profile image
Bret Author

Is that made in Animator on Mac?