From 645ec935cd43469fffbd578ec4458e2dc94e628c Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Fri, 3 Feb 2017 15:52:34 -0500 Subject: [PATCH] add atest to auto pick a project and test --- config/fish/functions/atest.fish | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/fish/functions/atest.fish diff --git a/config/fish/functions/atest.fish b/config/fish/functions/atest.fish new file mode 100644 index 0000000..baa6680 --- /dev/null +++ b/config/fish/functions/atest.fish @@ -0,0 +1,7 @@ +function atest + set a_test (echo $argv | sed -e 's/\//\./g' | sed -e 's/.py//g') + set a_project (echo -n $a_test | python -c "import sys; print sys.stdin.read().split('.', 1)[0]"); + set run_test (echo "bin/manage_"$a_project".py test "$a_test) + echo $run_test + eval $run_test +end