From bfa3759fc98bcc06ab5d39386199589522f62582 Mon Sep 17 00:00:00 2001 From: HRN Date: Thu, 9 Jan 2025 20:58:33 +0330 Subject: [PATCH 1/2] Auto complete for command line is added to phasicFlow commands --- cmake/bashrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmake/bashrc b/cmake/bashrc index 277080d3..e905df58 100644 --- a/cmake/bashrc +++ b/cmake/bashrc @@ -3,7 +3,6 @@ export pFlow_PROJECT_VERSION=v-1.0 export pFlow_PROJECT="phasicFlow-$pFlow_PROJECT_VERSION" - projectDir="$HOME/PhasicFlow" kokkosDir="$HOME/Kokkos/kokkos" @@ -31,5 +30,5 @@ export LD_LIBRARY_PATH="$pFlow_LIB_DIR:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$Zoltan_DIR/lib:$LD_LIBRARY_PATH" - +source $pFlow_PROJECT_DIR/cmake/autoComplete #------------------------------------------------------------------------------ From 2155771044d1ce505e2e2c09443a1820aaae394b Mon Sep 17 00:00:00 2001 From: HRN Date: Thu, 9 Jan 2025 21:02:01 +0330 Subject: [PATCH 2/2] autoComplete file --- cmake/autoComplete | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 cmake/autoComplete diff --git a/cmake/autoComplete b/cmake/autoComplete new file mode 100644 index 00000000..57de5139 --- /dev/null +++ b/cmake/autoComplete @@ -0,0 +1,33 @@ +PF_cFlags="--description --help --version" + +_pFlowToVTK(){ + if [ "$3" == "--time" ]; then + COMPREPLY=( $(ls) ) + else + COMPREPLY=( $(compgen -W "$PF_cFlags --binary --no-geometry --no-particles --out-folder --time --separate-surfaces --fields" -- "$2") ) + fi +} +complete -F _pFlowToVTK pFlowToVTK + +_postprocessPhasicFlow(){ + if [ "$3" == "--time" ]; then + COMPREPLY=( $(ls) ) + else + COMPREPLY=( $(compgen -W "$PF_cFlags --out-folder --time --zeroFolder" -- "$2") ) + fi +} +complete -F _postprocessPhasicFlow postprocessPhasicFlow + +complete -W "$PF_cFlags --positionParticles-only --setFields-only --coupling" particlesPhasicFlow + +complete -W "$PF_cFlags --coupling" geometryPhasicFlow + +complete -W "$PF_cFlags --coupling" iterateGeometry + +complete -W "$PF_cFlags" iterateSphereParticles + +complete -W "$PF_cFlags" sphereGranFlow + +complete -W "$PF_cFlags" grainGranFlow + +complete -W "$PF_cFlags" checkPhasicFlow