diff --git a/docs/readme.md b/docs/readme.md index 698829d..b48c67e 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -18,6 +18,9 @@ go build ``` This will place the compiler inside the repository. + +### Symlink + Either use `./q` for the following examples or get access to the shorter `q` in any directory via symlink: ```shell @@ -28,36 +31,26 @@ This assumes that your shell loads `~/.local/bin`. ## Usage -```shell -q [command] [options] ``` +Usage: -The `build` command creates an executable: + q [command] [options] -```shell -q build examples/hello +Commands: + + build [directory | file] build an executable from a file or directory + --arch [arch] cross-compile for another CPU architecture [x86|arm|riscv] + --assembler, -a show assembler instructions + --dry, -d skip writing the executable to disk + --os [os] cross-compile for another OS [linux|mac|windows] + --statistics, -s show statistics + --verbose, -v show everything + + run [directory | file] build and run the executable + system show system information + help show this help ``` -The `run` command does everything `build` does but also executes it: - -```shell -q run examples/hello -``` - -You don't have to use physical directories, it's perfectly valid to use a list of files: - -```shell -q build hello.q world.q -``` - -To show verbose compiler output use `-v` or `--verbose`: - -```shell -q build examples/hello -v -``` - -For more information see `q help`. - ## Platforms You can cross-compile executables for Linux, Mac and Windows. diff --git a/src/cli/Help.go b/src/cli/Help.go index 0543ad8..7faf7dc 100644 --- a/src/cli/Help.go +++ b/src/cli/Help.go @@ -14,10 +14,10 @@ func Help(w io.Writer, code int) int { Commands: build [directory | file] build an executable from a file or directory - --arch [arch] cross-compile for a different CPU architecture (x86, arm or riscv) + --arch [arch] cross-compile for another CPU architecture [x86|arm|riscv] --assembler, -a show assembler instructions --dry, -d skip writing the executable to disk - --os [os] cross-compile for a different OS (linux, mac or windows) + --os [os] cross-compile for another OS [linux|mac|windows] --statistics, -s show statistics --verbose, -v show everything