From 551dc964fe2c99c2ee6989a0eca72d00899017f7 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Tue, 29 Aug 2023 01:00:46 +0200 Subject: [PATCH] fix choose-clip for unknown data type for json --- dot_config/choose/executable_choose-clip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_config/choose/executable_choose-clip.sh b/dot_config/choose/executable_choose-clip.sh index e8e8114..4449980 100644 --- a/dot_config/choose/executable_choose-clip.sh +++ b/dot_config/choose/executable_choose-clip.sh @@ -2,6 +2,6 @@ # Use fuzzel to find a password from password-store and copy it to clipboard. # inpired by: https://gist.github.com/igemnace/2b8609d280752e8a1b173204c14f6892 -clip_name=$(cd $HOME/Library/Containers/com.generalarcade.flycut/Data/Library/Preferences && plutil -convert json com.generalarcade.flycut.plist && cat com.generalarcade.flycut.plist | jq '.store.jcList[] | {Contents} | join(" ")' | sed -e 's/[^.]//;s/.$//' | choose) +clip_name=$(cd $HOME/Library/Containers/com.generalarcade.flycut/Data/Library/Preferences && plutil -extract store xml1 com.generalarcade.flycut.plist -o - | plutil -convert json -o - - | jq '.jcList[] | {Contents} | join(" ")' | sed -e 's/[^.]//;s/.$//' | choose) [[ $clip_name != "" ]] && echo $clip_name | pbcopy