I'll explain my question with example.I run $ python manage.py to perform some action.I want to run another command $ xyz , just when any user runs the previous command.Thus, from now on, whenever user runs $ python manage.pyIt should run like:$ python manage.py && xyz I thought of creating an alias.But alias variable can't have space between them?
How to trigger a 2nd command when a specific command is run in the shell?
shell;zsh;alias
You could put a shell wrapper around a call to python (put this in .zshrc or .bashrc... depending on your shell),python () {    if [ $1 = manage.py ]; then        command python manage.py && xyz    else        command python $@    fi}But I suspect you are better off changing manage.py to run xyz at the end (see python subprocess library), or creating a shell script,manage.sh :#! /bin/shpython manage.py && xyz