Skip to content

Commit 17e2944

Browse files
committed
Modify installation section.
1 parent 1c1212e commit 17e2944

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,38 @@ MSI installers are available on the [releases page][].
5252

5353
### Other platforms
5454

55-
Install a prebuilt binary from the [releases page][] or source compile by running `make` from the
56-
project directory.
55+
Install a prebuilt binary from the [releases page][]
56+
57+
### Build from source
58+
59+
1. Clone cli into `~/.githubcli`
60+
```
61+
$ git clone https://github.com/cli/cli.git ~/.githubcli
62+
```
63+
64+
2. Compile
65+
```
66+
$ cd ~/.githubcli && make
67+
```
68+
69+
3. Add `~/.githubcli/bin` to your $PATH for access to the gh command-line utility.
70+
71+
* For **bash**:
72+
~~~ bash
73+
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.bash_profile
74+
~~~
75+
76+
* For **Zsh**:
77+
~~~ zsh
78+
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.zshrc
79+
~~~
80+
81+
* For **Fish shell**:
82+
~~~ fish
83+
$ set -Ux fish_user_paths $HOME/.githubcli/bin $fish_user_paths
84+
~~~
85+
86+
4. Restart your shell so that PATH changes take effect.
5787

5888
<!-- TODO eventually we'll have https://cli.github.com/manual -->
5989
[docs]: https://cli.github.io/cli/gh

0 commit comments

Comments
 (0)