From 19526ddc517d3c0cd320e5e1fe2222ed8e9807bb Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:58:06 -0700 Subject: [PATCH] feat: dots_diff --- CHANGELOG.md | 4 ++++ README.md | 3 +++ src/dots.sh | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f0cc9f..f8dcfee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## v1.3.0 (2025-01-03) + +- Adds `dots_diff` as a command to see what dotfiles have changed + ## v1.2.1 (2024-12-30) - Dotfile checking was previously too aggressive on every shell invocation which lead to slow shell starts. Dots will now only check the dotfiles status on first boot and once every 72 hours after that if machine stays on diff --git a/README.md b/README.md index b276cb6..568aed5 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,9 @@ dots_clean # Get the status of the dotfiles dots_status +# Get the diff of the dotfiles +dots_diff + # Show the list of dotfiles installed dots_list diff --git a/src/dots.sh b/src/dots.sh index 9503de0..cb59ac8 100755 --- a/src/dots.sh +++ b/src/dots.sh @@ -7,7 +7,7 @@ DOTFILES_DIR="$HOME/.dotfiles" # Cannot be `~/.dots` as we will use this for int DOTS_CONFIG_FILE="$DOTFILES_DIR/dots-config.sh" # Dots required variables (DO NOT EDIT) -DOTS_VERSION="v1.2.1" +DOTS_VERSION="v1.3.0" HOSTNAME="$(hostname)" # Required for macOS as it's not set automatically like it is on Linux DOTS_HOME_DIR="$HOME/.dots" DOTS_DIR="$DOTFILES_DIR/dots/src" @@ -183,6 +183,11 @@ dots_status() { git -C "$DOTFILES_DIR" status -s -b || echo "Couldn't check remote Dotfiles" } +# Gets the diff of dotfiles +dots_diff() { + git -C "$DOTFILES_DIR" diff +} + # Syncs dotfiles from your local machine to and from your dotfiles repo dots_sync() { echo "Dots is about to sync your Dotfiles, this process may override your current Dotfiles. Press any key to continue."