AoikWinWhich
Windows version of Linux's which program, written in a variety of languages:
- AoikWinWhich-Bash
- AoikWinWhich-Batch
- AoikWinWhich-Ceylon
- AoikWinWhich-Clojure
- AoikWinWhich-CoffeeScript
- AoikWinWhich-C
- AoikWinWhich-Cpp
- AoikWinWhich-Cpp-CLI
- AoikWinWhich-CSharp
- AoikWinWhich-D
- AoikWinWhich-Dart
- AoikWinWhich-Eiffel
- AoikWinWhich-Erlang
- AoikWinWhich-FSharp
- AoikWinWhich-Go
- AoikWinWhich-Groovy
- AoikWinWhich-Haskell
- AoikWinWhich-Hy
- AoikWinWhich-Java
- AoikWinWhich-JavaScript
- AoikWinWhich-Julia
- AoikWinWhich-Kotlin
- AoikWinWhich-Lua
- AoikWinWhich-OCaml
- AoikWinWhich-Pascal
- AoikWinWhich-Perl
- AoikWinWhich-PHP
- AoikWinWhich-Python
- AoikWinWhich-Ruby
- AoikWinWhich-Rust
- AoikWinWhich-Scala
- AoikWinWhich-Scheme
- AoikWinWhich-Tcl
- AoikWinWhich-VB.NET
- AoikWinWhich-Xtend
Table of Contents
How to use
Assume the program is accessible in your command console via short name aoikwinwhich.
To get you started, find where aoikwinwhich itself is located:
aoikwinwhich aoikwinwhich
Run without argument to show usage:
aoikwinwhich
Usage: aoikwinwhich PROG
#/ PROG can be either name or path
aoikwinwhich notepad.exe
aoikwinwhich C:\Windows\notepad.exe
#/ PROG can be either absolute or relative
aoikwinwhich C:\Windows\notepad.exe
aoikwinwhich Windows\notepad.exe
#/ PROG can be either with or without extension
aoikwinwhich notepad.exe
aoikwinwhich notepad
aoikwinwhich C:\Windows\notepad.exe
aoikwinwhich C:\Windows\notepad
What are executable on Windows console
Unlike on Linux console where executable bit determines whether a file is executable, on Windows console a file is executable if only its file extension (e.g. .exe) is listed in Windows environment variable PATHEXT.
Save your typing
When run an executable on Windows console, one does not have to always type its full path. Several parts in the path can be omitted:
- Dir path can be omitted, e.g.:
notepad.exe
can be resolved to
C:\Windows\notepad.exe
This is because dir paths listed in environment variable PATH are implied.
- File extension can be omitted, e.g.:
notepad
can be resolved to
notepad.exe
This is because extensions listed in environment variable PATHEXT are implied.
How to read the funny source code
For developers interested in reading the source code, Here is a flowchart (.png, .svg, or .graphml) that has shown key steps of the program.
The flowchart is produced using free graph editor yEd.
If you want to copy the text in the graph, it's recommended to download the .svg file and open it locally in your browser. (For security reason, Github has disabled rendering of SVG images on the page.)
The meaning of the shapes in the flowchart should be straightforward. One thing worth mentioning is a filled arrow means next step whereas an unfilled arrow means sub-step.
The most useful feature of the flowchart is, for each step in it, there is a 7-character ID. This ID can be used to locate (by text searching) the code that implements a step. This mechanism has two merits:
- It has provided precise (locating precision is line-level) and fast (text searching is fast) mapping from doc to code, which is very handy for non-trivial project.
Without it you have to rely on developers' memory to recall the code locations (Will you recall them after several months, precise and fast?).
- It has provided precise (unique ID) and concise (7-character long) names for each steps of a program, which is very handy for communicating between members of a development team.
Without it describing some steps of a program between team members tends to be unclear.