Merge pull request #5293 from ztstroud/feat/warn-tabonly-args

Improve user experience with tabopen and tabonly
This commit is contained in:
Oliver Blanthorn 2025-11-30 16:39:34 +00:00 committed by GitHub
commit 1606193bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -2969,7 +2969,12 @@ async function tabFromIndex(index?: number | "%" | "#" | string): Promise<browse
/** Close all other tabs in this window */
//#background
export async function tabonly() {
export async function tabonly(...args: string[]) {
if (args.length > 0) {
fillcmdline_tmp(3000, "# tabonly doesn't accept arguments, run without arguments to close all background tabs in this window")
return
}
const tabs = await browser.tabs.query({
pinned: false,
active: false,

View file

@ -658,7 +658,7 @@ export class default_config {
tabgroupswitch: "tgroupswitch",
tabnew: "tabopen",
tabm: "tabmove",
tabo: "tabonly",
tabo: "fillcmdline_tmp 3000 The :tabo alias has been removed. You can add it back with :command tabo tabonly",
tn: "tabnext_gt",
bn: "tabnext_gt",
tnext: "tabnext_gt",