File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/zsh
2
+
3
+ if ! [ -x " $( command -v brew) " ]; then
4
+ if ! [ -z " $YES " ] || read -q " choice?Homebrew not installed or not on path. Install? (Press Y/y): " ; then
5
+ echo " Installing Homebrew"
6
+ /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
7
+
8
+ if ! [ -x " $( command -v brew) " ]; then
9
+ echo " Homebrew not on path. Using a default."
10
+ if [[ " $( arch) " == " arm64" ]]; then
11
+ BREW=" /opt/homebrew/bin/brew"
12
+ else
13
+ BREW=" /usr/local/bin/brew"
14
+ fi
15
+ else
16
+ BREW=" brew"
17
+ fi
18
+
19
+ else
20
+ exit 1
21
+ fi
22
+ else
23
+ BREW=" brew"
24
+ fi
25
+
26
+ " $BREW " install gh
27
+
28
+ gh auth login
29
+ gh extension install github/gh-copilot
30
+
31
+ echo " Example command explanation"
32
+ gh copilot explain " brew install bazel"
Original file line number Diff line number Diff line change @@ -136,3 +136,6 @@ function colorwheel() {
136
136
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
137
137
138
138
[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh
139
+ if type " gh" > /dev/null; then
140
+ eval " $( gh copilot alias -- zsh) "
141
+ fi
You can’t perform that action at this time.
0 commit comments