From a94ee62680c284a5fa86ac1db9660e344f41bd2e Mon Sep 17 00:00:00 2001 From: RealAestan <15686636+RealAestan@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:07:54 +0200 Subject: dmenuunicode: don't use variables in the printf format string (#1284) It works but the good practice is to use `printf "..%s.." "$foo"` see https://www.shellcheck.net/wiki/SC2059 --- .local/bin/dmenuunicode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/dmenuunicode b/.local/bin/dmenuunicode index 704c809..dd12bc3 100755 --- a/.local/bin/dmenuunicode +++ b/.local/bin/dmenuunicode @@ -13,6 +13,6 @@ chosen=$(cut -d ';' -f1 ~/.local/share/larbs/chars/* | dmenu -i -l 30 | sed "s/ if [ -n "$1" ]; then xdotool type "$chosen" else - printf "$chosen" | xclip -selection clipboard + printf "%s" "$chosen" | xclip -selection clipboard notify-send "'$chosen' copied to clipboard." & fi -- cgit v1.3.1 From d4ff2ebaf3e88efe20cae0d1e592fddfc433c96e Mon Sep 17 00:00:00 2001 From: snailed Date: Wed, 12 Apr 2023 12:11:29 +0000 Subject: fix shellcheck (#1301) Shellcheck wines when printf doesn't get an argument --- .local/bin/dmenuhandler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.local') diff --git a/.local/bin/dmenuhandler b/.local/bin/dmenuhandler index 0b3c713..acfd71b 100755 --- a/.local/bin/dmenuhandler +++ b/.local/bin/dmenuhandler @@ -2,7 +2,7 @@ # Feed this script a link and it will give dmenu # some choice programs to use to open it. -feed="${1:-$(printf "%s" | dmenu -p 'Paste URL or file path')}" +feed="${1:-$(true | dmenu -p 'Paste URL or file path')}" case "$(printf "copy url\\nsxiv\\nsetbg\\nPDF\\nbrowser\\nlynx\\nvim\\nmpv\\nmpv loop\\nmpv float\\nqueue download\\nqueue yt-dlp\\nqueue yt-dlp audio" | dmenu -i -p "Open it with?")" in "copy url") echo "$feed" | xclip -selection clipboard ;; -- cgit v1.3.1