Last active
November 3, 2021 03:53
-
-
Save bronze/7329f488dbe17a3f179ce7a41942176e to your computer and use it in GitHub Desktop.
Zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/bronze/.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="spaceship" | |
# 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 the following line to disable bi-weekly auto-update checks. | |
# DISABLE_AUTO_UPDATE="true" | |
# Uncomment the following line to automatically update without prompting. | |
# DISABLE_UPDATE_PROMPT="true" | |
# Uncomment the following line to change how often to auto-update (in days). | |
# export UPDATE_ZSH_DAYS=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. | |
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work) | |
# See https://github.com/ohmyzsh/ohmyzsh/issues/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 fast-syntax-highlighting zsh-autosuggestions) | |
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" | |
SPACESHIP_PROMPT_ADD_NEWLINE="false" | |
SPACESHIP_PROMPT_SEPARATE_LINE="false" | |
if [[ "$TERM_PROGRAM" == "Hyper" ]]; then | |
SPACESHIP_PROMPT_SEPARATE_LINE=false | |
SPACESHIP_DIR_SHOW=false | |
SPACESHIP_GIT_BRANCH_SHOW=false | |
fi | |
alias ls='ls --color' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a `.zsh` directory to store our plugins in one place | |
mkdir ~/.zsh | |
# Clone repo to `~/.zsh/` directory | |
cd ~/.zsh && git clone https://github.com/zdharma/fast-syntax-highlighting.git | |
# Enable 'fast-syntax-highlighting' plugin in ZSH | |
echo "source $HOME/.zsh/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh" >> ~/.zshrc | |
# Reload ZSH | |
source ~/.zshrc | |
--- | |
# Download completion config | |
cd ~/.zsh && wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/lib/completion.zsh | |
# Enable 'completion' plugin in ZSH | |
echo "source $HOME/.zsh/completion.zsh" >> ~/.zshrc | |
--- | |
# Download 'zsh-autosuggestions' plugin | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
# Reload ZSH | |
source ~/.zshrc | |
--- | |
# Download history config | |
cd ~/.zsh && wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/lib/history.zsh | |
# Enable 'history' config in ZSH | |
echo "source $HOME/.zsh/history.zsh" >> ~/.zshrc | |
# Reload ZSH | |
source ~/.zshrc | |
--- | |
# Download key bindings config | |
cd ~/.zsh && wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/lib/key-bindings.zsh | |
# Enable 'key-bindings' config in ZSH | |
echo "source $HOME/.zsh/key-bindings.zsh" >> ~/.zshrc | |
# Reload ZSH | |
source ~/.zshrc | |
--- | |
touch aliases.zsh | |
echo "source $HOME/.zsh/aliases.zsh" >> ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 | |
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" | |
git clone https://github.com/zdharma/fast-syntax-highlighting.git \ | |
${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
echo "source $HOME/.zsh/history.zsh" >> ~/.zshrc | |
// checkout https://tjay.dev/howto-my-terminal-shell-setup-hyper-js-zsh-starship/ | |
// for some more commands and misc | |
// archive @ https://archive.ph/IhoN9 | |
// also https://www.ivaylopavlov.com/setting-up-windows-terminal-wsl-and-oh-my-zsh/#install_windows_terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------- | |
# edit zsh configs | |
# ------------------------------------------------------------------- | |
alias aliases="code ~/.zsh/aliases.zsh" | |
alias config="code ~/.zsh/aliases.zsh" | |
alias zshconfig="code ~/.zshrc && reload" | |
alias reload=". ~/.zshrc && echo 'ZSH config reloaded from ~/.zshrc'" | |
#alias httpd="code /usr/local/etc/httpd/httpd.conf" | |
#alias vhosts="code /usr/local/etc/httpd/extra/httpd-vhosts.conf" | |
#alias vhosts="subl /Users/bronze/Sites/httpd-vhosts.conf" | |
alias gogogadget="/Users/bronze/Sites/terminal_updates.zsh" | |
# ------------------------------------------------------------------- | |
# directory movement | |
# ------------------------------------------------------------------- | |
alias dev="cd ~/Sites/" | |
alias desktop="cd ~/Desktop" | |
# ------------------------------------------------------------------- | |
# directory movement | |
# ------------------------------------------------------------------- | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
autoload -U colors | |
colors | |
echo $fg_bold[green] "1/7 brew update"$fg_no_bold[default] | |
brew update | |
echo $fg_bold[green] "2/7 brew upgrade"$fg_no_bold[default] | |
brew upgrade | |
echo $fg_bold[green] "3/7 brew cleanup"$fg_no_bold[default] | |
brew cleanup | |
#brew prune | |
#Warning: Calling 'brew prune' is deprecated! Use 'brew cleanup' instead. | |
#now diagnotic | |
echo $fg_bold[green] "4/7 brew doctor"$fg_no_bold[default] | |
brew doctor | |
echo $fg_bold[green] "5/7 brew missing"$fg_no_bold[default] | |
brew missing | |
echo $fg_bold[green] "6/7 composer global update"$fg_no_bold[default] | |
composer global update | |
# brew install mas | |
# https://github.com/mas-cli/mas/issues/183 | |
# sudo mkdir -p /usr/local/Frameworks | |
# sudo chown $USER /usr/local/Frameworks | |
# brew link mas | |
echo $fg_bold[green] "7/7 checking outdated apps from the app store"$fg_no_bold[default] | |
mas outdated | |
echo $fg_bold[green] "install with: mas upgrade"$fg_no_bold[default] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment