alias in Terminal


  • | 1465 points

    Hello,

    I want to setup some alias names for use in the Laragon Terminal program.

    An example is "alias pu=phpunit". I have add this line to Settings > Startup > Enviroment

    If I type "alias pu" it returns "pu=phpunit". If I type pu it gives the message "'pu' is not recognized as an internal or external command, operable program or batch file."

    I want to be able to type pu and get phpunit, or puf function and get phpunit --filter function.

    I must not understand how it is suppose to work. Can anyone explain it to me?


  • | 598 points

    Hello,

    You should update Cmder in : \laragon\Cmder

    • Rename your current \cmder folder in Cmder.bak and create a new one named Cmder
    • Download the last version on cmder.net
    • Extract files in your newly created folder
    • Launch Cmder and create an alias, it should work

  • | 1465 points

    Thanks for you help. I followed your instructions and it worked as you described. Alias is now working.

    A side effect though is that git has stopped working. I get the following:

    'git' is not recognized as an internal or external command,
    operable program or batch file.

    Same with npm.


  • | 598 points

    Did you download the mini or full version ?
    The mini version doesn't include Git.
    So you can :

    Get the full version and it should work
    Or
    Add the PATH environnement variable of Git in Cmder settings > Environnement.
    For example if Git is installed in C:\Program Files, add (on a new line) :

    set PATH=C:\Program Files\git\cmd;%PATH%

    Hope this helps !


  • | 1465 points

    Perfect. Thanks. I did get the mini version.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.