Skip to content

Commit 8b010b5

Browse files
authored
Windows - guidance for shell mode in the REPL (#34633)
* Windows - guidance for shell mode in the REPL The REPL shell mode is very non intuititive for basic Windows users: the mode does nothing (like list environment variables, list directory) such a user expects, and throws errors as well. So I clarify the behavior, and show how to access one such Windows shell that most users understand under "shell mode". * Update index.md * Windows - guidance for shell mode in the REPL As mentionned in my last comment: shell examples are now English speaking. No other change.
1 parent 5cd596d commit 8b010b5

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

stdlib/REPL/docs/src/index.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,43 @@ julia> ; # upon typing ;, the prompt changes (in place) to: shell>
135135
shell> echo hello
136136
hello
137137
```
138+
!!! note
139+
For Windows users, Julia's shell mode does not expose windows shell commands.
140+
Hence, this will fail:
141+
142+
```julia-repl
143+
julia> ; # upon typing ;, the prompt changes (in place) to: shell>
144+
145+
shell> dir
146+
ERROR: IOError: could not spawn `dir`: no such file or directory (ENOENT)
147+
Stacktrace!
148+
.......
149+
```
150+
However, you can get access to `PowerShell` like this:
151+
```julia-repl
152+
julia> ; # upon typing ;, the prompt changes (in place) to: shell>
153+
154+
shell> powershell
155+
Windows PowerShell
156+
Copyright (C) Microsoft Corporation. All rights reserved.
157+
PS C:\Users\elm>
158+
```
159+
... and to `cmd.exe` like that (see the `dir` command):
160+
```julia-repl
161+
julia> ; # upon typing ;, the prompt changes (in place) to: shell>
162+
163+
shell> cmd
164+
Microsoft Windows [version 10.0.17763.973]
165+
(c) 2018 Microsoft Corporation. All rights reserved.
166+
C:\Users\elm>dir
167+
Volume in drive C has no label
168+
Volume Serial Number is 1643-0CD7
169+
Directory of C:\Users\elm
170+
171+
29/01/2020 22:15 <DIR> .
172+
29/01/2020 22:15 <DIR> ..
173+
02/02/2020 08:06 <DIR> .atom
174+
```
138175

139176
### Search modes
140177

0 commit comments

Comments
 (0)