From 5e6fa8ebb41792ecf1861c40b020dab9c17bb28b Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Thu, 12 Oct 2023 21:35:36 +0100 Subject: [PATCH] Sync minimal with master. --- .bashrc | 10 ++--- .nanorc-5 | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 .nanorc-5 diff --git a/.bashrc b/.bashrc index adfd6ab..4628619 100644 --- a/.bashrc +++ b/.bashrc @@ -15,6 +15,8 @@ __prompt_git_status() { # << or /dev/null 2>&1 && { - git maintenance run --task=prefetch 2>/dev/null || printf "\\033[1;31m%s\\033[39m\\n" "Git maintenance 'prefetch' task failed." >&2 - } + [[ -n "$GIT_PROMPT_AUTO_PREFETCH" ]] && [[ "$PWD" == "${GIT_REPO_INFO[0]}" ]] && \ + [[ "$(git config --get --bool maintenance.promptprefetchdisabled 2>/dev/null)" != "true" ]] && { + git maintenance run --task=prefetch 2>/dev/null || printf "\\033[1;31m%s\\033[39m\\n" "Git maintenance 'prefetch' task failed." >&2 } COUNT="$(git rev-list --count --left-right "${BRANCH:+refs/prefetch/remotes/origin/}${BRANCH:-@{upstream\}}...HEAD" 2>/dev/null | tr '[:blank:]' ' ')" case "$COUNT" in diff --git a/.nanorc-5 b/.nanorc-5 new file mode 100644 index 0000000..52a48e0 --- /dev/null +++ b/.nanorc-5 @@ -0,0 +1,130 @@ +## Sample initialization file for GNU nano. +## +## Please note that you must have configured nano with --enable-nanorc +## for this file to be read! Also note that this file should not be in +## DOS or Mac format, and that characters specially interpreted by the +## shell should not be escaped here. +## +## To make sure an option is disabled, use "unset