From 532813bd3b28bf55d5095e3243b32ec8b7481512 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Tue, 17 Feb 2026 14:17:14 +0900 Subject: [PATCH] Add export completion and disallow alias --- src/_direnv | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/_direnv b/src/_direnv index 58be192..be97edd 100644 --- a/src/_direnv +++ b/src/_direnv @@ -43,9 +43,11 @@ _direnv_commands() { 'grant:Grants direnv permission to load the given .envrc or .env file' 'block:Revokes the authorization of a given .envrc or .env file' 'deny:Revokes the authorization of a given .envrc or .env file' + 'disallow:Revokes the authorization of a given .envrc or .env file' 'revoke:Revokes the authorization of a given .envrc or .env file' 'edit:Opens PATH_TO_RC or the current .envrc or .env into an $EDITOR and allow the file to be loaded afterwards' 'exec:Executes a command after loading the first .envrc or .env found in DIR' + 'export:Loads an .envrc or .env and prints the diff in terms of exports' "fetchurl:Fetches a given URL into direnv's CAS" 'help:shows this help' 'hook:Used to setup the shell hook' @@ -82,6 +84,12 @@ _direnv() { '2:command:_command_names' \ && ret=0 ;; + (export) + local -a supported_shells=(bash elvish gha gzenv murex tcsh vim zsh fish json pwsh systemd) + _arguments \ + '1:shell:($supported_shells)' \ + && ret=0 + ;; (hook) _arguments \ '1:shell:(bash zsh fish tcsh elvish)' \