From 1a0eff005483b63259e365bd4d51be7c4bd3b729 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 13 Jan 2023 16:42:09 -0500 Subject: devenv: Allow dumping into file and select a format It is often more useful to generate shell script than dumping to stdout. It is also important to be able to select the shell format. Formats currently implemented: - sh: Basic VAR=prepend_value:$VAR - export: Same as 'sh', but also export VAR - vscode: Same as 'sh', but without substitutions because they don't seems to work. To be used in launch.json's envFile. --- docs/markdown/snippets/devenv.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 docs/markdown/snippets/devenv.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/devenv.md b/docs/markdown/snippets/devenv.md new file mode 100644 index 0000000..c2ce2ad --- /dev/null +++ b/docs/markdown/snippets/devenv.md @@ -0,0 +1,11 @@ +## Dump devenv into file and select format + +`meson devenv --dump []` command now takes an option filename argument +to write the environment into a file instead of printing to stdout. + +A new `--dump-format` argument has been added to select which shell format +should be used. There are currently 3 formats supported: +- `sh`: Lines are in the format `VAR=/prepend:$VAR:/append`. +- `export`: Same as `sh` but with extra `export VAR` lines. +- `vscode`: Same as `sh` but without `$VAR` substitution because they do not + seems to be properly supported by vscode. -- cgit v1.1