Dfx 0.20.0 is promoted

dfx 0.20.0 is promoted! You can read the release notes here.

Install dfx 0.20.0 with dfxvm:

dfxvm install 0.20.0
dfxvm default 0.20.0

This release brings several fixes and enhancements. Most notably, dfx now ships with a completion command, which generates shell completion scripts for bash , elvish , fish , zsh , or PowerShell.

Essentially, you can get “autocompletion” of dfx commands with a few extra steps. Example steps (strictly for zsh) below:

  1. Open ~/.zshrc for editing, e.g.
vi ~/.zshrc
  1. Paste the commands below to the bottom of .zshrc
autoload -Uz compinit
compinit
  1. Restart your terminal

  2. Run the following:

source <(dfx completion zsh)
  1. type dfx then tab and you should see autocomplete options populate

Please try it out and let us know if you run into any issues.

13 Likes

That’s the ultimate efficiency booster, auto completion was much needed

1 Like

What base path is used for commands now? This is what we had before…

            "build": "bash -c './backend/scripts/app/build.sh test'",

and that doesn’t work any more.

Is there a way to specify the directory where dfx.json lives? I can’t really use ~ because everybody stores the repo in different places.

I’m not sure that dfx applies a base path to any commands. dfx.json is project-specific – dfx only reads that file in the context of a project directory. dfx itself lives somewhere like /Users/xxx/Library/Application Support/org.dfinity.dfx/bin/dfx (you can see by running which dfx)

where does that script run? in a github action?