October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Cupertino desk4 min

Fix zsh Tab Completion Case Sensitivity Over SSH on macOS

Add a zsh matcher-list setting to the remote account’s active .zshrc so Tab tries normal completion first and retries without case sensitivity.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To make Tab completion case-insensitive at an SSH prompt, add a matcher-list style to the remote account’s interactive zsh configuration. The recommended setting tries ordinary, case-sensitive completion first, then retries with letter case ignored:

zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'

Put it in the remote account’s active .zshrc—usually ~/.zshrc, or $ZDOTDIR/.zshrc if ZDOTDIR is set. The shell handling the prompt is the one whose completion settings matter.

Make the change in the shell where Tab fails

When you open Terminal on a Mac and connect with SSH, there may be two shells involved: the local shell in Terminal and a shell on the SSH destination. If completion fails after you connect, configure the remote account. Changing the Mac’s local zsh settings does not automatically change the remote account’s shell or startup files.

Apple documents zsh as the default shell in Terminal on Mac, but Terminal can use other shells, and a networked environment may specify a shell for an account. Check the active prompt rather than assuming the remote host uses zsh. See Apple’s guide to changing the default shell in Terminal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Apple Magic Keyboard - US English ​​​​​​​, Bluetooth
  • Magic Keyboard delivers a remarkably comfortable and precise typing experience.
  • It’s also wireless and rechargeable, with an incredibly long-lasting internal battery that’ll power your keyboard for about a month or more between charges.
  • It pairs automatically with your Mac, so you can get to work straightaway.
  • It features a USB-C port and includes a woven USB-C Charge Cable that lets you pair and charge by connecting to a USB-C port on your Mac.

Check the active shell and zsh configuration directory

At the prompt where Tab completion fails, run:

print -r -- $SHELL
print -r -- $ZSH_VERSION
print -r -- $ZDOTDIR

$ZSH_VERSION should show a version if that prompt is running zsh. $ZDOTDIR indicates the directory zsh uses for user startup files when it is set. These checks help identify the environment; the actual startup sequence determines which files are read.

Add a case-insensitive fallback

In the remote account’s active interactive zsh configuration, add:

Rank #2
Sale
Macally Wireless Bluetooth Keyboard for Mac - Compatible Apple Keyboard or MacBook Pro/Air, iMac - Multi-Device, Up to 3 Devices with 110 Keys, 20 Shortcuts, Numeric Keypad, and Rechargeable
  • 𝗧𝗵𝗲 𝗞𝗲𝘆𝗯𝗼𝗮𝗿𝗱 𝗧𝗵𝗮𝘁 𝗖𝗮𝗻 𝗗𝗼 𝗜𝘁 𝗔𝗹𝗹: With a rechargeable battery, sophisticated design, and multi-synch tech, our bluetooth mac keyboard offers everything you need conquer your workload. Works with Mac|PC|iOS|Android.
  • 𝗦𝗶𝗺𝘂𝗹𝘁𝗮𝗻𝗲𝗼𝘂𝘀𝗹𝘆 𝗣𝗮𝗶𝗿 𝗨𝗽 𝘁𝗼 𝟯 𝗗𝗲𝘃𝗶𝗰𝗲𝘀: Easily switch between your smart tv, laptop, and tablet on the fly with our wireless mac keyboards. Multisync can pair up to 3 bluetooth devices such as (Mac/PC/iOS/Android/TVs).
  • 𝗦𝗼𝗽𝗵𝗶𝘀𝘁𝗶𝗰𝗮𝘁𝗲𝗱 𝗔𝗽𝗽𝗹𝗲 𝗔𝗲𝘀𝘁𝗵𝗲𝘁𝗶𝗰𝘀: Finding a mac keyboard wireless that matches can be difficult, so we designed ours to fit the look. An aluminum body with thin black keys makes it the perfect wireless keyboard for macbook pro.
  • 𝗤𝘂𝗶𝗲𝘁, 𝗥𝗲𝗳𝗶𝗻𝗲𝗱, 𝗮𝗻𝗱 𝗦𝗮𝘁𝗶𝘀𝗳𝘆𝗶𝗻𝗴: The mac wireless keyboard is equipped with 110 scissor flex keys that include 20 MacOSX shortcuts and a numeric keypad. Each keystroke will be quiet and smooth.
  • 𝗘𝗻𝗷𝗼𝘆 𝟯 𝗠𝗼𝗻𝘁𝗵𝘀 𝗕𝗲𝘁𝘄𝗲𝗲𝗻 𝗖𝗵𝗮𝗿𝗴𝗲𝘀: Our rechargeable bluetooth keyboard is capable of 3 months between charge time with an average use of 3 hours per day and only requires 1 hour of charge time.
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'

