From 5ccfaba3b5fae9c4c7c18a448066e32e7cf1529a Mon Sep 17 00:00:00 2001 From: larryrider Date: Fri, 13 Feb 2026 13:54:25 +0100 Subject: [PATCH 1/2] fix: include autocomplete in commands to skip during auth check --- src/hooks/prerun/auth_check.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hooks/prerun/auth_check.ts b/src/hooks/prerun/auth_check.ts index c9d49874..7e12ecdc 100644 --- a/src/hooks/prerun/auth_check.ts +++ b/src/hooks/prerun/auth_check.ts @@ -10,12 +10,16 @@ import { AuthService } from '../../services/auth.service'; import Webdav from '../../commands/webdav'; import WebDAVConfig from '../../commands/webdav-config'; -const CommandsToSkip = [Whoami, Login, LoginLegacy, Logout, Logs, Webdav, WebDAVConfig]; +const Autocomplete = { + name: 'autocomplete', +}; + +const CommandsToSkip = [Whoami, Login, LoginLegacy, Logout, Logs, Webdav, WebDAVConfig, Autocomplete]; const hook: Hook<'prerun'> = async function (opts) { const { Command, argv } = opts; const jsonFlag = argv.includes('--json'); - if (!CommandsToSkip.map((command) => command.name).includes(Command.name)) { + if (!CommandsToSkip.map((command) => command.name.toLowerCase()).includes(Command.name.toLowerCase())) { CLIUtils.doing('Checking credentials', jsonFlag); try { const { token } = await AuthService.instance.getAuthDetails(); From 6edb2ff33c276b5ffa554ee6ee23f27d2282d2c9 Mon Sep 17 00:00:00 2001 From: larryrider Date: Wed, 18 Feb 2026 15:42:44 +0100 Subject: [PATCH 2/2] feat: add automplete id command --- src/hooks/prerun/auth_check.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/prerun/auth_check.ts b/src/hooks/prerun/auth_check.ts index 7e12ecdc..2bf63d7e 100644 --- a/src/hooks/prerun/auth_check.ts +++ b/src/hooks/prerun/auth_check.ts @@ -12,6 +12,7 @@ import WebDAVConfig from '../../commands/webdav-config'; const Autocomplete = { name: 'autocomplete', + id: 'autocomplete', }; const CommandsToSkip = [Whoami, Login, LoginLegacy, Logout, Logs, Webdav, WebDAVConfig, Autocomplete]; @@ -19,7 +20,10 @@ const hook: Hook<'prerun'> = async function (opts) { const { Command, argv } = opts; const jsonFlag = argv.includes('--json'); - if (!CommandsToSkip.map((command) => command.name.toLowerCase()).includes(Command.name.toLowerCase())) { + if ( + !CommandsToSkip.map((command) => command.name.toLowerCase()).includes(Command.name.toLowerCase()) && + !CommandsToSkip.map((command) => command.id.toLowerCase()).includes(Command.id.toLowerCase()) + ) { CLIUtils.doing('Checking credentials', jsonFlag); try { const { token } = await AuthService.instance.getAuthDetails();