From f5508c6bdce630d31a9ea6509fe17367dfa9d3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Tue, 25 Aug 2026 11:52:43 +0700 Subject: [PATCH] Find `aws_completer` in libexec Our custom `aws` completer delegate to the vendor's `aws_completer` binary but this tool is not always installed to `$env.PATH`. It is because by Linux convention, the binary that is supposed to be invoked by another application should live in "/usr/libexec/" instead of "/usr/bin/". --- custom-completions/aws/aws-completions.nu | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/custom-completions/aws/aws-completions.nu b/custom-completions/aws/aws-completions.nu index 657ea519a..3d498077c 100644 --- a/custom-completions/aws/aws-completions.nu +++ b/custom-completions/aws/aws-completions.nu @@ -2,7 +2,12 @@ def complete-commands [ context: string ] { with-env {COMP_LINE: $context} { - aws_completer + let completer = if ((which aws_completer | is-empty) and ("/usr/libexec/aws_completer" | path exists)) { + "/usr/libexec/aws_completer" + } else { + "aws_completer" + } + ^$completer | lines | each {|x| $"($x) "} }