The empty first entry asks zsh to try its usual case-sensitive completion. If that attempt finds no matches, the second entry retries with uppercase and lowercase letters treated as corresponding forms. This ordered fallback is documented in the Zsh Completion System manual.

The braces pair letters by case. The lowercase m means the inserted result can use the trial completion’s spelling. With uppercase M, zsh instead preserves the corresponding text typed on the command line. Avoid substituting unordered character classes such as [a-z] and [A-Z]: they do not pair letters one by one. The zsh user guide’s matching-control section explains these forms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Apple Magic Keyboard with Numeric Keypad - White
  • WIRELESS, RECHARGEABLE CONVENIENCE — Magic Keyboard with Numeric Keypad connects wirelessly to your Mac, iPad, or iPhone via Bluetooth. And the rechargeable internal battery means no loose batteries to replace.
  • WORKS WITH MAC, IPAD, OR IPHONE — It pairs quickly with your device so you can get to work right away.
  • ENHANCED TYPING EXPERIENCE — Magic Keyboard delivers a remarkably comfortable and precise typing experience. Its extended layout features document navigation controls for quick scrolling and full-size arrow keys. The numeric keypad is ideal for spreadsheets and finance applications.
  • GO WEEKS WITHOUT CHARGING — The incredibly long-lasting internal battery will power your keyboard for about a month or more between charges. (Battery life varies by use.) Comes with a Lightning to USB Cable that lets you pair and charge by connecting to a USB port on your Mac.
  • SYSTEM REQUIREMENTS — Requires a Bluetooth-enabled Mac with macOS 10.12.4 or later, an iPad with iPadOS 13.4 or later, or an iPhone or iPod touch with iOS 10.3 or later.

Choose whether normal completion should get first try

Behavior Setting What it means
Normal matching first; case-insensitive retry zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' Retains ordinary matching when it succeeds; uses the case-insensitive matcher only if the first attempt produces no matches.
Case-insensitive matching from the first attempt zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' Broadens the first matching attempt rather than waiting for a case-sensitive attempt to fail.

For most users, the fallback version is the less surprising starting point. Both forms are documented by the completion-system manual and the zsh user guide.

Apply the setting and test it

Reload the configuration

If you edited the usual remote configuration file, reload it in the current interactive shell:

Rank #4
Magic Keyboard with Touch ID and Numeric Keypad for Mac Models with Apple Silicon - US English - Black Keys
  • Magic Keyboard is available with Touch ID, providing fast, easy and secure authentication for logins and to unlock your Mac.
  • Magic Keyboard with Touch ID and Numeric Keypad delivers a remarkably comfortable and precise typing experience.
  • It features an extended layout, with document navigation controls for quick scrolling and full-size arrow keys, which are great for gaming.
  • The numeric keypad is also ideal for spreadsheets and finance applications.
  • It’s wireless and features a rechargeable battery that will power your keyboard for about a month or more between charges.
source ~/.zshrc

If ZDOTDIR points elsewhere, source the .zshrc in that directory instead. If the current session still does not reflect the setting, reconnect over SSH and test in the new session.

