From 5661e176ad19656b99d0bb9763d7fddc40666c27 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Wed, 7 Dec 2022 15:54:28 -0800 Subject: [PATCH] Remove common zsh config files from macOS-specific folder --- zsh-macos/.config/zsh-macos/.zsh_history | 97 +++++++++++++++++++ .../zsh-macos/conf.d/00-keybindings.zsh | 2 - .../.config/zsh-macos/conf.d/completion.zsh | 27 ------ zsh-macos/.config/zsh-macos/conf.d/kp.zsh | 14 --- zsh-macos/.config/zsh-macos/conf.d/options | 12 --- zsh-macos/.config/zsh-macos/conf.d/prompt.zsh | 35 ------- zsh-macos/.config/zsh-macos/conf.d/sudo.zsh | 23 ----- zsh-macos/.config/zsh-macos/conf.d/tmux.zsh | 13 --- 8 files changed, 97 insertions(+), 126 deletions(-) delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/00-keybindings.zsh delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/completion.zsh delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/kp.zsh delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/options delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/prompt.zsh delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/sudo.zsh delete mode 100644 zsh-macos/.config/zsh-macos/conf.d/tmux.zsh diff --git a/zsh-macos/.config/zsh-macos/.zsh_history b/zsh-macos/.config/zsh-macos/.zsh_history index ec7c0aa..0e1010c 100644 --- a/zsh-macos/.config/zsh-macos/.zsh_history +++ b/zsh-macos/.config/zsh-macos/.zsh_history @@ -366,3 +366,100 @@ nvim serversetup.txt sshconf sshconfig exit +uname -r +uname +which uname +cd Dotfiles +ls -l +gco macOS +git checkout macOS +git push +git status +zsh +cd zsh-linux +ls -l +ls -l +pwd +cd conf.d +ls -l +ls -la +cd .config/zsh-linux +ls -l +ls -l +cd conf.d +ls -l +uname +uname -h +uname --help +man uname +pwd +.. +.. +cd .. +cd ... +cd .. +cd .. +ls -l +cd .. +cd zsh +cd .config/zsh +ls -la +git branch +git mv .zprofile .zshenv ~/Dotfiles/zsh-linux/.config/zsh +git mv .zprofile .zshenv ~/Dotfiles/zsh-linux/.config/zsh-linux +git rm .zprofile .zshenv +git rm -f .zprofile .zshenv +pwd +cd ../../.. +ls -l +cd zsh-linux +ls -l +cd .config/ +ls -l +cd zsh-linux +ls -l +ls -l +ls -la +nvim .zshenv +ls +lcd +cd +cd Dotfiles/zsh-macos +ls -l +pwd +cd .config +ls +cd zsh-macos +ls +la +ls -la +nvim .zshrc +rm .zshrc +cd conf.d +ls +ls -l +rm completion.zsh kp.zsh prompt.zsh sudo.zsh tmux.zsh +ls -l +ls -l +nvim 00-aliases.zsh +ls +ls -l +nvim options +cat options +pwd +cat options +pwd +cd +cd Dotfiles/zsh-macos/.config/zsh-macos/conf.d +rm options +ls -l +pwd +rm completion.zsh kp prompt.zsh sudo.zsh +rm kp.zsh +ls -l +rm tmux.zsh +ls -l +rm 00-keybindings.zsh +cd +pwd +exit diff --git a/zsh-macos/.config/zsh-macos/conf.d/00-keybindings.zsh b/zsh-macos/.config/zsh-macos/conf.d/00-keybindings.zsh deleted file mode 100644 index 4741935..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/00-keybindings.zsh +++ /dev/null @@ -1,2 +0,0 @@ -# bindkey -M viins '^r' history-incremental-search-backward -# bindkey -M vicmd '^r' history-incremental-search-backward diff --git a/zsh-macos/.config/zsh-macos/conf.d/completion.zsh b/zsh-macos/.config/zsh-macos/conf.d/completion.zsh deleted file mode 100644 index 03006d7..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/completion.zsh +++ /dev/null @@ -1,27 +0,0 @@ -## zsh-completion-generator -#GENCOMPL_FPATH="${HOME}/zsh-completions" -#source '/usr/share/zsh-completion-generator/zsh-completion-generator.plugin.zsh' - -autoload -Uz compinit -compinit - -# Tab completion menu -zstyle ':completion:*' menu select -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} - -zstyle ':completion:*:*:kill:*' menu yes select -zstyle ':completion:*:kill:*' force-list always - -zstyle ':completion:*:*:killall:*' menu yes select -zstyle ':completion:*:killall:*' force-list always - -# Disabling this option enables tab completion for aliases -#setopt complete_aliases - -# Case insensitive completion -zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*' - -# Automatically load new executables -zstyle ':completion:*' rehash true - -# vim: syntax=zsh diff --git a/zsh-macos/.config/zsh-macos/conf.d/kp.zsh b/zsh-macos/.config/zsh-macos/conf.d/kp.zsh deleted file mode 100644 index afcaa08..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/kp.zsh +++ /dev/null @@ -1,14 +0,0 @@ -### PROCESS -# mnemonic: [K]ill [P]rocess -# show output of "ps -ef", use [tab] to select one or multiple entries -# press [enter] to kill selected processes and go back to the process list. -# or press [escape] to go back to the process list. Press [escape] twice to exit completely. - -kp() { - local pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[kill:process]'" | awk '{print $2}') - - if [[ -n "${pid}" && "${pid}" != "x" ]]; then - echo ${pid} | xargs kill -${1:-9} - kp - fi -} diff --git a/zsh-macos/.config/zsh-macos/conf.d/options b/zsh-macos/.config/zsh-macos/conf.d/options deleted file mode 100644 index 659b21c..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/options +++ /dev/null @@ -1,12 +0,0 @@ -# automatically cd into a given directory -setopt autocd - -# history options -setopt append_history -setopt hist_ignore_all_dups - -# command correction -setopt correctall - -# prevent accidental overwriting of a file -setopt noclobber diff --git a/zsh-macos/.config/zsh-macos/conf.d/prompt.zsh b/zsh-macos/.config/zsh-macos/conf.d/prompt.zsh deleted file mode 100644 index 9349f4f..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/prompt.zsh +++ /dev/null @@ -1,35 +0,0 @@ -# allows substitution in the prompt -setopt PROMPT_SUBST - -# ========== VCS info ========== -autoload -Uz vcs_info -zstyle ':vcs_info:*' enable git -zstyle ':vcs_info:*' check-for-changes true -#zstyle ':vcs_info:git*' formats "%{$fg[grey]%} %{$fg[blue]%}%b%{$reset_color%}%m %u %c%{$reset_color%}" -zstyle ':vcs_info:git*' formats "%{$fg[grey]%}%{$fg[blue]%}%b%{$reset_color%}%m %u %c%{$reset_color%}" - -# ========== Vim Command Mode ========== -vim_ins_mode='ins' -vim_cmd_mode='cmd' -vim_mode=${vim_ins_mode} - -zle-keymap-select() { - vim_mode="${${KEYMAP/vicmd/${vim_cmd_mode}}/(main|viins)/${vim_ins_mode}}" - zle reset-prompt -} -zle -N zle-keymap-select - -zle-line-finish() { - vim_mode=${vim_ins_mode} -} -zle -N zle-line-finish - -# ========== Final Prompt ========== -precmd() { - vcs_info -} - -#PS1='%F{blue}%n%f@%m %F{green}%3~%f > ' -#RPS1='%F{green}${vim_mode}%f ${vcs_info_msg_0_} [%F{red}%?%f]' -PS1='%F{green}%3~%f %F{blue}>%f ' -RPS1='${vcs_info_msg_0_} [%F{red}%?%f]' diff --git a/zsh-macos/.config/zsh-macos/conf.d/sudo.zsh b/zsh-macos/.config/zsh-macos/conf.d/sudo.zsh deleted file mode 100644 index eaa672c..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/sudo.zsh +++ /dev/null @@ -1,23 +0,0 @@ -# Press escape twice to prepend the previous command with "sudo" -sudo-command-line() { - [[ -z ${BUFFER} ]] && zle up-history - if [[ ${BUFFER} == sudo\ * ]]; then - LBUFFER="${LBUFFER#sudo }" - elif [[ ${BUFFER} == $EDITOR\ * ]]; then - LBUFFER="${LBUFFER#$EDITOR }" - LBUFFER="sudoedit $LBUFFER" - elif [[ ${BUFFER} == sudoedit\ * ]]; then - LBUFFER="${LBUFFER#sudoedit }" - LBUFFER="$EDITOR $LBUFFER" - else - LBUFFER="sudo $LBUFFER" - fi -} - -zle -N sudo-command-line - -# Defined shortcut keys: [Esc] [Esc] -bindkey -M viins "\e\e" sudo-command-line -bindkey -M vicmd "\e\e" sudo-command-line - -# vim: syntax=zsh diff --git a/zsh-macos/.config/zsh-macos/conf.d/tmux.zsh b/zsh-macos/.config/zsh-macos/conf.d/tmux.zsh deleted file mode 100644 index 9b59e9e..0000000 --- a/zsh-macos/.config/zsh-macos/conf.d/tmux.zsh +++ /dev/null @@ -1,13 +0,0 @@ -## load a tmux session -_load_tmux() { - if [[ -n "${TMUX}" ]]; then - echo "Already in a tmux session." - else - tmux - fi -} - -zle -N _load_tmux -bindkey -M viins "^y" _load_tmux - -# vim: syntax=zsh