-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
Description
Steps to reproduce
PS> touch ab.txt 'a b.txt'
# Question mark character works
PS> find -name 'a?.txt'
ab.txt
PS> find -name 'a??.txt'
a b.txt
# Asterisk appears to be being expanded into file names
PS> find -name 'a*b.txt'
/usr/bin/find: paths must precede expression: ab.txt
Usage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]
# Escaping asterisk doesn't work
PS> find -name 'a`*b.txt'
# No output, which indicates the parameters were accepted, but the search produced no results.Expected behavior
PS> find -name 'a*b.txt'
./ab.txt
./a b.txtActual behavior
PS> find -name 'a*b.txt'
/usr/bin/find: paths must precede expression: ab.txt
Usage: /usr/bin/find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec|time] [path...] [expression]It appears that the command is being converted into: find -name 'a b.txt' 'ab.txt'
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.6
OS Linux 4.4.0-92-generic #115-Ubuntu SMP Thu Au...
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0 rkeithhill
Metadata
Metadata
Assignees
Labels
Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.