From 779bda3937255ead2e53f608ec3850a607afb0f7 Mon Sep 17 00:00:00 2001 From: Onur Ravli Date: Wed, 7 Feb 2024 22:37:30 +0300 Subject: [PATCH 1/4] src: add -w option as an alias to --watch option Add an alias to the --watch option. --- src/node_options.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node_options.cc b/src/node_options.cc index 7b5152172c5ce7..0fadac34c44d4a 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -706,6 +706,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "run in watch mode", &EnvironmentOptions::watch_mode, kAllowedInEnvvar); + AddAlias("-w", "--watch"); AddOption("--watch-path", "path to watch", &EnvironmentOptions::watch_mode_paths, From b2d7610d10b98a85a191344497c925ed1a5926f1 Mon Sep 17 00:00:00 2001 From: Onur Ravli Date: Wed, 7 Feb 2024 22:52:15 +0300 Subject: [PATCH 2/4] doc: add -w option to cli docs Update cli.md to add -w alias to --watch. --- doc/api/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 4043597b4fbafd..1a1ca3cb7daf13 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -2286,7 +2286,7 @@ added: v0.1.3 Print node's version. -### `--watch` +### `-w`, `--watch` > Stability: 1 - Experimental From 4a02d315c2dcb7e27e31e1e46b4356c960330e74 Mon Sep 17 00:00:00 2001 From: Onur Ravli Date: Thu, 8 Feb 2024 21:21:54 +0300 Subject: [PATCH 4/4] docs: add -w option to allowed options --- doc/api/cli.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index 9fb0d21555030c..02daeb8e72ff64 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -2597,7 +2597,7 @@ Node.js options that are allowed are: * `--v8-pool-size` * `--watch-path` * `--watch-preserve-output` -* `--watch` +* `--watch`, `-w` * `--zero-fill-buffers`