1

I have a command like python abc.py -p 'File Path' -c 'File path'.

1 Answers1

3

I assume what you wanted to ask is how to use command line arguments in conjunction with an alias (which you cannot). Try to define a function instead:

  • Using zsh:

    % func abc() { echo python abc.py -p "$1" -c "$2" }
    % abc def ghi
    python abc.py -p def -c ghi
    
  • Using bash:

    $ function abc { echo python abc.py -p "$1" -c "$2"; }
    $ abc def ghi
    python abc.py -p def -c ghi
    

    You might also want to have a look at alias vs. function in bash scripts.