Skip to content

Commit

Permalink
Fix stale prompt example
Browse files Browse the repository at this point in the history
The current example produces the following error:

    invalid output type from prompt: number

Changed `put` to `to-string` to fix this.
  • Loading branch information
zzamboni authored and xiaq committed May 4, 2020
1 parent e72f718 commit a062be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/ref/edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ To see the transformer in action, try the following example (assuming default

```elvish
n = 0
edit:prompt = { sleep 2; put $n; n = (+ $n 1); put ': ' }
edit:prompt = { sleep 2; to-string $n; n = (+ $n 1); put ': ' }
edit:-prompt-eagerness = 10 # update prompt on each keystroke
edit:prompt-stale-threshold = 0.5
```
Expand Down

0 comments on commit a062be0

Please sign in to comment.