Ticket UUID: | 1015402 | |||
Title: | Add cmd to fileutil: which, a wrapper around auto_execok | |||
Type: | RFE | Version: | None | |
Submitter: | certgen | Created on: | 2004-08-24 16:52:55 | |
Subsystem: | fileutil | Assigned To: | andreas_kupries | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2013-07-04 17:25:08 | |
Resolution: | Not Applicable Here | Closed By: | ||
Closed on: | ||||
Description: |
I have added a which package to the tcllib v1.4 library we are shipping with our Quartus II software developed here at Altera. I thought I'd submit the package back to the tcllib team for possible consideration as a standard tcllib package. This is a pure-Tcl which implementation that has the same interface on Windows/Unix (eases cross-platform scripting a bit). There's not much too it. It doesn't support MacOS (we don't ship for MacOS so I have no way to test it) but it shouldn't be hard to extend to the Mac platform. | |||
User Comments: |
andreas_kupries added on 2004-08-25 01:41:33:
Logged In: YES user_id=75003 Wrapper as fileutil::which is an idea. Renaming and recategorizing the entry. I agree that the name 'auto_execok' is ... non-intuitive / non-explanatory. Historically grown, unfortunately. It came out of the 'auto'loader and is a helper command for it. certgen added on 2004-08-25 01:33:13: Logged In: YES user_id=82268 Sure. Probably fine to close this. Unless you want to consider wrapping auto_execok in a fileutil::which command. I only never noticed auto_execok because, well, that command name completely sucks. Without clicking through the documentation on the tcl wiki page I would never have guessed what it did from the command name. andreas_kupries added on 2004-08-25 01:27:19: Logged In: YES user_id=75003 Don't feel to bad. Nobody knows all, not even I, and that is why things go through the review. Note that while auto_execok is meant to do the same things it is a bit different internally and the API, for more x-platform ability. Should I close this then ? Oh, and don't let this stop you from proposing other modules and code of yours for tcllib. certgen added on 2004-08-25 01:16:03: Logged In: YES user_id=82268 uhh...umm...well...i guess if i had read the docs for auto_execok...i...uhh...well, probably wouldn't have written this because they are the exact same thing. opps. don't i feel silly now. dgp added on 2004-08-25 00:56:59: Logged In: YES user_id=80530 I agree that [auto_execok] likely does a better job (especially when it comes to platform differences), but if one just has a liking for Unix-style shell commands, there's a history of placing them in the fileutils package, rather than having only one command per package. See for example, [fileutil::cat], [fileutil::find], [fileutil::grep], etc. andreas_kupries added on 2004-08-25 00:33:36: Logged In: YES user_id=75003 After looking at the docs I have a question: The tcl core has the builtin command 'auto_execok' which also does searching for executables. How does your command compare to it ? certgen added on 2004-08-24 23:52:55: File Added - 98992: which.tar.gz |
Attachments:
- which.tar.gz [download] added by certgen on 2004-08-24 23:52:55. [details]