ls and pwd are unix commands, not built-ins in Windows cmd. Powershell has ls and pwd as aliases to longer-form built-ins Get-ChildItem and Get-Location. The differences you're seeing are between shell built-ins that work only at a command line, and executables on the path. If you call "where pwd" or "which pwd" you can see the difference of where these come from - note that "which" only works in a unix-like shell, as you can see from "which which" or "where which".
Git-for-windows bundles a whole posix MSYS2 environment because large parts of git are implemented as shell scripts. There was a change in Julia 0.4.2 in terms of what pieces of that posix environment are added to Julia's path by default, to fix a compatibility issue with starting the Julia executable from inside Cygwin or MSYS2. This has the side effect of taking some unix commands that came along with git off of Julia's default path. Cross-platform Julia scripts should not be shelling out to these programs if they want to run on Windows, getting those programs bundled as a side effect of Git path settings should not be relied on going forward since we will be removing command-line Git from the binaries in Julia 0.5 now that Pkg uses the libgit2 library. On Monday, December 14, 2015 at 12:01:59 PM UTC-8, hustf wrote: > > Tony, let me take the opportunity to give thanks for the good work you're > putting down in general. I can't wait to get going with Immerse, for one. > > So there is an embedded copy of git inside of Julia... With a different > parameter set, depending on startup context I suppose.. 'Shell', of course, > is not a clearly defined term and is only misleading when one, like I did, > assumes that the shell is the parent process of Julia. I have looked into > base.convert.jl in addition to trying to understand what you write > properly, but the c-calls and pointers belong a couple of levels too close > to the core of computing for my comfort. > > I hope the tests below can point to a solution that works without much > knowledge of internal workings. This issue (whichever program to blame) > currently stops the potentially production-boosting atom client from > connecting consistently to julia on this system. And the REPL must be > accessed through terminal 4) below. > > This post is so long and boring because it took a while to reproduce the > exact behaviour above. But finally, 5) below is the 'terminal' context of > the first post. Julia 0.4.2, 0.4.1 and 0.4.0 all produce different results > in context 5). All reported below are 0.4.2 results. > > 1) Windows 10.0.10586 64 bit->Start->type cmd. Two choices pop up: > 'Command prompt (desktop app), and 'Anaconda Command Prompt'. I choose the > non-anaconda one. This is a shortcut with target > '%windir%\system32\cmd.exe'. It starts with prompt 'c:\users\F>'. DIR > works. LS, PWD and GIT don't work. My PATH includes > 'c:\users\f\appdata\local\julia-0.4.2\bin'. I type Julia. pwd() yields > 'c:\\users\\f'. homedir() yields the same. I type ;pwd, ;dir and ;ls and > all three produce the error in the first post. > > 2) Same as 1), but I choose the 'Anaconda' terminal. 'c:\users\f' is > replaced with 'c:\jpa\Anaconda'. Same behaviour as 1) except for the path. > > 3) Start-> PowerShell (desktop app). This is a shortcut with target > '%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe'. The window > caption says 'Windows Power Shell'. The text heading says ...2015 > Microsoft.... The prompt says 'PS C:\Users\F>'. LS, PWD and DIR works. GIT > does not work. Same Julia behaviour as 1) > > 4) Start-> Git shell (desktop app). This is a shortcut with target > 'C:\Users\F\AppData\Local\GitHub\GitHub.appref-ms --open-shell'. The window > caption says 'c:\windows\system32\windowsPowershell\v1.0\powershell.exe'. > The heading is identical to 3), but the prompt says > 'c:\users\f\documents\github>' without the PS prefix. LS, DIR, PWD and GIT > all work. In Julia, pwd() yields 'C:\\Users\\F\\Documents\\GitHub'. > homedir() yields 'C:\\Users\\F'. ;ls, ;dir and ;pwd work too. > > 5) Logout F, login Fro. With this user, the git shell preference is the > 'MS-DOS style' shell. Start-> Git shell (desktop app). This is a shortcut > with target 'C:\Users\Fro\AppData\Local\GitHub\GitHub.appref-ms > --open-shell'. The window caption says 'c:\windows\system32\cmd.exe'. The > promt says 'c:\users\fro\documents\github>'. LS yields no output at all. > DIR works. PWD 'is not recognized as an internal or external command'. GIT > works. In Julia, pwd() yields 'C:\\Users\\Fro\\Documents\\GitHub'. > homedir() yields 'C:\\Users\\Fro'. ;ls works. ;dir and ;pwd yields the > error in the first post. > >
