zshify 13.3.1 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/script.zsh +23 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Installation is done using the [`npx`](https://docs.npmjs.com/getting-started/in
|
|
|
12
12
|
npx zshify
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Alternatively, you can install using
|
|
15
|
+
Alternatively, you can install using `/bin/zsh -c "$(curl -fsSL https://rdt.li/zshify)"` command.
|
|
16
16
|
|
|
17
17
|
Yeah that's it, no downloads, no hassle. A minimalistic installation for a minimalistic package.
|
|
18
18
|
|
package/bin/script.zsh
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
#!/bin/zsh
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
git clone https://github.com/nrjdalal/zshify.git "$temp_dir" &>/dev/null
|
|
5
|
-
curl -s https://raw.githubusercontent.com/nrjdalal/pglaunch/main/bin/fx.sh | cat >"$temp_dir/config/postgres.zsh"
|
|
6
|
-
mkdir -p ~/.zshify
|
|
7
|
-
rsync -a --delete "$temp_dir"/ ~/.zshify/
|
|
8
|
-
rm -rf "$temp_dir"
|
|
9
|
-
|
|
10
|
-
for config in prompt background fx alias plugins user postgres; do
|
|
11
|
-
grep "source ~/.zshify/config/${config}.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/${config}.zsh" >>~/.zshrc
|
|
12
|
-
done
|
|
3
|
+
echo && command git -v &>/dev/null
|
|
13
4
|
|
|
14
|
-
|
|
15
|
-
echo "
|
|
16
|
-
|
|
5
|
+
if [ $? -ne 0 ]; then
|
|
6
|
+
echo "Git is not available. Please Xcode Command Line Tools first!"
|
|
7
|
+
xcode-select --install &>/dev/null
|
|
17
8
|
echo
|
|
18
|
-
|
|
9
|
+
return 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
if ! command -v brew &>/dev/null; then
|
|
13
|
+
echo "You can not brew without the homebrew. Installing homebrew!"
|
|
19
14
|
echo
|
|
20
15
|
echo "--- $(tput setaf 6)/bin/bash -c \"\$(curl -fsSL https://rdt.li/homebrew)\"$(tput sgr0) ---"
|
|
16
|
+
echo
|
|
17
|
+
grep 'eval "$(/opt/homebrew/bin/brew shellenv)"' ~/.zshrc &>/dev/null || echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>~/.zshrc
|
|
21
18
|
fi
|
|
19
|
+
|
|
20
|
+
TEMP_DIR=$(mktemp -d)
|
|
21
|
+
|
|
22
|
+
git clone https://github.com/nrjdalal/zshify "$TEMP_DIR" &>/dev/null
|
|
23
|
+
rsync -a --delete "$TEMP_DIR"/ ~/.zshify/
|
|
24
|
+
|
|
25
|
+
for config in prompt background fx alias plugins user; do
|
|
26
|
+
grep "source ~/.zshify/config/${config}.zsh" ~/.zshrc &>/dev/null || echo "source ~/.zshify/config/${config}.zsh" >>~/.zshrc
|
|
27
|
+
done
|
|
28
|
+
|
|
29
|
+
echo "-------------- $(tput setaf 2)zshify successfully installed!$(tput sgr0) --------------"
|
|
22
30
|
echo
|
|
23
|
-
echo "
|
|
31
|
+
echo "It is recommended to reload the shell, run $(tput setaf 3)exec zsh$(tput sgr0) to do so"
|
|
24
32
|
echo
|
|
25
33
|
|
|
26
34
|
[ -f ~/.zshrc ] && grep -vxFf ~/.zshify/config/user.zsh ~/.zshrc >~/.zshrc.tmp && mv ~/.zshrc.tmp ~/.zshrc
|