aboutsummaryrefslogtreecommitdiffstats
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
parent4774e16aac96643b6ee86243bdd1acf6bc9ec4f3 (diff)
downloadsequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.tar.gz
sequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.tar.bz2
sequelpro-76e7f699f3db57369b565e400fff40b95cc1db9b.zip
• added comments to default bundle commands
-rw-r--r--SharedSupport/Default Bundles/CopySingleLineQuoted.spBundle/command.plist29
-rw-r--r--SharedSupport/Default Bundles/WrapInDelimiter.spBundle/command.plist9
2 files changed, 36 insertions, 2 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>
diff --git a/SharedSupport/Default Bundles/WrapInDelimiter.spBundle/command.plist b/SharedSupport/Default Bundles/WrapInDelimiter.spBundle/command.plist
index 3588396e..b3eb463b 100644
--- a/SharedSupport/Default Bundles/WrapInDelimiter.spBundle/command.plist
+++ b/SharedSupport/Default Bundles/WrapInDelimiter.spBundle/command.plist
@@ -7,8 +7,15 @@
<key>category</key>
<string>Query Editor</string>
<key>command</key>
- <string>echo "DELIMITER \${0:;;}"
+ <string># write DELIMITER plus ;; as suggestion selected as snippet
+echo "DELIMITER \${0:;;}"
+
+# `cat` reads the STDIN which contains the selected
+# text from the Query Editor and write it as selected
+# snippet plus the mirrowed suggested delimiter
echo "\${1:`cat`}\${1:\$0}"
+
+# write DELIMITER plus ;
echo "DELIMITER ;"</string>
<key>contact</key>
<string>znvy@ovovxb.qr</string>