# HG changeset patch # User Pascal Bellard # Date 1569401973 -7200 # Node ID 3525dfa8c4795ad4cb593ed8c88fce41c649c1e8 # Parent f8a66ba2df40040c1818a111c385753f0932a71c busybox/command_not_found: use $PATH diff -r f8a66ba2df40 -r 3525dfa8c479 busybox/stuff/command_not_found --- a/busybox/stuff/command_not_found Tue Sep 24 17:15:29 2019 +0100 +++ b/busybox/stuff/command_not_found Wed Sep 25 10:59:33 2019 +0200 @@ -1,11 +1,12 @@ #!/bin/sh -ZLIST=/var/lib/tazpkg/files.list.lzma -LIST=/tmp/command-list -[ ! $LIST -nt $ZLIST ] && unlzma <$ZLIST | grep -E '(usr/games/|bin/)' >$LIST && chmod 666 $LIST +FILES=/var/lib/tazpkg/files.list.lzma +LIST=/tmp/command-list.gz +[ ! $LIST -nt $FILES ] && unlzma <$FILES | \ +grep -E "(: $(echo ${PATH//:/|: }))" | gzip -9 >$LIST && chmod 666 $LIST lookup() { - grep -s "/$2$1$" $LIST | while read pkg file; do + zcat $LIST | grep "/$2$1$" | while read pkg file; do cat <