From c7ad06f2ea2cd1119e4aa959a6df63ecc7c0d733 Mon Sep 17 00:00:00 2001 From: Jannik Zander <59698@grundfos.com> Date: Thu, 12 Jul 2018 15:16:39 +0200 Subject: [PATCH] Rename dit() to githome() --- .bash_aliases | 2 +- .bash_completion | 4 ++-- bin/dit-init.sh | 17 ----------------- bin/githome-clone.sh | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 20 deletions(-) delete mode 100755 bin/dit-init.sh create mode 100644 bin/githome-clone.sh diff --git a/.bash_aliases b/.bash_aliases index f8efd9c..6eb9052 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -36,9 +36,9 @@ alias e='ranger-cd' alias o='rifle' alias open='xdg-open &>/dev/null' alias info='info --vi-keys' -alias dit='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores' alias rg='rg --path-separator="//"' +alias githome='git --git-dir=$HOME/.githome --work-tree=$HOME' if [ ! -x "$(which tree 2>/dev/null)" ] then diff --git a/.bash_completion b/.bash_completion index ea03c1c..8015085 100644 --- a/.bash_completion +++ b/.bash_completion @@ -1,9 +1,9 @@ [ -f /etc/bash_completion ] && . /etc/bash_completion -# Add tab completion for `dit` by marking it as an alias for `git` +# Add tab completion for `githome` by marking it as an alias for `git` _completion_loader git if type _git &>/dev/null; then - complete -o "default" -o "nospace" -F _git dit; + complete -o "default" -o "nospace" -F _git githome; fi; # Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards diff --git a/bin/dit-init.sh b/bin/dit-init.sh deleted file mode 100755 index 2daafbd..0000000 --- a/bin/dit-init.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Define dit command -dit () -{ - git --git-dir=$HOME/.dit --work-tree=$HOME "$@" -} - -# Perform initial steps -cd $HOME -git init --bare $HOME/.dit -dit config --local status.showUntrackedFiles no -dit remote add origin git@jaza.me:jaz/dit.git -dit fetch -dit reset --hard origin/master -dit branch -u origin/master - diff --git a/bin/githome-clone.sh b/bin/githome-clone.sh new file mode 100644 index 0000000..a3865cb --- /dev/null +++ b/bin/githome-clone.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +git init --bare $HOME/.githome + +# Define githome function +function githome() +{ + git --git-dir=$HOME/.githome --work-tree=$HOME "$@" +} + +# Initial setup +githome config --local status.showUntrackedFiles no +githome remote add origin git@jaza.me:jaz/dotfiles.git +githome fetch +githome reset --hard origin/master +githome branch -u origin/master + -- 2.43.0