Skip to content

Commit

Permalink
feat: nargo command to generate shell completions (noir-lang/noir#6413)
Browse files Browse the repository at this point in the history
feat: ensure that generated ACIR is solvable (noir-lang/noir#6415)
fix: fix Alias and Error kinds (noir-lang/noir#6426)
fix: type-check turbofish in trait before function call (noir-lang/noir#6416)
chore: create a regression test for #6420 (noir-lang/noir#6421)
chore: Release Noir(0.37.0) (noir-lang/noir#6321)
chore: update variable names in stdlib tests to be more correct (noir-lang/noir#6419)
feat!: remove mimc from stdlib (noir-lang/noir#6402)
chore: Replace dead link with updated route in README (noir-lang/noir#6392)
feat(ci): Add report of Brillig opcodes executed (noir-lang/noir#6396)
feat: improve malformed test attribute error (noir-lang/noir#6414)
fix: aliases in path (noir-lang/noir#6399)
feat(profiler): Add Brillig procedure info to debug artifact for more informative profiling (noir-lang/noir#6385)
chore(lsp): Remove profile code lens (noir-lang/noir#6411)
chore(nargo): Remove old profile as part of info cmd (noir-lang/noir#6406)
fix: distinguish TypePath with and without turbofish (noir-lang/noir#6404)
fix: numeric generic doesn't have a default type (noir-lang/noir#6405)
feat: Sync from aztec-packages (noir-lang/noir#6403)
chore: add regression tests for #4372 (noir-lang/noir#6401)
chore: add regression tests for #6314 (noir-lang/noir#6381)
  • Loading branch information
AztecBot committed Nov 2, 2024
2 parents 37a0f46 + b11b175 commit 5f10f26
Show file tree
Hide file tree
Showing 18 changed files with 206 additions and 134 deletions.
2 changes: 1 addition & 1 deletion .noir-sync-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b473d99b2b70b595596b8392617256dbaf5d5642
13856a121125b1ccca15919942081a5d157d280e
74 changes: 56 additions & 18 deletions noir/noir-repo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions noir/noir-repo/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"arithmetization",
"arity",
"arkworks",
"autoload",
"backpropagate",
"Backpropagation",
"barebones",
Expand Down Expand Up @@ -51,6 +52,7 @@
"codespan",
"coeff",
"combinators",
"compinit",
"comptime",
"cpus",
"cranelift",
Expand Down Expand Up @@ -91,6 +93,7 @@
"forall",
"foralls",
"formatcp",
"fpath",
"frontends",
"fuzzer",
"fxhash",
Expand Down
4 changes: 4 additions & 0 deletions noir/noir-repo/docs/docs/getting_started/noir_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Step 1: Follow the instructions [here](https://learn.microsoft.com/en-us/windows

step 2: Follow the [Noirup instructions](#installing-noirup).

## Setting up shell completions

Once `nargo` is installed, you can [set up shell completions for it](setting_up_shell_completions).

## Uninstalling Nargo

If you installed Nargo with `noirup`, you can uninstall Nargo by removing the files in `~/.nargo`, `~/nargo`, and `~/noir_cache`. This ensures that all installed binaries, configurations, and cache related to Nargo are fully removed from your system.
Expand Down
2 changes: 2 additions & 0 deletions noir/noir-repo/docs/docs/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ curl -L noirup.dev | bash
noirup
```

Once installed, you can [set up shell completions for the `nargo` command](setting_up_shell_completions).

### Proving backend

After installing Noir, we install a proving backend to work with our Noir programs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
title: Setting up shell completions
tags: []
sidebar_position: 3
---

The `nargo` binary provides a command to generate shell completions:

```bash
nargo generate-completion-script [shell]
```

where `shell` must be one of `bash`, `elvish`, `fish`, `powershell`, and `zsh`.

Below we explain how to install them in some popular shells.

## Installing Zsh Completions

If you have `oh-my-zsh` installed, you might already have a directory of automatically loading completion scripts — `.oh-my-zsh/completions`.
If not, first create it:

```bash
mkdir -p ~/.oh-my-zsh/completions`
```

Then copy the completion script to that directory:

```bash
nargo generate-completion-script zsh > ~/.oh-my-zsh/completions/_nargo
```

Without `oh-my-zsh`, you’ll need to add a path for completion scripts to your function path, and turn on completion script auto-loading.
First, add these lines to `~/.zshrc`:

```bash
fpath=(~/.zsh/completions $fpath)
autoload -U compinit
compinit
```

Next, create a directory at `~/.zsh/completions`:

```bash
mkdir -p ~/.zsh/completions
```

Then copy the completion script to that directory:

```bash
nargo generate-completion-script zsh > ~/.zsh/completions/_nargo
```

## Installing Bash Completions

If you have [bash-completion](https://github.com/scop/bash-completion) installed, you can just copy the completion script to the `/usr/local/etc/bash_completion.d` directory:

```bash
nargo generate-completion-script bash > /usr/local/etc/bash_completion.d/nargo
```

Without `bash-completion`, you’ll need to source the completion script directly.
First create a directory such as `~/.bash_completions/`:

```bash
mkdir ~/.bash_completions/
```

Copy the completion script to that directory:

```bash
nargo generate-completion-script bash > ~/.bash_completions/nargo.bash
```

Then add the following line to `~/.bash_profile` or `~/.bashrc`:


```bash
source ~/.bash_completions/nargo.bash
```

## Installing Fish Completions

Copy the completion script to any path listed in the environment variable `$fish_completion_path`. For example, a typical location is `~/.config/fish/completions/nargo.fish`:

```bash
nargo generate-completion-script fish > ~/.config/fish/completions/nargo.fish
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5f10f26

Please sign in to comment.