bash " /> bash "> Paket shell completion for <a href="https://www.gnu.org/software/bash/">bash</a> | Paket
Logo Paket

Paket shell completion for bash

Installation

Download

Option 1: Save the completion script to your home directory

  1. Download the paket-completion.bash file to a subdirectory of your home directory, preferably a directory with other function files.
  2. source the file in your ~/.bashrc.
$ target="$HOME/.bash-completions/paket-completion.bash"
$ mkdir "$(dirname "$target")"
$ curl --fail --location --proto-redir -all,https --output "$target" \
  https://raw.githubusercontent.com/fsprojects/Paket/master/completion/paket-completion.bash

In your ~/.bashrc:

source "$HOME/.bash-completions/paket-completion.bash"

Option 2: Save the completion script to /etc/bash_completion.d/

  1. Download the paket-completion.bash file to /etc/bash_completion.d/.
  2. Restart your shell.
$ target="/etc/bash_completion.d/paket-completion.bash"
$ curl --fail --location --proto-redir -all,https --output "$target" \
  https://raw.githubusercontent.com/fsprojects/Paket/master/completion/paket-completion.bash

Updating an existing installation

Just repeat the download from above.

Alternatively the completion script comes bundled with the paket-completion-update function that will download the current paket-completion.bash to the same file as above, even if you changed its location after the initial download.

Please note: The paket-completion-update function requires the completion script to be sourced and curl to be installed.

paket-completion-update supports an optional first parameter that allows you to override the default download root URL which is https://raw.githubusercontent.com/fsprojects/Paket/master/completion.

paket alias

Paket is a .NET tool. When it is a local tool of the repository, it is advised to create an alias and always run Paket from the repository root.

Somewhere in your ~/.bashrc:

alias paket='dotnet paket'

# Complete the paket alias using the _paket function.
complete -F _paket paket

Type something to start searching.