Difference between revisions of "Command-line arguments"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "Mini Micro can be launched from the command line with certain command-line arguments to alter its default behavior. {{Template:stub}}")
 
(Added Mac way to pass arguments - restructured notes)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Mini Micro]] can be launched from the command line with certain command-line arguments to alter its default behavior.
 
[[Mini Micro]] can be launched from the command line with certain command-line arguments to alter its default behavior.
  
{{Template:stub}}
+
{| class="wikitable"
 +
|-
 +
! Argument !! Value !! Effect !! Example
 +
|-
 +
| <c>-screen-fullscreen</c> || 0 or 1 || start in full-screen mode || <c>-screen-fullscreen 1</c>
 +
|-
 +
| <c>-scale</c> || floating-point value || set screen scale to this factor || <c>-scale 2</c>
 +
|-
 +
| <c>-usr</c> || file path || mount given file or directory as /usr || <c>-usr /Users/alice/myFiles</c>
 +
|-
 +
| <c>-usr2</c> || file path || mount given file or directory as /usr2 || <c>-usr2 /Users/bob/game.minidisk</c>
 +
|}
 +
 
 +
== Usage Notes ==
 +
 
 +
On Mac, to use these arguments you have two possibilities:
 +
 
 +
# Running the bundle executable directly
 +
# Opening the app bundle with <c>open</c>
 +
 
 +
==== 1. Running the bundle executable directly ====
 +
 
 +
You <c>cd</c> inside the app bundle until you reach the executable, e.g. <c>cd MiniMicro.app/Contents/MacOS</c>.
 +
 
 +
Then you can launch the app like any Unix executable, e.g. <c>./Mini\ Micro -scale 3</c>.
 +
 
 +
==== 2. Opening the app bundle with <c>open</c> ====
 +
 
 +
You <c>cd</c> into the folder where the MiniMicro bundle is installed, e.g. <c>cd /Applications</c>.
 +
 
 +
Then you can launch the app with the <c>open</c> command, passing arguments with `args`, e.g. <c>open -a MiniMicro.app --args -scale 3</c>.
 +
 
 +
[[Category:Mini Micro]]

Latest revision as of 16:11, 21 February 2022

Mini Micro can be launched from the command line with certain command-line arguments to alter its default behavior.

Argument Value Effect Example
-screen-fullscreen 0 or 1 start in full-screen mode -screen-fullscreen 1
-scale floating-point value set screen scale to this factor -scale 2
-usr file path mount given file or directory as /usr -usr /Users/alice/myFiles
-usr2 file path mount given file or directory as /usr2 -usr2 /Users/bob/game.minidisk

Usage Notes

On Mac, to use these arguments you have two possibilities:

  1. Running the bundle executable directly
  2. Opening the app bundle with open

1. Running the bundle executable directly

You cd inside the app bundle until you reach the executable, e.g. cd MiniMicro.app/Contents/MacOS.

Then you can launch the app like any Unix executable, e.g. ./Mini\ Micro -scale 3.

2. Opening the app bundle with open

You cd into the folder where the MiniMicro bundle is installed, e.g. cd /Applications.

Then you can launch the app with the open command, passing arguments with `args`, e.g. open -a MiniMicro.app --args -scale 3.