From 0883d770cb6a6e98b7073e71aed3d06eb03e34d9 Mon Sep 17 00:00:00 2001 From: Yasmin Teles Date: Sun, 17 Mar 2024 13:56:04 -0300 Subject: [PATCH] feat: add shell config command --- Makefile | 6 +++++- README.md | 8 -------- install.sh | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index c931239..594838c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help check_clean del ssh backup check-scripts +.PHONY: help check_clean del ssh zsh backup check-scripts help: ## Show help. @printf "A set of environment management commands.\n" @@ -18,6 +18,10 @@ del: check_clean ## Delete your development environment. @rm -rf ~/.oh-my-zsh @brew uninstall --force $(shell brew list) +zsh: ## Change shell to zsh mode + @chsh -s $(which zsh) + @echo "My current shell is $(SHELL)." + ssh: ## Copy the SSH public key to your clipboard. @pbcopy < ~/.ssh/id_ed25519.pub @echo "The SSH public key is available in your clipboard." diff --git a/README.md b/README.md index 012807f..67227c3 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,6 @@ Insert this into a macOS Terminal or Linux shell prompt. The script will detail /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/YasminTeles/dotfiles/main/install.sh)" ``` -### Post-Installation - -Add the SSH public key to your account on GitHub or GitLab. Use `make ssh` to copy the SSH public key to your clipboard. - -```bash - make ssh -``` - ## What's included? All my command-line tools, applications, and their configurations. Have fun 😎💅 diff --git a/install.sh b/install.sh index 7628fb8..79ae7ad 100644 --- a/install.sh +++ b/install.sh @@ -3,6 +3,7 @@ # Tells the shell script to exit if it encounters an error set -e +# Print a step description TOTAL_STEPS=7 STEP=1 function step_msg { @@ -46,7 +47,6 @@ brew bundle install --file=~/Brewfile # -- Oh My Zsh ----------------------------------------------------------------- step_msg "Installing the Oh My Zsh" -# chsh -s $(which zsh) sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended rm -rf ~/.zshrc stow --dotfiles zsh @@ -67,6 +67,7 @@ ssh-add ~/.ssh/id_ed25519 echo -e "\n" title_msg "Next steps:" echo -e "- Run \033[1mmake ssh\033[0m to copy your SSH public Key and past it into your GitHub or GitLab account." +echo -e "- Run \033[1mmake zsh\033[0m to change your shell to zsh mode." # -- Happy end ----------------------------------------------------------------- printf "\n\nSuccess: Everything is ready!"