clipmenu

Simple clipboard management using dmenu
git clone https://git.sinitax.com/cdown/clipmenu
Log | Files | Refs | README | LICENSE | sfeed.txt

commit a77c2731ba86ac5370b1acadcad2a823ded47047
parent 7f06b56775575c5c678bab2a1a99c8c4d0a8e662
Author: Chris Down <chris@chrisdown.name>
Date:   Sun, 22 Apr 2018 10:19:03 +0100

clipdel: Don't take "-d" as the pattern if only "-d" was passed

Diffstat:
Mclipdel | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/clipdel b/clipdel @@ -2,7 +2,10 @@ : "${CM_DIR="${XDG_RUNTIME_DIR-"${TMPDIR-/tmp}"}"}" CM_REAL_DELETE=0 -[[ $1 == -d ]] && CM_REAL_DELETE=1 +if [[ $1 == -d ]]; then + CM_REAL_DELETE=1 + shift +fi major_version=5 @@ -41,7 +44,7 @@ fi # https://github.com/koalaman/shellcheck/issues/1141 # shellcheck disable=SC2124 -raw_pattern=${@: -1} +raw_pattern=$1 esc_pattern=${raw_pattern/\#/'\#'} if ! [[ $raw_pattern ]]; then