From 2c4c8819d87e11d328a20ea4d328d8e7cbd574d3 Mon Sep 17 00:00:00 2001 From: Adam Lamers Date: Wed, 15 Nov 2023 21:59:29 -0500 Subject: [PATCH] cleanup --- bash_profile | 13 +++++------- common_shell_functions | 4 ++++ zshrc | 45 ++++++++---------------------------------- 3 files changed, 17 insertions(+), 45 deletions(-) diff --git a/bash_profile b/bash_profile index 920f887..302aaf8 100644 --- a/bash_profile +++ b/bash_profile @@ -18,19 +18,17 @@ if [ -f "$(which git)" ] && [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi +if [ -f /usr/bin/vim ]; then + export EDITOR=vim +fi + export CLICOLOR=1 export LSCOLORS=ExFxBxDxCxegedabagacad -export EDITOR=vim - -function title { - echo -ne "\033]0;"$*"\007" -} - export HISTFILESIZE=200000 export HISTSIZE=10000 shopt -s histappend shopt -s cmdhist -export HISTCONTROL=ignoredups +export HISTCONTROL=ignoreboth export HISTIGNORE="&:ls:[bf]g:exit" if [ -f ~/.common_shell_functions ]; then @@ -58,4 +56,3 @@ _complete_ssh_hosts () complete -F _complete_ssh_hosts ssh complete -F _complete_ssh_hosts scp -. "$HOME/.cargo/env" diff --git a/common_shell_functions b/common_shell_functions index ebe7d99..031b55a 100644 --- a/common_shell_functions +++ b/common_shell_functions @@ -191,3 +191,7 @@ function autosetup() { fi unset IS_LINUX DETECTED_DISTRO } + +function title { + echo -ne "\033]0;"$*"\007" +} diff --git a/zshrc b/zshrc index 22017c5..e026c5a 100644 --- a/zshrc +++ b/zshrc @@ -10,15 +10,15 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" fi -#Source local aliases -if [[ -f ~/.bash_aliases ]]; then - . ~/.bash_aliases -fi - bindkey -v - -export EDITOR=/usr/local/bin/vim -export VISUAL=/usr/local/bin/vim +export EDITOR=/usr/bin/vim +export VISUAL=/usr/bin/vim +export HISTSIZE=10000 +export HISTFILESIZE=1000000000 +export HISTFILE=~/.zhistory +setopt INC_APPEND_HISTORY +setopt EXTENDED_HISTORY +setopt HIST_FIND_NO_DUPS #Setup custom hotkeys for zsh modes bindkey -M viins 'kj' vi-cmd-mode @@ -30,24 +30,6 @@ bindkey -M viins '^e' end-of-line bindkey -v bindkey '^R' history-incremental-search-backward -if [ -f /usr/local/bin/server_selector ]; then - /bin/bash /usr/local/bin/server_selector -fi - -#Enable virtualenvwrapper if available -if [ -f /usr/local/bin/virtualenvwrapper.sh ]; then - . /usr/local/bin/virtualenvwrapper.sh -fi - -#The next line updates PATH for the Google Cloud SDK. -if [ -f /Users/adam/google-cloud-sdk/path.zsh.inc ]; then - source '/Users/adam/google-cloud-sdk/path.zsh.inc' -fi -# The next line enables shell command completion for gcloud. -if [ -f /Users/adam/google-cloud-sdk/completion.zsh.inc ]; then - source '/Users/adam/google-cloud-sdk/completion.zsh.inc' -fi - #Custom utilities #Change ls alias based on host OS @@ -66,22 +48,11 @@ else alias vim='vi' fi -alias en4ip="ifconfig | grep -Eo '169.254.\d{1,3}.\d{1,3}' | head -n1" - #Bash/zsh common functions if [ -f ~/.common_shell_functions ]; then . ~/.common_shell_functions fi -#Zsh plugins -if [ -f ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then - . ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh -fi - -if [ -f ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then - . ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh -fi - #pyenv if [ -f "$HOME/.pyenv/bin/pyenv" ]; then export PYENV_ROOT="$HOME/.pyenv"