mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Improved qp command
This commit is contained in:
parent
d23227eb7e
commit
f475446d9d
@ -46,7 +46,7 @@ def main(arguments):
|
|||||||
append_bats(dirname, filenames)
|
append_bats(dirname, filenames)
|
||||||
else:
|
else:
|
||||||
for (dirname, _, filenames) in os.walk(os.getcwd(), followlinks=False):
|
for (dirname, _, filenames) in os.walk(os.getcwd(), followlinks=False):
|
||||||
if "IRPF90_temp" not in dirname:
|
if "IRPF90_temp" not in dirname and "external" not in dirname:
|
||||||
append_bats(dirname, filenames)
|
append_bats(dirname, filenames)
|
||||||
l_bats = [y for _, y in sorted(l_bats)]
|
l_bats = [y for _, y in sorted(l_bats)]
|
||||||
|
|
||||||
@ -67,6 +67,7 @@ def main(arguments):
|
|||||||
os.system(test+" python3 bats_to_sh.py "+bats_file+
|
os.system(test+" python3 bats_to_sh.py "+bats_file+
|
||||||
"| bash")
|
"| bash")
|
||||||
else:
|
else:
|
||||||
|
# print(" ".join(["bats", "--verbose-run", "--trace", bats_file]))
|
||||||
subprocess.check_call(["bats", "--verbose-run", "--trace", bats_file], env=os.environ)
|
subprocess.check_call(["bats", "--verbose-run", "--trace", bats_file], env=os.environ)
|
||||||
|
|
||||||
|
|
||||||
|
12
etc/qp.rc
12
etc/qp.rc
@ -110,6 +110,11 @@ function qp()
|
|||||||
unset COMMAND
|
unset COMMAND
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
"test")
|
||||||
|
shift
|
||||||
|
qp_test $@
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
which "qp_$1" &> /dev/null
|
which "qp_$1" &> /dev/null
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
@ -183,7 +188,7 @@ _qp_Complete()
|
|||||||
;;
|
;;
|
||||||
esac;;
|
esac;;
|
||||||
set_file)
|
set_file)
|
||||||
COMPREPLY=( $(compgen -W "$(for i in * ; do [[ -f ${i}/ezfio/.version ]] && echo $i ; done)" -- ${cur} ) )
|
COMPREPLY=( $(compgen -W "$(for i in $(find . -name ezfio | sed 's/ezfio$/.version/') ; do [[ -f $i ]] && echo ${i%/.version} ; done)" -- ${cur} ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
plugins)
|
plugins)
|
||||||
@ -215,10 +220,15 @@ _qp_Complete()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac;;
|
esac;;
|
||||||
|
test)
|
||||||
|
COMPREPLY=( $(compgen -W "-v -a " -- $cur ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=( $(compgen -W 'plugins set_file \
|
COMPREPLY=( $(compgen -W 'plugins set_file \
|
||||||
unset_file man \
|
unset_file man \
|
||||||
create_ezfio \
|
create_ezfio \
|
||||||
|
test \
|
||||||
convert_output_to_ezfio \
|
convert_output_to_ezfio \
|
||||||
-h update' -- $cur ) )
|
-h update' -- $cur ) )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user