diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf9b099..f3179a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,16 +12,16 @@ linters: - Node / JavaScript: - [prettier](https://webinstall.dev/prettier) - ```bash + ```sh npm run prettier ``` - [jshint](https://webinstall.dev/jshint) - ```bash + ```sh npm run lint ``` - Bash - [shfmt](https://webinstall.dev/shfmt) - ```bash + ```sh npm run shfmt ``` - [shellcheck](https://webinstall.dev/shellcheck) @@ -42,7 +42,7 @@ Please **enable gpg-signing**. You can do this **in about 30 seconds**: 1. Run [`git-config-gpg`](https://webinstall.dev/git-config-gpg) from Webi: - ```bash + ```sh # On Mac & Linux curl https://webinstall.dev/git-config-gpg | bash ``` diff --git a/README.md b/README.md index 2a2af51..77e39a9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ - no messing with system permissions - in short: no nonsense -```bash +```sh curl https://webinstall.dev/webi | bash ``` @@ -97,13 +97,13 @@ You just fill in the blanks. Just create an empty directory and run the tests until you get a good result. -```bash +```sh git clone git@github.com:webinstall/packages.git pushd packages npm install ``` -```bash +```sh mkdir -p ./new-package/ node _webi/test.js ./new-package/ ``` @@ -124,7 +124,7 @@ description: | Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine --- -```bash +```sh node -e 'console.log("Hello, World!")' > Hello, World! ``` @@ -161,7 +161,7 @@ module.exports = function (request) { (optional, if needed) Bash variables that you _may_ define: -```bash +```sh # Define this if the package name is different from the command name (i.e. golang => go) pkg_cmd_name="foobar" @@ -178,7 +178,7 @@ pkg_src_cmd="$HOME/.local/opt/foobar-v$WEBI_VERSION/bin/foobar" (required) A version check function that strips all non-version junk -```bash +```sh pkg_get_current_version() { # foobar-v1.1.7 => 1.1.7 echo "$(foobar --version | head -n 1 | sed 's:foobar-v::')" @@ -187,7 +187,7 @@ pkg_get_current_version() { For the rest of the functions you can copy/paste from the examples: -```bash +```sh pkg_format_cmd_version() {} # Override, pretty prints version pkg_link # Override, replaces webi_link() @@ -214,7 +214,7 @@ See `webi/template.sh` These variables will be set by the server: -```bash +```sh WEBI_PKG=example@v1 WEBI_TAG=v1 WEBI_HOST=https://webinstall.dev @@ -231,19 +231,19 @@ WEBI_PKG_URL=https://cdn.example.com/example-macos-amd64.tar.gz WEBI_PKG_FILE=example-macos-amd64.tar.gz ``` -```bash +```sh PKG_NAME=example PKG_OSES=macos,linux,windows PKG_ARCHES=amd64,arm64,x86 PKG_FORMATS=zip,xz ``` -```bash +```sh WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-foobar.XXXXXXXX)"} WEBI_SINGLE="" ``` -```bash +```sh webi_check # Checks to see if the selected version is already installed (and re-links if so) webi_download # Downloads the selected release to $HOME/Downloads/webi/.tar.gz webi_extract # Extracts the download to /tmp/-/ diff --git a/_example/README.md b/_example/README.md index ed6a398..bde5893 100644 --- a/_example/README.md +++ b/_example/README.md @@ -33,7 +33,7 @@ install: To run foo: -```bash +```sh foo ``` @@ -41,6 +41,6 @@ foo To run foo with both bar and baz highlighting turned on: -```bash +```sh foo --bar=baz ``` diff --git a/_examples/built-with-goreleaser/README.md b/_examples/built-with-goreleaser/README.md index 076c56f..5153c3f 100644 --- a/_examples/built-with-goreleaser/README.md +++ b/_examples/built-with-goreleaser/README.md @@ -16,7 +16,7 @@ Each example has four files that need to be modified, just slightly: See [./keypairs/](/keypairs/) as an example. -```bash +```sh rsync -av ./keypairs/ ./my-project/ ``` @@ -26,7 +26,7 @@ Keypairs is packaged for Mac and Linux as `.tar.gz`, and as `.zip` for Windows. See [./arc/](/arc/) as an example. -```bash +```sh rsync -av ./arc/ ./my-project/ ``` diff --git a/_examples/compressed-with-xz/README.md b/_examples/compressed-with-xz/README.md index 5352a85..3d56834 100644 --- a/_examples/compressed-with-xz/README.md +++ b/_examples/compressed-with-xz/README.md @@ -16,7 +16,7 @@ Each example has four files that need to be modified, just slightly: See [./gitea/](/gitea/) as an example. -```bash +```sh rsync -av ./keypairs/ ./my-project/ ``` diff --git a/_npm/README.md b/_npm/README.md index 642aa07..bebce8f 100644 --- a/_npm/README.md +++ b/_npm/README.md @@ -11,7 +11,7 @@ Effortlessly install developer tools with easy-to-remember URLs. ## Install webi via npm: -```bash +```sh npm install -g webi ``` @@ -19,13 +19,13 @@ npm install -g webi Mac & Linux: -```bash +```sh curl -fsS https://webinstall.dev/node | bash ``` Windows (includes `curl.exe` and PowerShell by default): -```bash +```sh curl.exe -fsSA "MS" https://webinstall.dev/node | powershell ``` @@ -34,7 +34,7 @@ curl.exe -fsSA "MS" https://webinstall.dev/node | powershell Once `webi` is installed, you can then install commands or switch versions with webi itself: -```bash +```sh webi node@stable webi node@lts webi node@v10 diff --git a/_vim-example/README.md b/_vim-example/README.md index 8aeb5e6..069ba65 100644 --- a/_vim-example/README.md +++ b/_vim-example/README.md @@ -26,7 +26,7 @@ If there are some important key bindings, use a table like this: 1. Place EXAMPLE into your `~/.vim/pack/plugins/start`: - ```bash + ```sh mkdir -p ~/.vim/pack/plugins/start/ git clone --depth=1 https://github.com/CHANGEME/EXAMPLE.git ~/.vim/pack/plugins/start/example ``` diff --git a/awless/README.md b/awless/README.md index 6956f48..767d1f3 100644 --- a/awless/README.md +++ b/awless/README.md @@ -12,7 +12,7 @@ To update or switch versions, run `webi awless@stable` (or `@v2`, `@beta`, etc). awless is modeled after popular command-line tools such as Git. Most commands are in the form of: -```bash +```sh awless verb [entity] [parameter=value ...] ``` @@ -26,13 +26,13 @@ Unlike the standard awscli tools, `awless` aims to be more human readable. For instance, let's list some resources: -```bash +```sh awless list vpcs ``` Which outputs a friendly human readable table! -```bash +```sh | ID ▲ | NAME | DEFAULT | STATE | CIDR | |-----------------------|------|---------|-----------|---------------| | vpc-00fd208a070000000 | | false | available | 172.16.0.0/16 | @@ -42,13 +42,13 @@ Which outputs a friendly human readable table! There's also filter capabilities, in case the list is long. For example, let's list all EC2 instances with "api" in the name: -```bash +```sh awless list instances --filter name=api ``` In addition to the default table output, there's also csv, tsv, json. -```bash +```sh awless list loadbalancers --format csv ``` @@ -56,7 +56,7 @@ awless list loadbalancers --format csv awless allows specifying things by name rather than ID by using the `@` prefix. -```bash +```sh awless create subnet cidr=10.0.0.0/24 vpc=@wordpress-vpc name=wordpress-public-subnet ``` @@ -65,13 +65,13 @@ awless create subnet cidr=10.0.0.0/24 vpc=@wordpress-vpc name=wordpress-public-s If you leave out a parameter, awless will prompt you for the missing information. -```bash +```sh awless delete i-123456789000abcd ``` It will correctly detect what you were probably trying to do: -```bash +```sh Did you mean `awless delete instance ids=i-051fcef0537a53eb0` ? [Y/n] ``` diff --git a/bat/README.md b/bat/README.md index 6b29e17..b0dcf0e 100644 --- a/bat/README.md +++ b/bat/README.md @@ -25,14 +25,14 @@ You need to download and install the Update your `.bashrc`, `.zshrc`, or `.profile` -```bash +```sh alias cat="bat --style=plain" ``` For situations in which you must use `cat` exactly, remember that you can escape the alias: -```bash +```sh \cat foo ``` @@ -40,13 +40,13 @@ the alias: Take a look at the config options: -```bash +```sh bat --help ``` Check to see where your config file is: -```bash +```sh echo 'N' | bat --generate-config-file ``` diff --git a/brew/README.md b/brew/README.md index 581e4f6..6658b76 100644 --- a/brew/README.md +++ b/brew/README.md @@ -9,7 +9,7 @@ tagline: | `brew` has its own built-in upgrade management. -```bash +```sh brew update brew upgrade ``` @@ -26,27 +26,27 @@ way, report it to brew. ### How to install CLI packages -```bash +```sh brew update brew install node ``` ### How to install GUI packages -```bash +```sh brew update brew cask install docker ``` ### Where are things installed? -```bash +```sh ~/.local/opt/brew/ ``` For reference, traditional `brew` installs here: -```bash +```sh /usr/local/Cellar/ /opt/homebrew-cask/Caskroom/ ``` @@ -58,7 +58,7 @@ like `brew upgrade` or `brew update python`, and your whole system gets borked. If you need to _uninstall_ and _reinstall_ local brew: -```bash +```sh rm -rf ~/.local/opt/brew webi brew ``` @@ -67,12 +67,12 @@ If you need to _uninstall_ global brew: For _Mojave_, _Catalina_, _Big Sur_, and above: -```bash +```sh /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" ``` For _High Sierra_ and below: -```bash +```sh /bin/bash -c ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)" ``` diff --git a/caddy/README.md b/caddy/README.md index 123c1b4..75165bd 100644 --- a/caddy/README.md +++ b/caddy/README.md @@ -25,7 +25,7 @@ Here's the things we find most useful: ### How to serve a directory -```bash +```sh caddy file-server --browse --listen :4040 ``` @@ -91,7 +91,7 @@ example.com { ### How to run caddy -```bash +```sh caddy run --config ./Caddyfile ``` @@ -112,7 +112,7 @@ Using a user named `app` to run your services is common industry convention. You can use `setcap` to allow Caddy to use privileged ports. -```bash +```sh sudo setcap cap_net_bind_service=+ep $(readlink -f $(command -v caddy)) ``` @@ -123,13 +123,13 @@ start the appropriate systemd launcher for Linux. Install Serviceman with Webi: -```bash +```sh webi serviceman ``` Use Serviceman to create a _systemd_ config file. -```bash +```sh sudo env PATH="$PATH" \ serviceman add --system --username $(whoami) --name caddy -- \ caddy run --config ./Caddyfile @@ -138,7 +138,7 @@ sudo env PATH="$PATH" \ This will create `/etc/systemd/system/caddy.service`, which can be managed with `systemctl`. For example: -```bash +```sh sudo systemctl restart caddy ``` @@ -155,13 +155,13 @@ start the appropriate service launcher file for MacOS. Install Serviceman with Webi: -```bash +```sh webi serviceman ``` Use Serviceman to create a _launchd_ plist file. -```bash +```sh serviceman add --username $(whoami) --name caddy -- \ caddy run --config ./Caddyfile ``` @@ -169,7 +169,7 @@ serviceman add --username $(whoami) --name caddy -- \ This will create `~//Library/LaunchAgents/caddy.plist`, which can be managed with `launchctl`. For example: -```bash +```sh launchctl unload -w "$HOME/Library/LaunchAgents/caddy.plist" launchctl load -w "$HOME/Library/LaunchAgents/caddy.plist" ``` @@ -195,20 +195,20 @@ the appropriate service launcher for Windows. Install Serviceman with Webi: -```bash +```sh webi.bat serviceman ``` Use Serviceman to create a Startup entry in the Windows Registry: -```bash +```sh serviceman.exe add --name caddy -- \ caddy run --config ./Caddyfile ``` You can manage the service directly with Serviceman. For example: -```bash +```sh serviceman stop caddy serviceman start caddy ``` diff --git a/chromedriver/README.md b/chromedriver/README.md index e51f168..ec50741 100644 --- a/chromedriver/README.md +++ b/chromedriver/README.md @@ -24,7 +24,7 @@ Also, **Chrome must be installed first** in order for ChromeDriver to work. On Debian (and Ubuntu) Linux you should be able to install Chrome with `dpkg` and `apt`: -```bash +```sh wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome-stable_current_amd64.deb sudo apt install -y google-chrome-stable @@ -39,7 +39,7 @@ chromedriver: error while loading shared libraries: libnss3.so: cannot open shar If so, try installing `chromium-browser`: -```bash +```sh sudo apt install -y chromium-browser sudo apt --fix-broken install -y ``` diff --git a/comrak/README.md b/comrak/README.md index 26f681f..d4ffd5e 100644 --- a/comrak/README.md +++ b/comrak/README.md @@ -14,7 +14,7 @@ etc). > Flavored Markdown Spec: Tables, Task list items, Strikethrough, Autolinks, & > Disallowed Raw HTML -```bash +```sh comrak --gfm index.md > index.html ``` @@ -28,7 +28,7 @@ Here you'll learn how to: ## How to Convert Markdown to HTML -```bash +```sh comrak --gfm --header-ids '' README.md > README.html ``` @@ -39,7 +39,7 @@ defaults to always include your favorite options. Here's what I suggest: -```bash +```sh echo "--gfm --header-ids ''" > ~/.config/comrak/config ``` @@ -62,7 +62,7 @@ Example: Then, to sanitize `