From 9f2f2e978edd65f8ebea892de3d079984bb87e36 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Thu, 11 Nov 2021 02:22:23 +0530 Subject: [PATCH] Use global scope for aliases (#300) --- CHANGELOG.md | 6 ++++++ templates/powershell.txt | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1509abd..6f20a39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Fixed + +- PowerShell: use global scope for aliases. + ## [0.7.9] - 2021-11-02 ### Changed diff --git a/templates/powershell.txt b/templates/powershell.txt index 110aa5d..110504e 100644 --- a/templates/powershell.txt +++ b/templates/powershell.txt @@ -107,8 +107,8 @@ function __zoxide_zi { {%- match cmd %} {%- when Some with (cmd) %} -Set-Alias -Name {{cmd}} -Value __zoxide_z -Option AllScope -Set-Alias -Name {{cmd}}i -Value __zoxide_zi -Option AllScope +Set-Alias -Name {{cmd}} -Value __zoxide_z -Option AllScope -Scope Global -Force +Set-Alias -Name {{cmd}}i -Value __zoxide_zi -Option AllScope -Scope Global -Force {%- when None %}