Defining aliases in Cygwin under Windows

后端 未结 8 1954
情话喂你
情话喂你 2021-01-17 09:58

I am trying to define some aliases in cygwin, but with no success. I am doing so like this at the end of the .bashrc file.

alias foo=\'pwd\'
         


        
8条回答
  •  [愿得一人]
    2021-01-17 10:55

    I had the same problem, but I was using ConEmu to run my console. I had to go into settings and change the settings from this :

    set CHERE_INVOKING=1 & %ConEmuDrive%\Programs\Cygwin\bin\sh.exe --login -i -new_console:C:"%ConEmuDrive%\Programs\Cygwin\Cygwin.ico"

    to this:

    set HOME= & set CHERE_INVOKING=1 & %ConEmuDrive%\Programs\Cygwin\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\Programs\Cygwin\Cygwin.ico"

    Then it would work correctly.

提交回复
热议问题