From bec635778e71b06e162444d0aa8a137a51848b36 Mon Sep 17 00:00:00 2001 From: Sarah Connor <14093193+terminatingcode@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:32:50 +0000 Subject: [PATCH 1/4] Add README --- README | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..468dfc1 --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +# A quick guide to this Setup + +Brewfile: uses [Brewfile](https://thoughtbot.com/blog/brewfile-a-gemfile-but-for-homebrew) which is a handy bundler for all your brew needs + +NeoVim plugins: neovim plugins pulled from [Luan/nvim](https://github.com/luan/nvim) From 9d5b53cf1e1615abb92412cd4a01575886a50181 Mon Sep 17 00:00:00 2001 From: Sarah Connor <14093193+terminatingcode@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:40:22 +0000 Subject: [PATCH 2/4] suffix for README --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 31989631397c21dc68c41bebf507294fd0eeb365 Mon Sep 17 00:00:00 2001 From: Sarah Connor <14093193+terminatingcode@users.noreply.github.com> Date: Fri, 19 May 2023 08:17:31 +0100 Subject: [PATCH 3/4] Switch to zsh and pair down dependencies --- .bash_profile | 42 -------------------- .gitconfig | 2 +- .gitmodules | 3 -- .inputrc | 10 ----- .zshrc | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++ Brewfile | 30 -------------- setup.sh | 69 -------------------------------- 7 files changed, 107 insertions(+), 155 deletions(-) delete mode 100755 .bash_profile delete mode 100644 .gitmodules delete mode 100644 .inputrc create mode 100644 .zshrc diff --git a/.bash_profile b/.bash_profile deleted file mode 100755 index 780a6bc..0000000 --- a/.bash_profile +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC1090,SC1091 - -export PATH="/usr/local/bin:$PATH" - -# Path to the bash it configuration -export BASH_IT="$HOME/.bash_it" - -# Lock and Load a custom theme file -export BASH_IT_THEME="minimal" -export THEME_SHOW_CLOCK_CHAR="false" - -# Load Bash It -source "$BASH_IT/bash_it.sh" - -# Configure history -shopt -s histappend # Append to .bash_history file rather than overwriting - -export PATH="$HOME/bin:$PATH" -export PATH="$HOME/go/bin:$PATH" -export PATH="/usr/local/sbin:$PATH" - -# eval local ruby version -export PATH="$HOME/.rbenv/shims:$PATH" -eval "$(rbenv init -)" - -# Set my editor and git editor -export EDITOR="nvim" -export GIT_EDITOR="nvim" - -export LPASS_AGENT_TIMEOUT=32400 # lpass agent will logout 9 hours after logging in - -if [ -f ~/.aliases ]; then - source ~/.aliases -fi - -# jump -[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . "$(brew --prefix)/etc/profile.d/autojump.sh" - -# direnv -eval "$(direnv hook bash)" - diff --git a/.gitconfig b/.gitconfig index d90f54c..ae312c5 100644 --- a/.gitconfig +++ b/.gitconfig @@ -9,7 +9,6 @@ st = status di = diff co = checkout - ci = duet-commit --verbose c = commit --verbose br = branch sta = stash @@ -56,3 +55,4 @@ followRedirects = true [user] email = 14093193+terminatingcode@users.noreply.github.com + name = Sarah Connor diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 1bc9e9b..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule ".bash_it"] - path = .bash_it - url = https://github.com/Bash-it/bash-it.git diff --git a/.inputrc b/.inputrc deleted file mode 100644 index f63e462..0000000 --- a/.inputrc +++ /dev/null @@ -1,10 +0,0 @@ - -# When pressing up or down arrows, -# show only history entries that match what was already typed -"\e[A":history-search-backward -"\e[B":history-search-forward - -# Turn on case insensitivity for tab-completion -# Ex.: type "doc" to search for "Documents" -set completion-ignore-case On - diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..8928f1d --- /dev/null +++ b/.zshrc @@ -0,0 +1,106 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="robbyrussell" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +##### BINDINGS +bindkey "^R" history-incremental-search-backward +bindkey "\e[A" history-beginning-search-backward +bindkey "\e[B" history-beginning-search-forward diff --git a/Brewfile b/Brewfile index 7d25bf1..5605fbd 100644 --- a/Brewfile +++ b/Brewfile @@ -1,49 +1,23 @@ tap 'homebrew/bundle' tap 'homebrew/core' -brew 'ag' brew 'autojump' -brew 'bash' brew 'bat' brew 'coreutils' brew 'diff-so-fancy' brew 'direnv' -brew 'fd' -brew 'gdb' -brew 'gh' -brew 'git-crypt' brew 'go' -brew 'gpg' brew 'gti' -brew 'hg' brew 'jq' -brew 'lastpass-cli' -brew 'npm' brew 'nvim' -brew 'ripgrep' brew 'shellcheck' -brew 'sshuttle' -brew 'terraform' brew 'wget' brew 'yq' brew 'watch' brew 'tmux' -brew 'postgresql' -cask '1password-cli' -cask 'docker' cask 'flycut' -cask 'gpg-suite' cask 'iterm2' -cask 'postman' -cask 'virtualbox' -cask 'vagrant' - -tap 'heroku/brew' -brew 'heroku' - -tap 'git-duet/tap' -brew 'git-duet' tap 'neovim/neovim' brew 'neovim' @@ -53,7 +27,3 @@ brew 'cmake' tap 'universal-ctags/universal-ctags' brew 'universal-ctags', args: ['HEAD'] -tap 'heroku/brew' -brew 'heroku' - - diff --git a/setup.sh b/setup.sh index 65fe9b5..a71a145 100755 --- a/setup.sh +++ b/setup.sh @@ -2,31 +2,6 @@ set -eo pipefail -function update_bash_it { - echo "update bash-it" - git submodule update --init - - "$HOME/.bash_it/install.sh" --silent --no-modify-config - - set +e - export BASH_IT="$HOME/.bash_it" - # shellcheck disable=1090 - source "$HOME/.bash_it/bash_it.sh" - set -e -} - -function configure_bash_it { - echo "configure bash-it" - set +e - for completion in bash-it brew docker git ssh terraform; do - bash-it enable completion $completion - done - - # shellcheck disable=SC1090 - source "$HOME/.bash_profile" - set -e -} - function ensure_brew_exists { echo "ensuring brew exists" if [[ ! -x /usr/local/bin/brew ]] ; then @@ -48,25 +23,6 @@ function update_brew_bundle { set -e } -function ensureLatestBashShell { - if [[ ! $SHELL = "/usr/local/bin/bash" ]] ; then - echo "changing shell to bash" - if ! grep -q /usr/local/bin/bash /private/etc/shells ; then - echo "adding bash ${bash --version} to /etc/shells" - echo $(brew --prefix)/bin/bash | sudo tee -a /private/etc/shells - fi - chsh -s /usr/local/bin/bash - fi -} - -function install_golang { - echo "installing Go" - local version="1.19.3" - gimme $version - # shellcheck disable=SC1090 - source "$HOME/.gimme/envs/go$version.env" -} - function install_luanvim { echo "Ensuring that we have neovim python plugins..." pip3 install neovim @@ -77,35 +33,10 @@ function install_luanvim { fi } -function install_cred_alert_cli { - if ! curl -f "https://s3.amazonaws.com/cred-alert/cli/current-release/cred-alert-cli_darwin" > "$HOME/bin/cred-alert-cli"; then - echo -n "Failed to get the most recent version of the cred-alert-cli, continuing..." - fi - - chmod +x "$HOME/bin/cred-alert-cli" - cred-alert-cli update -} - -function install_ginkgo_gomega { - go install github.com/onsi/ginkgo/v2/ginkgo@latest -} - -function install_code_extensions { - code --install-extension esbenp.prettier-vscode - code --install-extension dbaeumer.vscode-eslint - code --install-extension jebbs.platnuml -} - function main { - update_bash_it - configure_bash_it ensure_brew_exists update_brew_bundle - ensureLatestBashShell - install_golang install_luanvim - install_cred_alert_cli - install_ginkgo_gomega echo "All done 🥳" } From 389b023b983e3a9a7cd2c0500e7398210b9e8e76 Mon Sep 17 00:00:00 2001 From: Sarah Connor <14093193+terminatingcode@users.noreply.github.com> Date: Sat, 10 Jan 2026 13:11:45 +0000 Subject: [PATCH 4/4] update script to remove redundant bundle and taps --- .zshrc | 2 ++ Brewfile | 6 ------ setup.sh | 26 +++++++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.zshrc b/.zshrc index 8928f1d..237a509 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,5 @@ +[ -f /opt/homebrew/etc/profile.d/autojump.sh ] && . /opt/homebrew/etc/profile.d/autojump.sh + # If you come from bash you might have to change your $PATH. # export PATH=$HOME/bin:/usr/local/bin:$PATH diff --git a/Brewfile b/Brewfile index 5605fbd..ca4bc05 100644 --- a/Brewfile +++ b/Brewfile @@ -1,6 +1,3 @@ -tap 'homebrew/bundle' -tap 'homebrew/core' - brew 'autojump' brew 'bat' brew 'coreutils' @@ -24,6 +21,3 @@ brew 'neovim' # implicit dependency of neovim brew 'cmake' -tap 'universal-ctags/universal-ctags' -brew 'universal-ctags', args: ['HEAD'] - diff --git a/setup.sh b/setup.sh index a71a145..f1a785c 100755 --- a/setup.sh +++ b/setup.sh @@ -12,8 +12,6 @@ function ensure_brew_exists { function update_brew_bundle { echo "updating brew bundle" brew update - brew tap Homebrew/bundle - if [ -f '/usr/local/bin/gpg-agent' ]; then rm /usr/local/bin/gpg-agent fi @@ -23,21 +21,27 @@ function update_brew_bundle { set -e } -function install_luanvim { - echo "Ensuring that we have neovim python plugins..." - pip3 install neovim - echo "installing luanvim..." - if [[ ! -d "$HOME/.config/nvim" ]] ; then - git clone https://github.com/luan/vimfiles.git ~/.vim - git clone https://github.com/luan/nvim ~/.config/nvim +function install_oh_my_zsh { + echo "installing oh my zsh" + if [ -d ~/.oh-my-zsh ]; then + echo "oh my zsh already installed 👍" + else + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" fi } +function move_dot_files { + echo "symlinking dot files to home" + ln -s ~/setup/.aliases ~/.aliases + ln -s ~/setup/.gitconfig ~/.gitconfig + ln -s ~/setup/.zshrc ~/.zshrc +} + function main { ensure_brew_exists + install_oh_my_zsh update_brew_bundle - install_luanvim - + move_dot_files echo "All done 🥳" }