pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://zed.dev/docs/reference/../development/../languages/../migrate/../languages/./sh.html

="../favicon.png">
Download

Shell Scripts

Shell Scripts (bash, zsh, dash, sh) are supported natively by Zed.

Settings

Configure settings in Settings (cmd-,|ctrl-,) under Languages > Shell Script, or add to your settings file:

  "languages": {
    "Shell Script": {
      "tab_size": 2,
      "hard_tabs": false
    }
  }

Formatting

Zed supports auto-formatting Shell Scripts using external tools like shfmt.

  1. Install shfmt:
brew install shfmt            # macos (homebrew)
sudo apt-get install shfmt    # debian/ubuntu
dnf install shfmt             # fedora
yum install shfmt             # redhat
pacman -Sy shfmt              # archlinux
choco install shfmt           # windows (chocolatey)
  1. Ensure shfmt is available in your path and check the version:
which shfmt
shfmt --version
  1. Configure formatting in Settings (cmd-,|ctrl-,) under Languages > Shell Script, or add to your settings file:
  "languages": {
    "Shell Script": {
      "format_on_save": "on",
      "formatter": {
        "external": {
          "command": "shfmt",
          // Change `--indent 2` to match your preferred tab_size
          "arguments": ["--filename", "{buffer_path}", "--indent", "2"]
        }
      }
    }
  }

See also:

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy