Skip to content

Commit

Permalink
feat(command-not-found): also search for symlinks
Browse files Browse the repository at this point in the history
This is useful for finding multi-call binaries like busybox where every
provided command is just a symlink to the main binary.
  • Loading branch information
bennofs committed Jul 11, 2017
1 parent 8581c8f commit 7929522
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command-not-found.sh
Expand Up @@ -16,7 +16,7 @@ command_not_found_handle () {

toplevel=nixpkgs # nixpkgs should always be available even in NixOS
cmd=$1
attrs=$(@out@/bin/nix-locate --minimal --no-group --type x --top-level --whole-name --at-root "/bin/$cmd")
attrs=$(@out@/bin/nix-locate --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$cmd")
len=$(echo -n "$attrs" | grep -c "^")

case $len in
Expand Down

0 comments on commit 7929522

Please sign in to comment.