aboutsummaryrefslogtreecommitdiffstats
path: root/SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-06-30 19:05:01 +0000
committerBibiko <bibiko@eva.mpg.de>2011-06-30 19:05:01 +0000
commit76e7f699f3db57369b565e400fff40b95cc1db9b (patch)
tree43ae9c50440ccb4145eba8592815a18859f49714 /SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist
parent4774e16aac96643b6ee86243bdd1acf6bc9ec4f3 (diff)
downloadsequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.tar.gz
sequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.tar.bz2
sequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.zip
• added comments to default bundle commands
Diffstat (limited to 'SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist')
-rw-r--r--SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist29
1 files changed, 28 insertions, 1 deletions
diff --git a/SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist b/SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist
index 56cdd9c4..8983a3ae 100644
--- a/SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist
+++ b/SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist
@@ -7,7 +7,34 @@
<key>category</key>
<string>Query Editor</string>
<key>command</key>
- <string>cat | perl -ne 'chomp;s/\t/ /g;s/"/\\"/g;print "\"".$_."\" . \"\\n\" .\n"' | sed '$ s/.........$//' | sed '$ s/$/;/' | __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy</string>
+ <string># read STDIN which contains the string data coming from the Query Editor
+# and pipe it to the following perl script
+cat | perl -ne '
+
+# delete final line ending
+chomp;
+
+# substitute TABs by SPACEs
+s/\t/ /g;
+
+# escape "
+s/"/\\"/g;
+
+# output text and pipe it to sed
+print "\"".$_."\" . \"\\n\" .\n"' |
+
+# delete last ‘"\n" .’ (the 9 last characters)
+sed '$ s/.........$//' |
+
+# append ;
+sed '$ s/$/;/' |
+
+# pipe the result to the UNIX command pbcopy which pastes
+# the result into the clipboard;
+# __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 tells pbcopy
+# that the string is UTF-8 encoded
+__CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy
+</string>
<key>contact</key>
<string>znvy@ovovxb.qr</string>
<key>description</key>