summaryrefslogtreecommitdiff
path: root/which
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2007-12-04 18:26:54 -0500
committerClint Adams <schizo@debian.org>2007-12-04 18:26:54 -0500
commit59b208e37efaee4a5f256cfe0bf9bd0a9bf48324 (patch)
treea73d2944b16ee2bb1b298f8bc43fefcbfb73bd0f /which
parentbea1ef5adc28e5233eaaf86fdecd5e1a88142757 (diff)
downloaddebianutils-59b208e37efaee4a5f256cfe0bf9bd0a9bf48324.tar.gz
* which: make case statement more concise as per suggestion of
Adam Katz. closes: #453345.
Diffstat (limited to 'which')
-rw-r--r--which3
1 files changed, 1 insertions, 2 deletions
diff --git a/which b/which
index 6fd19ae..894f0bd 100644
--- a/which
+++ b/which
@@ -28,8 +28,7 @@ else
ALLRET=0
fi
case $PATH in
- *::) : "not *DIR:" ;;
- *:) PATH="$PATH:" ;;
+ (*[^:]:) PATH="$PATH:" ;;
esac
for PROGRAM in "$@"; do
RET=1