From f26813c184d80627d47e9a79edbddd046c8aa14b Mon Sep 17 00:00:00 2001 From: Chris Down Date: Tue, 24 Mar 2020 13:49:44 +0000 Subject: [PATCH] clipmenu: Use last-arg syntax that keeps shellcheck happy --- clipmenu | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clipmenu b/clipmenu index d3158d4..d24a55b 100755 --- a/clipmenu +++ b/clipmenu @@ -35,13 +35,11 @@ list_clips() { } if [[ "$CM_LAUNCHER" == rofi-script ]]; then - if ! (( $# )); then + if (( $# )); then + chosen_line="${!#}" + else list_clips exit - else - # https://github.com/koalaman/shellcheck/issues/1141 - # shellcheck disable=SC2124 - chosen_line="${@: -1}" fi else chosen_line=$(