Permalink
Browse files

Display all connections when {query} is empty

  • Loading branch information...
1 parent 2b1ee88 commit 3931dd5b750b49d72475e9f06bc5f5d621f73fd6 @andrewschleifer committed Jan 22, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 info.plist
View
@@ -30,13 +30,14 @@
<key>config</key>
<dict>
<key>argumenttype</key>
- <integer>0</integer>
+ <integer>1</integer>
<key>escaping</key>
<integer>63</integer>
<key>keyword</key>
<string>vpn</string>
<key>script</key>
<string>FILTER="{query}"
+if [ -z "$FILTER" ]; then FILTER=.;fi
echo '&lt;?xml version="1.0"?&gt;&lt;items&gt;'
osascript -sh connections.ascr | tr "\r" "\n" | grep -i $FILTER | while read LINE; do echo "&lt;item uid=\"none\" arg=\"${LINE}\"&gt;&lt;title&gt;${LINE}&lt;/title&gt;&lt;subtitle&gt;Toggle Connection&lt;/subtitle&gt;&lt;icon&gt;icon.png&lt;/icon&gt;&lt;valid&gt;yes&lt;/valid&gt;&lt;/item&gt;"; done

0 comments on commit 3931dd5

Please sign in to comment.