From 42691e10437a749ae861fc8339d516d46562ab56 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 4 Jul 2024 10:49:54 -0700 Subject: [PATCH] Add recipe for testing bash completion script (#2221) --- justfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/justfile b/justfile index d7f67252..11f47dbf 100755 --- a/justfile +++ b/justfile @@ -217,6 +217,16 @@ _ruby: pwd: echo {{invocation_directory()}} +test-bash-completions: + rm -rf tmp + mkdir -p tmp/bin + cargo build + cp target/debug/just tmp/bin + ./tmp/bin/just --completions bash > tmp/just.bash + echo 'mod foo' > tmp/justfile + echo 'bar:' > tmp/foo.just + cd tmp && PATH="`realpath bin`:$PATH" bash --init-file just.bash + # Local Variables: # mode: makefile # End: