Hubert Badocha
Hubert Badocha

Reputation: 59

How to use short_command_name -args instead of python program_name -args in powershell?

I'd like to write a simple bash script to write in powershell

p args

instead of

python manage.py args

but i have no experience in bash. Can you help me?

Upvotes: 0

Views: 88

Answers (1)

briantist
briantist

Reputation: 47812

PowerShell aliases can't play with parameters, they just alias one name to another. But you can write it as a function:

function p {
   & python manage.py $args
}

Upvotes: 3

Related Questions