summaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/examples/README.md6
-rw-r--r--std/examples/xeval.ts8
-rw-r--r--std/flags/README.md8
-rw-r--r--std/flags/mod.ts4
-rw-r--r--std/http/README.md2
5 files changed, 14 insertions, 14 deletions
diff --git a/std/examples/README.md b/std/examples/README.md
index 1c47d258e..cdc477833 100644
--- a/std/examples/README.md
+++ b/std/examples/README.md
@@ -10,7 +10,7 @@ bookmark to a program.)
### A TCP echo server
```shell
-deno --allow-net https://deno.land/std/examples/echo_server.ts
+deno run --allow-net https://deno.land/std/examples/echo_server.ts
```
Or
@@ -40,7 +40,7 @@ echo example.json | catj -
### curl - print the contents of a url to standard output
```shell
-deno --allow-net=deno.land https://deno.land/std/examples/curl.ts https://deno.land/
+deno run --allow-net=deno.land https://deno.land/std/examples/curl.ts https://deno.land/
```
### gist - easily create and upload Gists
@@ -55,7 +55,7 @@ gist --t "Example gist 2" script2.ts
### chat - WebSocket chat server and browser client
```shell
-deno --allow-net --allow-read https://deno.land/std/examples/chat/server.ts
+deno run --allow-net --allow-read https://deno.land/std/examples/chat/server.ts
```
Open http://localhost:8080 on the browser.
diff --git a/std/examples/xeval.ts b/std/examples/xeval.ts
index 6589fec16..d688a6bf7 100644
--- a/std/examples/xeval.ts
+++ b/std/examples/xeval.ts
@@ -14,16 +14,16 @@ const HELP_MSG = `xeval
Run a script for each new-line or otherwise delimited chunk of standard input.
Print all the usernames in /etc/passwd:
- cat /etc/passwd | deno -A https://deno.land/std/examples/xeval.ts "a = $.split(':'); if (a) console.log(a[0])"
+ cat /etc/passwd | deno run -A https://deno.land/std/examples/xeval.ts "a = $.split(':'); if (a) console.log(a[0])"
A complicated way to print the current git branch:
- git branch | deno -A https://deno.land/std/examples/xeval.ts -I 'line' "if (line.startsWith('*')) console.log(line.slice(2))"
+ git branch | deno run -A https://deno.land/std/examples/xeval.ts -I 'line' "if (line.startsWith('*')) console.log(line.slice(2))"
Demonstrates breaking the input up by space delimiter instead of by lines:
- cat LICENSE | deno -A https://deno.land/std/examples/xeval.ts -d " " "if ($ === 'MIT') console.log('MIT licensed')",
+ cat LICENSE | deno run -A https://deno.land/std/examples/xeval.ts -d " " "if ($ === 'MIT') console.log('MIT licensed')",
USAGE:
- deno -A https://deno.land/std/examples/xeval.ts [OPTIONS] <code>
+ deno run -A https://deno.land/std/examples/xeval.ts [OPTIONS] <code>
OPTIONS:
-d, --delim <delim> Set delimiter, defaults to newline
-I, --replvar <replvar> Set variable name to be used in eval, defaults to $
diff --git a/std/flags/README.md b/std/flags/README.md
index 41692b619..e9764f913 100644
--- a/std/flags/README.md
+++ b/std/flags/README.md
@@ -12,12 +12,12 @@ console.dir(parse(args));
```
```
-$ deno example.ts -a beep -b boop
+$ deno run example.ts -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
```
```
-$ deno example.ts -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
+$ deno run example.ts -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
x: 3,
y: 4,
@@ -60,11 +60,11 @@ options can be:
import { parse } from "https://deno.land/std/flags/mod.ts";
// options['--'] is now set to false
console.dir(parse(args, { "--": false }));
- // $ deno example.ts -- a arg1
+ // $ deno run example.ts -- a arg1
// output: { _: [ "example.ts", "a", "arg1" ] }
// options['--'] is now set to true
console.dir(parse(args, { "--": true }));
- // $ deno example.ts -- a arg1
+ // $ deno run example.ts -- a arg1
// output: { _: [ "example.ts" ], --: [ "a", "arg1" ] }
```
- `options.unknown` - a function which is invoked with a command line parameter
diff --git a/std/flags/mod.ts b/std/flags/mod.ts
index 3afaf111f..0563dab61 100644
--- a/std/flags/mod.ts
+++ b/std/flags/mod.ts
@@ -18,11 +18,11 @@ export interface ArgParsingOptions {
* import { parse } from "https://deno.land/std/flags/mod.ts";
* // options['--'] is now set to false
* console.dir(parse(args, { "--": false }));
- * // $ deno example.ts -- a arg1
+ * // $ deno run example.ts -- a arg1
* // output: { _: [ "example.ts", "a", "arg1" ] }
* // options['--'] is now set to true
* console.dir(parse(args, { "--": true }));
- * // $ deno example.ts -- a arg1
+ * // $ deno run example.ts -- a arg1
* // output: { _: [ "example.ts" ], --: [ "a", "arg1" ] }
*
* Defaults to `false`.
diff --git a/std/http/README.md b/std/http/README.md
index 993b46cb8..4e30a3a56 100644
--- a/std/http/README.md
+++ b/std/http/README.md
@@ -14,7 +14,7 @@ for await (const req of s) {
A small program for serving local files over HTTP
```sh
-deno --allow-net --allow-read https://deno.land/std/http/file_server.ts
+deno run --allow-net --allow-read https://deno.land/std/http/file_server.ts
> HTTP server listening on http://0.0.0.0:4500/
```