[Bug 54350] New: WHERE does not work
https://bugs.winehq.org/show_bug.cgi?id=54350 Bug ID: 54350 Summary: WHERE does not work Product: Wine Version: 8.0-rc4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: tools Assignee: wine-bugs(a)winehq.org Reporter: giecrilj(a)stegny.2a.pl Distribution: ---
WHERE /?
(no output) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Christopher <giecrilj(a)stegny.2a.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://learn.microsoft.com | |/pl-pl/windows-server/admin | |istration/windows-commands/ | |where Distribution|--- |SUSE -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick(a)piezo-forte.be --- Comment #1 from Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> --- Hello, 'where' is currently just a stub program. i.e. it does nothing but print a FIXME with the passed arguments. ~$ wine where /? 010c:fixme:where:wmain stub: L"C:\\windows\\system32\\where.exe" L"/?" The source code can be found there: https://source.winehq.org/git/wine.git/blob/HEAD:/programs/where/main.c Regards. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 --- Comment #2 from Christopher <giecrilj(a)stegny.2a.pl> --- Well, it does not print even that at my place. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Olivier F. R. Dierick <o.dierick(a)piezo-forte.be> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|tools |programs -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 --- Comment #3 from Christopher <giecrilj(a)stegny.2a.pl> --- (In reply to Olivier F. R. Dierick from comment #1)
Hello,
'where' is currently just a stub program. i.e. it does nothing but print a FIXME with the passed arguments.
Here is something to begin with: ==CODE== using System; using System .Resources; using System .IO; class WhereCmd { const String NAME = "WHERE", ARG1 = "[$%{0}%:|%{1}%:]%{2}%[ ...]"; public static int Main (String [] args) { ResourceManager rm = new ResourceManager ("strings", typeof (WhereCmd) .Assembly); if (01 == args .Length) if ("/?" == args [0]) // ?IS_HELP Y { String DIR = rm .GetString ("DIR"), ENV = rm .GetString ("ENV"), PATH = rm .GetString ("PATH"), PATTERN = rm .GetString ("PATTERN"); Console .WriteLine("{0}: {1}", NAME, rm .GetString ("description") ); Console .Write ("{0}: WHERE [/R %{1}%] [/Q] [/F] [/T] ", rm .GetString ("syntax"), DIR); Console .WriteLine (ARG1, ENV, PATH, PATTERN); Console .WriteLine ("{0}:", rm .GetString ("parameters")); foreach (char o in "RQFT1?") if ('1' == o) // ?IS_1 Y { Console .Write (ARG1, ENV, PATH, PATTERN); Console .Write ("\t"); Console .WriteLine (rm .GetString ("1.HELP"), ENV, PATH, PATTERN); } else // ?IS_1 N { Console .WriteLine ( "/{0}\t{1}", o, rm .GetString (String .Format ("{0}.HELP", '?' == o ? (object) null : o))); } // ?IS_1 } else // ?IS_HELP N { string [] exts = Environment .GetEnvironmentVariable ("PATHEXT") .Split (Path .PathSeparator); foreach ( string p in Environment .GetEnvironmentVariable ("PATH") .Split (Path .PathSeparator)) foreach (string e in exts) { string x = Path .ChangeExtension (Path .Combine (p, args [0]), e); if (File .Exists (x)) Console .WriteLine (x); }} // ?IS_HELP return 0; }} ==RESOURCES== description=Displays the location of files that match the given search pattern. syntax=SYNTAX DIR=DIR ENV=ENV PATH=PATH PATTERN=PATTERN parameters=Parameters R.HELP=Indicates a recursive search, starting with the specified directory. Q.HELP=Returns an exit code (0 for success, 1 for failure) without displaying the list of matched files. F.HELP=Displays the results of the where command in quotation marks. T.HELP=Displays the file size and the last modified date and time of each matched file. 1.HELP=Specifies the search pattern for the files to match. At least one pattern is required, and the pattern can include wildcard characters (* and ?). By default, where searches the current directory and the paths that are specified in the PATH environment variable. You can specify a different path to search by using the format $%{0}%:%{2}% (where %{0}% is an existing environment variable containing one or more paths) or by using the format %{1}%:%{2}% (where %{1}% is the directory path you want to search). These optional formats should not be used with the /r command-line option. .HELP=Displays help at the command prompt. Regards. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 --- Comment #4 from Alexandre Julliard <julliard(a)winehq.org> --- Is there an application that depends on this, and if so, what exact command is it using? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 --- Comment #5 from Christopher <giecrilj(a)stegny.2a.pl> --- (In reply to Alexandre Julliard from comment #4)
Is there an application that depends on this, and if so, what exact command is it using?
In general, any package manager. When you want to know more about an application that you have there, the first thing you need to know is where the application exactly is. It is puzzling why a stub command would be included in the system without anything even expecting it to be there. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 --- Comment #6 from Alexandre Julliard <julliard(a)winehq.org> --- The stub was added because some app needed it (bug 49460). We'll implement more functionality if we find a specific app that requires that functionality. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Carlo Bramini <carlo.bramix(a)libero.it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carlo.bramix(a)libero.it --- Comment #7 from Carlo Bramini <carlo.bramix(a)libero.it> --- Perhaps, you may evaluate the chance to import the implementation of the WHERE command made for ReactOS, it would be a quick solution: https://github.com/reactos/reactos/tree/master/base/applications/cmdutils/wh... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Fabian Maurer <dark.shadow4(a)web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4(a)web.de --- Comment #8 from Fabian Maurer <dark.shadow4(a)web.de> --- Possibly a dupe of bug 55282, but where.exe is now implemented. Is this enough? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=54350 Patrick Hibbs <hibbsncc1701(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hibbsncc1701(a)gmail.com --- Comment #9 from Patrick Hibbs <hibbsncc1701(a)gmail.com> --- Created attachment 78011 --> https://bugs.winehq.org/attachment.cgi?id=78011 Windows 7 where.exe output with relative paths. (In reply to Fabian Maurer from comment #8)
Possibly a dupe of bug 55282, but where.exe is now implemented. Is this enough?
I would say it isn't. The current version of where.exe in wine doesn't print absolute paths if given a relative path to search with. E.x. C:\> where "foo\:bar.txt" should output: C:\foo\bar.txt if that path exists. Currently under wine, it prints only foo\bar.txt which is wrong and will mess up BAT files that expect where.exe to print absolute paths. (Such as build scripts for cl.exe in Visual Studio.) -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla