From e81c49d436897abc3cc5e5e6c4cf41ef9b66a6bf Mon Sep 17 00:00:00 2001 From: vas-dav Date: Wed, 24 Apr 2024 23:44:22 +0300 Subject: [PATCH] linux: add rc syncing --- linux/.zshrc | 11 ++++++++--- linux/scripts/sync_rc.sh | 9 +++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 linux/scripts/sync_rc.sh diff --git a/linux/.zshrc b/linux/.zshrc index 9aad782..6f358fb 100755 --- a/linux/.zshrc +++ b/linux/.zshrc @@ -2,8 +2,8 @@ # Download Znap, if it's not there yet. [[ -r ~/Repos/znap/znap.zsh ]] || git clone --depth 1 -- \ - https://github.com/marlonrichert/zsh-snap.git ~/Repos/znap -source ~/Repos/znap/znap.zsh # Start Znap + https://github.com/marlonrichert/zsh-snap.git /home/${USER}/Repos/znap +source /home/${USER}/Repos/znap/znap.zsh # Start Znap znap source marlonrichert/zsh-autocomplete znap source zshzoo/cd-ls @@ -13,6 +13,7 @@ alias c="clear" alias l="ls" alias st="speedtest" alias ll="ls --long" +alias la="ls -la" alias lr="ll --tree" alias tree="tree -ph" alias f="find ~/ -name" @@ -33,8 +34,12 @@ alias gch="git checkout" alias gchb="gch -b" alias grp="git pull --rebase && git push" +export HISTSIZE=2000 +export HISTFILE="$HOME/.history" +export SAVEHIST=$HISTSIZE +setopt hist_ignore_all_dups + #Prompt Settings: -cd /Users/dave/Documents/Terminal PROMPT="%(?.%F{green}√.%F{red}?%?)%f %B%F{yellow}%1~%f%b %# --> " c diff --git a/linux/scripts/sync_rc.sh b/linux/scripts/sync_rc.sh new file mode 100755 index 0000000..370c4a7 --- /dev/null +++ b/linux/scripts/sync_rc.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +repo_path=$(git rev-parse --show-toplevel) +zsh_rc=".zshrc" +vim_rc=".vimrc" + +cp ${repo_path}/linux/${zsh_rc} /home/${USER}/${zsh_rc} +cp ${repo_path}/linux/${vim_rc} /home/${USER}/${vim_rc} +