Add file2clip alias for xclip.

This commit is contained in:
Darren 'Tadgy' Austin 2024-08-21 14:23:04 +01:00
commit 900cda86c1

View file

@ -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'