From 036e31fc5da3b62fc371bdbfdd9bbad4bca57898 Mon Sep 17 00:00:00 2001 From: "chawley (chawley-HP-EliteBook-840-G3)" Date: Wed, 13 Feb 2019 14:15:09 -0500 Subject: [PATCH] Added work changes --- .zsh_aliases | 2 ++ .zsh_functions | 5 ++++ .zshrc | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/.zsh_aliases b/.zsh_aliases index 481723a..145fe7c 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -71,4 +71,6 @@ alias git-st='git status' alias git-lg='git log --color --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit' alias git-remotes='git remote -v update' +# Makes work easier +alias rdp='/opt/freerdp-nightly/bin/xfreerdp /u:chawley2 /size:90% ' diff --git a/.zsh_functions b/.zsh_functions index 2a94964..443e316 100644 --- a/.zsh_functions +++ b/.zsh_functions @@ -88,3 +88,8 @@ else echo "See Attached" | mail -s "File: ${efile}" -a ${efile} ${2} fi } + +# simpler find for quick searches +f() { + find . -iname "*${1}*" + } diff --git a/.zshrc b/.zshrc index edb5a04..552f675 100644 --- a/.zshrc +++ b/.zshrc @@ -106,6 +106,74 @@ setopt share_history # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" +#------------------------------------------------history start +## HISTORY - ideas from https://github.com/mrnugget/dotfiles/blob/master/zshrc +########### + +HISTFILE=$HOME/.zsh_history +HISTSIZE=50000 +SAVEHIST=50000 + +setopt EXTENDED_HISTORY +setopt HIST_VERIFY +setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. +setopt HIST_IGNORE_DUPS # Dont record an entry that was just recorded again. +setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate. +setopt HIST_FIND_NO_DUPS # Do not display a line previously found. +setopt HIST_IGNORE_SPACE # Dont record an entry starting with a space. +setopt HIST_SAVE_NO_DUPS # Dont write duplicate entries in the history file. + +setopt inc_append_history +setopt share_history +#-----------------------------------------------history end + +#------------------------------------------------keybindings start +# KEY BINDINGS - also from https://github.com/mrnugget/dotfiles/blob/master/zshrc + +# Vim Keybindings +bindkey -v + +# Open line in Vim by pressing 'v' in Command-Mode +autoload -U edit-command-line +zle -N edit-command-line +bindkey -M vicmd v edit-command-line + +# Push current line to buffer stack, return to PS1 +bindkey "^Q" push-input + +# Make up/down arrow put the cursor at the end of the line +# instead of using the vi-mode mappings for these keys +bindkey "\eOA" up-line-or-history +bindkey "\eOB" down-line-or-history +bindkey "\eOC" forward-char +bindkey "\eOD" backward-char + +# CTRL-R to search through history +bindkey '^R' history-incremental-search-backward +# CTRL-S to search forward in history +bindkey '^S' history-incremental-search-forward +# Accept the presented search result +bindkey '^Y' accept-search + +# Use the arrow keys to search forward/backward through the history, +# using the first word of what's typed in as search word +bindkey '^[[A' history-search-backward +bindkey '^[[B' history-search-forward + +# Use the same keys as bash for history forward/backward: Ctrl+N/Ctrl+P +bindkey '^P' history-search-backward +bindkey '^N' history-search-forward + +# Backspace working the way it should +bindkey '^?' backward-delete-char +bindkey '^[[3~' delete-char + +# Some emacs keybindings won't hurt nobody +bindkey '^A' beginning-of-line +bindkey '^E' end-of-line + +#------------------------------------------------keybindings end + # Source zsh aliases # source $HOME/.zsh_aliases