Bugs item #3535240, was opened at 2012-06-14 09:30
Message generated for change (Comment added) made by ajlittoz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3535240&group_id=27350
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: genxref
Group: current cvs
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: squall.ho (squallho)
Assigned to: Andre-Littoz (ajlittoz)
Summary: Typo error when check swish-e
Initial Comment:
at line 240, the wrong typo of
$toolloc = `which swhish-e 2>/dev/null`;
an extra "h" will make the $toolloc always be empty, since there is no binary named sw"h"ish-e.
should be correct as
$toolloc = `which swish-e 2>/dev/null`;
----------------------------------------------------------------------
>Comment By: Andre-Littoz (ajlittoz)
Date: 2012-09-20 11:35
Message:
After reading thoroughly the standards and other papers, decided to use
"command -v" instead of "which", which would also remove a dependency on
package which (at least in Fedora).
Implemented in the new genxref for release 1.0
----------------------------------------------------------------------
Comment By: Andre-Littoz (ajlittoz)
Date: 2012-07-22 08:50
Message:
Typo corrected in CVS
Still considering whether to change "which" to "command" or not.
----------------------------------------------------------------------
Comment By: Andre-Littoz (ajlittoz)
Date: 2012-06-25 07:10
Message:
jbglaw, sorry! I misintrepreted 'command -v' for a "template" where command
would be replaced by swish-e, glimpse or anything else. It is OK on my
system.
To your knowledge, is 'which' deprecated? is 'command' guaranteed to be
accepted in ANY implementation of Perl?
Regards,
ajl
----------------------------------------------------------------------
Comment By: Jan-Benedict Glaw (jbglaw)
Date: 2012-06-25 06:00
Message:
`command -v ....' should basically do what `which' did:
jbglaw@...:~$ command -v vim
/usr/bin/vim
Does it behave differently on your system? So I'd just use
$toolloc = `command -v swish-e 2>/dev/null`;
----------------------------------------------------------------------
Comment By: Andre-Littoz (ajlittoz)
Date: 2012-06-24 02:58
Message:
Thanks for pointing out the typo.
To jbglaw:
Why do you recommend not to use 'which'? I want to get the path to the
executable, while 'command -v' will only print identification and version
information.
But portability-wise, I may be wrong. Instead of comparing path with value
of parameter 'xxx-bin', I should blindly use parameter 'xxx-bin' with -v
option and see if it returns the correct name for the tool. What is your
opinion?
----------------------------------------------------------------------
Comment By: Jan-Benedict Glaw (jbglaw)
Date: 2012-06-15 07:08
Message:
Please don't use `which' any longer. To my knowledge, `command -v ...' is a
portable replacement.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390117&aid=3535240&group_id=27350
|