Test both capitalization directions

At the remote prompt, try a known completion candidate using a prefix with the opposite capitalization—for example, a lowercase prefix for a capitalized candidate, then an uppercase prefix for a lowercase candidate. Use a candidate relevant to the completion context you are testing: a filename tests file completion, while a command argument may be handled by a different completion function.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
seenda SKM64-2 Bluetooth Keyboard and Mouse Combo for Mac, MacBook and iPad
  • Wide Compatibility Tips: This Apple-focused combo supports macOS 10.12+, iPadOS 13.0+, and iOS 13.0+. It connects through 3 Bluetooth channels only, with no USB connection or USB receiver included. Note: Bluetooth 4.0 or above is required; Not fully compatible with Windows systems
  • Perfect for Apple Ecosystem Users: Designed specifically for Mac users with a standard Apple layout, this Bluetooth keyboard and mouse supports BT1/BT2/BT3 channels to seamlessly switch between three devices like Mac, MacBook Pro/Air, and iPad. Ideal for multi-device professionals, students, and creatives working across Apple products
  • Type-C Rechargeable for Eco-Friendly Convenience: No more battery waste! This combo features Type-C rechargeability with up to 200 hours standby. Auto-sleep and on/off switch minimize power consumption - perfect for travelers, eco-conscious users, and anyone tired of frequent battery changes
  • Whisper-Quiet for Focused Environments: Enjoy a satisfying tactile click without the noise. Enhanced key stability reduces sound while keeping responsiveness high. Ideal for shared offices, libraries, study sessions, or late-night work where quiet is essential
  • Slim & Stylish Metal Design for Portability: At just 0.12” (keyboard) and 0.9” (mouse), this ultra-thin combo slips easily into any bag. Made from stainless steel and premium ABS, it’s both durable and elegant—a sleek addition to any modern desk, coffee shop, or coworking space
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose cases where completion still ignores the setting

  • Verify the remote shell. Confirm the SSH account is actually running interactive zsh; a local Mac zsh setting will not affect another shell on the destination.
  • Check the startup-file location. Zsh’s documented startup sequence reads /etc/zshrc and then $ZDOTDIR/.zshrc for an interactive shell. If ZDOTDIR is unset, the zsh user guide says it defaults to $HOME. Login shells also read login-specific files. See the zsh startup and shutdown files manual.
  • Look for a more specific style. A later or context-specific matcher-list setting may affect the completion context being used. Zsh styles are selected by completion context, so a global setting may not govern every completer.
  • Account for completers that do not use matchers. The completion-system manual notes that _correct and _approximate do not use matcher specifications.
  • Separate filename globbing from completion matching. The matcher-list style controls completion behavior. Filename globbing has separate options, including NO_CASE_GLOB; toggling that option is not the general fix for command and argument completion.
  • Investigate glob patterns separately. Zsh documents restrictions on matching control when the typed word contains a glob pattern. If the problem occurs only in that situation, it may not be resolved by the ordinary completion matcher.

Keep the matcher list short. The Zsh Completion System manual gives one to three matcher-list strings as a rough rule of thumb for acceptable performance; it does not provide a measured speed or success-rate benchmark.

Quick Recap

SaleBestseller No. 1
Apple Magic Keyboard - US English ​​​​​​​, Bluetooth
Apple Magic Keyboard - US English ​​​​​​​, Bluetooth
Magic Keyboard delivers a remarkably comfortable and precise typing experience.; It pairs automatically with your Mac, so you can get to work straightaway.
$86.00
Bestseller No. 4
Magic Keyboard with Touch ID and Numeric Keypad for Mac Models with Apple Silicon - US English - Black Keys
Magic Keyboard with Touch ID and Numeric Keypad for Mac Models with Apple Silicon - US English - Black Keys
The numeric keypad is also ideal for spreadsheets and finance applications.
$164.35

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.