summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rwxr-xr-xbuild.sh2
-rwxr-xr-xdist-assets/pkg-scripts/postinstall2
-rw-r--r--gui/tasks/distribution.js2
4 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd6518c8e4..f816de81fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ Line wrap the file at 100 chars. Th
## [Unreleased]
### Added
- Show system notification when account has expired.
+- Add fish shell completions for the mullvad CLI.
### Changed
- Upgrade from Electron 7 to Electron 8.
diff --git a/build.sh b/build.sh
index 168f01502d..877f3c65a1 100755
--- a/build.sh
+++ b/build.sh
@@ -138,7 +138,7 @@ echo "Building Rust code in release mode using $RUSTC_VERSION..."
if [[ ("$(uname -s)" == "Darwin") || ("$(uname -s)" == "Linux") ]]; then
pushd mullvad-cli
mkdir -p "$SCRIPT_DIR/dist-assets/shell-completions"
- for sh in bash zsh; do
+ for sh in bash zsh fish; do
echo "Generating shell completion script for $sh..."
cargo +stable run $CARGO_ARGS --release --features shell-completions -- \
shell-completions "$sh" "$SCRIPT_DIR/dist-assets/shell-completions/"
diff --git a/dist-assets/pkg-scripts/postinstall b/dist-assets/pkg-scripts/postinstall
index 803e9cf276..9e6db15a6f 100755
--- a/dist-assets/pkg-scripts/postinstall
+++ b/dist-assets/pkg-scripts/postinstall
@@ -63,5 +63,7 @@ mkdir -p /usr/local/bin
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad" /usr/local/bin/mullvad
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad-problem-report" /usr/local/bin/mullvad-problem-report
+ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/mullvad.fish" /usr/share/fish/vendor_completions.d
+
mkdir -p "$ZSH_COMPLETIONS_DIR"
ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/_mullvad" "$ZSH_COMPLETIONS_DIR/_mullvad"
diff --git a/gui/tasks/distribution.js b/gui/tasks/distribution.js
index c0fc5ecb09..a84102c6bf 100644
--- a/gui/tasks/distribution.js
+++ b/gui/tasks/distribution.js
@@ -131,6 +131,7 @@ const config = {
distAssets('shell-completions/mullvad.bash') +
'=/usr/share/bash-completion/completions/mullvad',
distAssets('shell-completions/_mullvad') + '=/usr/local/share/zsh/site-functions/_mullvad',
+ distAssets('shell-completions/mullvad.fish') + '=/usr/share/fish/vendor_completions.d',
],
afterInstall: distAssets('linux/after-install.sh'),
afterRemove: distAssets('linux/after-remove.sh'),
@@ -155,6 +156,7 @@ const config = {
distAssets('shell-completions/mullvad.bash') +
'=/usr/share/bash-completion/completions/mullvad',
distAssets('shell-completions/_mullvad') + '=/usr/share/zsh/site-functions/_mullvad',
+ distAssets('shell-completions/mullvad.fish') + '=/usr/share/fish/vendor_completions.d',
],
afterInstall: distAssets('linux/after-install.sh'),
afterRemove: distAssets('linux/after-remove.sh'),