fix choose-clip for unknown data type for json
This commit is contained in:
parent
09168dd7d1
commit
551dc964fe
1 changed files with 1 additions and 1 deletions
|
@ -2,6 +2,6 @@
|
||||||
# Use fuzzel to find a password from password-store and copy it to clipboard.
|
# Use fuzzel to find a password from password-store and copy it to clipboard.
|
||||||
# inpired by: https://gist.github.com/igemnace/2b8609d280752e8a1b173204c14f6892
|
# 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
|
[[ $clip_name != "" ]] && echo $clip_name | pbcopy
|
||||||
|
|
Loading…
Reference in a new issue