Remove common zsh config files from macOS-specific folder

This commit is contained in:
Eric Torres 2022-12-07 15:54:28 -08:00
parent 518e87816c
commit 5661e176ad
8 changed files with 97 additions and 126 deletions

View File

@ -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

View File

@ -1,2 +0,0 @@
# bindkey -M viins '^r' history-incremental-search-backward
# bindkey -M vicmd '^r' history-incremental-search-backward

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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]'

View File

@ -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

View File

@ -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