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@winehq.org Reporter: giecrilj@stegny.2a.pl Distribution: ---
WHERE /?
(no output)
https://bugs.winehq.org/show_bug.cgi?id=54350
Christopher giecrilj@stegny.2a.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://learn.microsoft.com | |/pl-pl/windows-server/admin | |istration/windows-commands/ | |where Distribution|--- |SUSE
https://bugs.winehq.org/show_bug.cgi?id=54350
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #1 from Olivier F. R. Dierick o.dierick@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.
https://bugs.winehq.org/show_bug.cgi?id=54350
--- Comment #2 from Christopher giecrilj@stegny.2a.pl --- Well, it does not print even that at my place.
https://bugs.winehq.org/show_bug.cgi?id=54350
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|tools |programs
https://bugs.winehq.org/show_bug.cgi?id=54350
--- Comment #3 from Christopher giecrilj@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.
https://bugs.winehq.org/show_bug.cgi?id=54350
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Is there an application that depends on this, and if so, what exact command is it using?
https://bugs.winehq.org/show_bug.cgi?id=54350
--- Comment #5 from Christopher giecrilj@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.
https://bugs.winehq.org/show_bug.cgi?id=54350
--- Comment #6 from Alexandre Julliard julliard@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.
https://bugs.winehq.org/show_bug.cgi?id=54350
Carlo Bramini carlo.bramix@libero.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |carlo.bramix@libero.it
--- Comment #7 from Carlo Bramini carlo.bramix@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...
https://bugs.winehq.org/show_bug.cgi?id=54350
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #8 from Fabian Maurer dark.shadow4@web.de --- Possibly a dupe of bug 55282, but where.exe is now implemented. Is this enough?