Skip to content

Commit

Permalink
website/ref/edit.md: Add "use re" to examples using re:awk.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Jul 21, 2024
1 parent c782a30 commit 3269cbe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/ref/edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ It only supports completing the `install` and `remove` command and package names
after that:
```elvish
use re
var all-packages = [(apt-cache search '' | re:awk {|0 1 @rest| put $1 })]
set edit:completion:arg-completer[apt] = {|@args|
Expand All @@ -398,6 +400,8 @@ Here is another slightly more complex example for the `git` command. It supports
completing some common subcommands and then branch names after that:

```elvish
use re
fn all-git-branches {
# Note: this assumes a recent version of git that supports the format
# string used.
Expand Down

0 comments on commit 3269cbe

Please sign in to comment.