diff options
Diffstat (limited to '.zshrc')
-rw-r--r-- | .zshrc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc index 3c92d3b..bfb087f 100644 --- a/.zshrc +++ b/.zshrc @@ -115,8 +115,35 @@ export PATH # //// aliases & non-script functions //////////////////////// <alias-fns> // # +# -- cli shenanigans -- + +alias tm='tmux attach \; choose-tree -s && exit' +alias grc='git rebase --continue' + +# -- file management utilities -- + +relink() { + inode1=$(ls -i $1 | cut -d " " -f 1) && + inode2=$(ls -i $2 | cut -d " " -f 1) && + if [[ $inode1 == $inode2 ]]; then + echo files are already same inode >&2 + else + sha1=$(sha256sum $1 | cut -d " " -f 1) && + sha2=$(sha256sum $2 | cut -d " " -f 1) && + if [[ $sha1 != $sha2 ]]; then + echo files have different checksums >&2 + else + rm $2 && ln $1 $2 + fi + fi +} + # -- hooks into third-party stuff -- +if [[ -v DEVICE_HAS_SUBLIME_TEXT ]]; then + alias subl='open -a "$DEVICE_SUBLIME_TEXT_INSTALLATION"' +fi + if [[ -v DEVICE_HAS_VIM ]]; then vimhelp() { vim -c ":h $1 | only" @@ -128,3 +155,10 @@ fi device_postconfig + +# //// really actually end of file stuff ////////////////////// <eof-step> // # + +if [[ -v DEVICE_HAS_SDKMAN ]]; then + export SDKMAN_DIR="$DEVICE_SDKMAN_INSTALLATION" + source "$DEVICE_SDKMAN_INSTALLATION/bin/sdkman-init.sh" +fi |