Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Updated docs for current version v0.99g
  • Loading branch information
Jamie Jennings committed Nov 8, 2016
2 parents 0afb3a1 + fb2e85b commit 6064152
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
17 changes: 7 additions & 10 deletions doc/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@

### Running Rosie

The `run` script in the Rosie install directory starts the command line interface (CLI), which can be used to match rpl pattern expressions against files of data. (To match against a single string, use the [interactive read-eval-print loop (repl)](repl.md).)
The `bin/rosie` script in the Rosie install directory starts the command line interface (CLI), which can be used to match rpl pattern expressions against files of data. (To match against a single string, use the [interactive read-eval-print loop (repl)](repl.md).)

The Rosie Pattern Engine reads input files one line at a time, and tries to match each line against the pattern expression given on the command line.

A good way to run Rosie is to define an alias. In the bash shell, you can write (substituting your Rosie install directory for mine):
One way to run Rosie is to define an alias. In the bash shell, you can write (substituting your Rosie install directory for mine):

```
alias rosie='/Users/jjennings/Dev/rosie-pattern-language/run'
alias rosie='/Users/jjennings/Dev/rosie-pattern-language/bin/rosie'
```

Or if you cd into the Rosie install directory, this:
Or use `make install` to place a link in `/usr/local/bin/rosie`.

```
alias rosie=`pwd`/run
```
More detail about the way Rosie is installed can be found [here](install.md).

Putting this alias definition into your `~/.bashrc` file will load it every time an interactive bash shell starts. Now you can type `rosie` to start the Rosie CLI.

### A quick "sniff test" to see if things are working

Expand All @@ -47,11 +44,11 @@ Rosie supports output in a few formats, which are controlled by the value of the
### Help is available

```
bash-3.2$ ./run -help
bash-3.2$ ./bin/rosie -help
This is Rosie v0.99a
The Rosie install directory is: /Users/jjennings/Work/Dev/rosie-pattern-language
Rosie help:
Rosie usage: ./run <options> <pattern> <filename>*
Rosie usage: ./bin/rosie <options> <pattern> <filename>*
Valid <options> are: -help -patterns -verbose -all -repl -grep -eval -wholefile -manifest -f -e -encode
-help prints this message
Expand Down
2 changes: 1 addition & 1 deletion doc/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ In the [Rosie Command Line Interface documentation](cli.md) you will find the
processing any other command line options. For example:

```
jjennings$ ./run -repl
jjennings$ ./bin/rosie -repl
Rosie CLI warning: missing pattern argument
Rosie CLI warning: missing filename arguments
This is Rosie v0.99a
Expand Down
4 changes: 2 additions & 2 deletions doc/rpl.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ But this is not quite enough, because this pattern will consume characters as lo
The pattern above says "while not looking at _ear_, consume all characters; then match _ear_ at the end of the line." Using this expression, we get:

```shell
bash-3.2$ ./run '{{!"ear" .}* "ear"}$' /usr/share/dict/words | head -5
bash-3.2$ ./bin/rosie '{{!"ear" .}* "ear"}$' /usr/share/dict/words | head -5
abear
afear
anear
Expand All @@ -306,7 +306,7 @@ Observe that the form of this pattern is `{{ !X .}* X}`, in other words, "consum


```shell
bash-3.2$ ./run '{"c" {!"ear" .}* "ear"$}' /usr/share/dict/words
bash-3.2$ ./bin/rosie '{"c" {!"ear" .}* "ear"$}' /usr/share/dict/words
circumnuclear
clear
coappear
Expand Down

0 comments on commit 6064152

Please sign in to comment.