diff --git a/content/github-cli/github-cli/creating-github-cli-extensions.md b/content/github-cli/github-cli/creating-github-cli-extensions.md index 6c3cb4783f..517999778c 100644 --- a/content/github-cli/github-cli/creating-github-cli-extensions.md +++ b/content/github-cli/github-cli/creating-github-cli-extensions.md @@ -48,7 +48,7 @@ You can use the `gh extension create` command to create a project for your exten 1. Write your script in the executable file. For example: ```bash - #!/bin/bash + #!/usr/bin/env bash set -e exec gh api user --jq '"You are @\(.login) (\(.name))."' ``` @@ -84,7 +84,7 @@ All command line arguments following a `gh my-extension-name` command will be pa For example, this script handles multiple flags. When the script is called with the `-h` or `--help` flag, the script prints help text instead of continuing execution. When the script is called with the `--name` flag, the script sets the next value after the flag to `name_arg`. When the script is called with the `--verbose` flag, the script prints a different greeting. ```bash -#!/bin/bash +#!/usr/bin/env bash set -e verbose="" @@ -149,4 +149,4 @@ For more information, see [`gh help formatting`](https://cli.github.com/manual/g ## Next steps -To see more examples of {% data variables.product.prodname_cli %} extensions, look at [repositories with the `gh-extension` topic](https://github.com/topics/gh-extension). \ No newline at end of file +To see more examples of {% data variables.product.prodname_cli %} extensions, look at [repositories with the `gh-extension` topic](https://github.com/topics/gh-extension).