kitten-@-close-tab(1)
π kitten-@-close-tab β close the specified tabs β¨
okay so bestie, real talk: this is the kitten-@-close-tab page from the kitten manual, and it's literally the "make these tabs go poof" command. no cap, it's giving main character energy for your tab bar. π
πΈ Name
kitten-@-close-tab β close the specified tabs π«Ά
β¨ Usage
kitten @ close-tab
that's it. that's the vibe. π
π Description
so this closes, like, an arbitrary set of tabs. not just one. a whole curated little group of them, and you get to pick which ones. the --match option is your bestie here β you can use it to specify complex sets of tabs to close. π¦
for example (and this is the iconic one), if you wanna close all the non-focused tabs in the currently focused OS window, you go:
kitten @ close-tab --match "not state:focused and state:parent_focused"
and they're gone. slay. β¨
π₯ Options
--match,-mβ the tab to match. match specifications are of the form:field:query. where field can be one of:id,index,title,window_id,window_title,pid,cwd,cmdline,env,var,state,sessionandrecent. query is the expression to match. expressions can be either a number or a regular expression, and can be combined using Boolean operators. π
the special value all matches all tabs. periodt.
for numeric fields: id, index, window_id, pid and recent, the expression is interpreted as a number, not a regular expression. negative values for id/window_id match from the highest id number down β in particular, -1 is the most recently created tab/window. π§
when using title or id, first a matching tab is looked for, and if not found a matching window is looked for, and the tab for that window is used. iykyk.
you can also use window_id and window_title to match the tab that contains the window with the specified id or title. π
the index number is used to match the *n*th tab in the currently active OS window. the recent number matches recently active tabs in the currently active OS window, with zero being the currently active tab, one the previously active tab and so on. literally counting backwards through history, bestie.
the field session matches tabs that were created in the specified session. use the expression ^$ to match windows that were not created in a session and . to match the currently active session and ~ to match either the currently active session or the last active session when no session is active. π¦
when using the env field to match on environment variables, you can specify only the environment variable name or a name and value, for example, env:MY_ENV_VAR=2. tabs containing any window with the specified environment variables are matched. similarly, var matches tabs containing any window with the specified user variable. π
the field state matches on the state of the tab. supported states are: active, focused, needs_attention, parent_active, parent_focused and focused_os_window. active tabs are the tabs that are active in their parent OS window. there is only one focused tab and it is the tab to which keyboard events are delivered. if no tab is focused, the last focused tab is matched. the value focused_os_window matches all tabs in the currently focused OS window. π
ngl, you can use the kitten @ ls command to get a list of tabs. do that first if you're not sure what you're aiming at, okay? π
--no-response [=no]β don't wait for a response indicating the success of the action. β¨ note that using this option means that you will not be notified of failures. like, you're choosing peace and ignorance. valid, but know what you signed up for. π--self [=no]β close the tab of the window this command is run in, rather than the active tab. it's giving "i'll do it myself". π«Ά--ignore-no-match [=no]β do not return an error if no tabs are matched to be closed. no drama, no error, just vibes. πΈ--help,-h [=no]β show help for this command. the classic. π
π Global options
--toβ an address for the kitty instance to control. corresponds to the address given to the kitty instance via the--listen-onoption or thelisten_onsetting inkitty.conf. if not specified, the environment variableKITTY_LISTEN_ONis checked. if that is also not found, messages are sent to the controlling terminal for this process, i.e. they will only work if this process is run within a kitty window. so yeah, context matters, bestie. π--passwordβ a password to use when contacting kitty. this will cause kitty to ask the user for permission to perform the specified action, unless the password has been accepted before or is pre-configured inkitty.conf. to use a blank password specify--use-passwordasalways. π--password-file [=rc-pass]β a file from which to read the password. trailing whitespace is ignored. relative paths are resolved from the kitty configuration directory. use-to read from STDIN. usefd:numto read from the file descriptor num. used if no--passwordis supplied. defaults to checking for therc-passfile in the kitty configuration directory. π¦--password-env [=KITTY_RC_PASSWORD]β the name of an environment variable to read the password from. used if no--password-fileis supplied. defaults to checking the environment variableKITTY_RC_PASSWORD. β¨--use-password [=if-available]β if no password is available, kitty will usually just send the remote control command without a password. this option can be used to force it toalwaysorneveruse the supplied password. if set toalwaysand no password is provided, the blank password is used. π
choices: if-available, always, never πΈ
β reminder: --no-response means no failures get reported back to you. iconic for speed, tragic for debugging. choose wisely, babe. π
and that's the whole page, bestie!! this was kitten-@-close-tab(1) from the kitten Manual, version 0.49.2, dated Oct 01, 2026 β go forth and close those tabs, you absolute icon πππ
π¦ where this page comes from
- arch rolling: kitty 0.49.2-1 Β· GPL-3.0-only
- nixpkgs unstable: kitty-bin 0.49.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms