@@ -102,10 +102,12 @@ def install
102102 MFC (Homebrew) #{ version }
103103
104104 Usage:
105+ mfc <case.py> [options]
105106 mfc run <case.py> [options]
106107
107108 Examples:
108- mfc run case.py -j 1
109+ mfc case.py -n 2
110+ mfc run case.py -n 2 -t pre_process simulation
109111
110112 Notes:
111113 - This Homebrew wrapper uses prebuilt binaries and a preinstalled venv.
@@ -115,9 +117,15 @@ def install
115117 exit 0
116118 fi
117119
120+ # Smart detection: if first arg looks like a case file, auto-prepend "run"
121+ if [[ "${SUBCMD}" =~ .py$ ]] || [[ -f "${SUBCMD}" ]]; then
122+ ARGS=("run" "${ARGS[@]}")
123+ SUBCMD="run"
124+ fi
125+
118126 if [[ "${SUBCMD}" != "run" ]]; then
119127 echo "mfc (Homebrew): only 'run' is supported in the Homebrew package."
120- echo "Use 'mfc run <case.py>' or clone the repository for developer commands."
128+ echo "Use 'mfc <case.py>' or clone the repository for developer commands."
121129 exit 2
122130 fi
123131
@@ -218,17 +226,18 @@ def caveats
218226 MFC has been installed successfully!
219227
220228 To run a case:
221- mfc run <case.py>
229+ mfc <case.py>
230+ mfc run <case.py> (explicit form)
222231
223232 Pre-built binaries are also available directly:
224233 pre_process, simulation, post_process
225234
226235 Examples are available in:
227236 #{ prefix } /examples
228237
229- Example :
238+ Quick start :
230239 cp #{ prefix } /examples/1D_sodshocktube/case.py .
231- mfc run case.py
240+ mfc case.py -n 2
232241
233242 Note: Cantera 3.1.0 is pre-installed in the MFC virtual environment.
234243 EOS
0 commit comments