From 391550f57cd6a9645bd4ea121f7b99144e041cce Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 26 Sep 2018 18:01:43 -0400 Subject: Add a function to push my basic vimrc to servers --- mkshrc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/mkshrc b/mkshrc index 70ac9a4..e4cc4f0 100644 --- a/mkshrc +++ b/mkshrc @@ -385,7 +385,23 @@ updatevimrc() { ./link-vimrc.sh cd $OLDWD } - +updatevimrc_basic() { + pull -u "$VIM_BASIC_URL" -f ~/.vimrc +} +placebasicvimrc() { + if [ -z "$1" ] ; then + echo All arguments are passed to SSH, but you need at least one + return + fi + _TMP="$(mktemp)" + if [ -z "$_TMP" ] ; then + echo Cannot continue, temp file cannot be zero length!; + return + fi + pull -u "$VIM_BASIC_URL" -f "$_TMP" + cat "$_TMP" | ssh "$@" "cat - > ~/.vimrc" + rm "$_TMP" +} setcolorterminal() { case $TERM in @@ -465,6 +481,7 @@ export PATH="$GOPATH/bin:$PATH" UPDATE_URL="https://www.rygel.us/etc/" VIM_GIT_URL="https://git.riedstra.us/mitch/vim-cfg.git" +VIM_BASIC_URL="https://git.riedstra.us/mitch/vim-cfg.git/plain/basic.vim" PRELOAD="$HOME/${SHELL_CONFIG}.pre" LOCAL="$HOME/${SHELL_CONFIG}.local" -- cgit v1.2.3