Skip to content

Commit

Permalink
shell: add a package godoc note for Windows paths
Browse files Browse the repository at this point in the history
As suggested in mvdan#356, since this can be a common misconception.
  • Loading branch information
mvdan committed Feb 22, 2019
1 parent f475721 commit df5f8fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shell/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@

// Package shell contains high-level features that use the syntax, expand, and
// interp packages under the hood.
//
// Please note that this package uses POSIX Shell syntax. As such, path names on
// Windows need to use double backslashes or be within single quotes when given
// to functions like Fields. For example:
//
// shell.Fields("echo /foo/bar") // on Unix-like
// shell.Fields("echo C:\\foo\\bar") // on Windows
// shell.Fields("echo 'C:\foo\bar'") // on Windows, with quotes
package shell

0 comments on commit df5f8fe

Please sign in to comment.