From 3e50f9460ab6a019e160142a51d09b6b7bb74b73 Mon Sep 17 00:00:00 2001 From: Chris Down Date: Thu, 3 Nov 2016 20:36:58 -0600 Subject: [PATCH] Uniquify adjacent identical selection items This is a potential solution for #30. --- clipmenu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clipmenu b/clipmenu index b8b9e11..8bb79ff 100755 --- a/clipmenu +++ b/clipmenu @@ -39,7 +39,7 @@ done # whether `-l` is also in "$@", because the way that dmenu works allows a later # argument to override an earlier one. That is, if the user passes in `-l`, our # one will be ignored. -chosen_line=$(printf '%s\n' "${ordered_selections[@]}" | dmenu -l 8 "$@") +chosen_line=$(printf '%s\n' "${ordered_selections[@]}" | uniq | dmenu -l 8 "$@") [[ $chosen_line ]] || exit 1