From ecdb73021395d499a8ced511cbbacf9d8dfcc9f1 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Wed, 21 Aug 2024 15:14:06 +0100 Subject: [PATCH] Add file2clip alias for xclip. --- .bashrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bashrc b/.bashrc index 6cdf2e9..cb530f5 100644 --- a/.bashrc +++ b/.bashrc @@ -25,6 +25,9 @@ __prompt_git_status() { # 1 = An error occured. local BRANCH COUNT GIT_PROMPT GIT_PROMPT_MARKER_SET GIT_REPO_INFO IFS=$'\n' + # Don't do anything if GIT_PROMPT_DISABLE is set. + [[ -v GIT_PROMPT_DISABLE ]] && return 0 + # Bail out if there's no format argument given, or it doesn't contain %s (( $# != 1 )) || [[ "$1" != *%s* ]] && return 1 @@ -606,6 +609,7 @@ if [[ "$PLATFORM" = "Linux" ]]; then hash nc >/dev/null 2>&1 && alias pastebin='nc termbin.com 9999' hash pinfo >/dev/null 2>&1 && alias info='pinfo' hash ping >/dev/null 2>&1 && alias ping='ping -b' + hash xclip >/dev/null 2>&1 && alias file2clip='DISPLAY=:0.0 xclip -selection clipboard' elif [[ "$PLATFORM" = "Darwin" ]]; then # Darwin specific aliases (some dependant on macports) [[ ! -e "/opt/local/libexec/gnubin/df" ]] && alias df='df -kP'