Answer: Install shfmt, ensure it is available in your path, then configure formatting in Settings under Languages > Shell Script (or in your settings file) by setting format_on_save to "on" and the formatter to the external command shfmt with arguments ["--filename", "{buffer_path}", "--indent", "2"]. Status: Overdue (check was due 2026-11-20T13:43:22Z and has not succeeded) Entry: tool/zed/settings/enable-shell-script-auto-formatting Revision: 1 Digest: sha256:bfb1d73bf93d40c7 (changes whenever the content changes) Timeline: Created: 2026-11-13T04:04:55Z Last changed: 2026-11-13T04:04:55Z Last verified: 2026-11-19T13:43:22Z Next check: 2026-11-20T13:43:22Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of formatter command | shfmt | [1] | 2026-11-19 format_on_save setting | on | [1] | 2026-11-19 formatter arguments | ["--filename", "{buffer_path}", "--indent", "2"] | [1] | 2026-11-19 settings location | Languages > Shell Script | [1] | 2026-11-19 install command (macos) | brew install shfmt | [1] | 2026-11-19 Sources: [1] Zed Industries. "zed.dev/docs/languages/sh.md". https://zed.dev/docs/languages/sh.md Role: primary. Accessed: 2026-11-19T13:43:22Z Quote: ""command": "shfmt"" (Supports: formatter command) Quote: ""format_on_save": "on"" (Supports: format_on_save setting) Quote: ""arguments": ["--filename", "{buffer_path}", "--indent", "2"]" (Supports: formatter arguments) Quote: "under Languages > Shell Script" (Supports: settings location) Quote: "brew install shfmt # macos (homebrew)" (Supports: install command (macos)) Snapshot SHA-256: 795aec02904d07a032bca5a4678ef89aaf5c28ddf0ad78738e09a7446722268c (captured 2026-11-13T04:04:55Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T04:04:55Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:43:22Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:43:22Z Last attempt: 2026-11-19T13:43:22Z Notes and limitations: Extracted automatically from a single official source (section "Formatting"). Human-readable page: https://zed.dev/docs/languages/sh.html Related: https://latestn.com/tool/zed/settings/enable-sql-auto-formatting How do I enable auto-formatting for SQL files in Zed? https://latestn.com/tool/zed/settings/enable-tailwind-intellisense-in-css How do I enable Tailwind CSS IntelliSense in CSS files in Zed? https://latestn.com/tool/zed/settings/enable-tailwind-language-server-gleam How do I enable the Tailwind CSS language server for Gleam files in Zed? https://latestn.com/tool/zed/settings/enable-podman-dev-containers How do I enable Podman for Dev Containers in Zed? https://latestn.com/tool/zed/settings/enable-prefill-required-fields How do I enable prefillRequiredFields for Terraform in Zed? https://latestn.com/tool/zed/settings/enable-semantic-tokens How do I enable semantic tokens in Zed? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T04:04:55Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/zed/settings/enable-shell-script-auto-formatting/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/zed/settings/enable-shell-script-auto-formatting POST: https://latestn.com/dispute/tool/zed/settings/enable-shell-script-auto-formatting with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/zed/settings/enable-shell-script-auto-formatting?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I enable auto-formatting for Shell Scripts in Zed? Revision 1, last verified 2026-11-19T13:43:22Z. https://latestn.com/tool/zed/settings/enable-shell-script-auto-formatting (accessed 2026-11-21T09:53:14Z). @misc{LatestN_tool_zed_settings_enable_shell_script_auto_formatting_r1, title = {How do I enable auto-formatting for Shell Scripts in Zed?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/zed/settings/enable-shell-script-auto-formatting}}, note = {Revision 1; digest sha256:bfb1d73bf93d40c7; last verified 2026-11-19T13:43:22Z; accessed 2026-11-21T09:53:14Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/zed/settings/enable-shell-script-auto-formatting