<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vim, Cygwin, MySQL &#38; Zsh Tips by zzapper &#187; shell tips</title>
	<atom:link href="http://zzapper.co.uk/category/shell-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://zzapper.co.uk</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 23:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>bash: Find specifying certain file extensions</title>
		<link>http://zzapper.co.uk/bash-find-specifying-certain-file-extensions/</link>
		<comments>http://zzapper.co.uk/bash-find-specifying-certain-file-extensions/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 10:41:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell tips]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=191</guid>
		<description><![CDATA[I had terrible trouble finding a way to do this in bash, doesn&#8217;t seem to be possible using -name or -iname :- find /var/www/html/ -regex &#8220;.*\(php\&#124;js\&#124;inc\)&#8221; -exec grep -i &#8216;tbl_title&#8217; {} + find /var/www/html/ -regex &#8220;.*\(php\&#124;js\&#124;inc\)&#8221; -exec grep -i &#8216;tbl_title&#8217; {} \; NB: the \; and + endings are different the + ending usefully displays [...]]]></description>
			<content:encoded><![CDATA[<div class=box>
I had terrible trouble finding a way to do this in bash, doesn&#8217;t seem to be possible using -name or -iname :-</p>
<p>find /var/www/html/ -regex &#8220;.*\(php\|js\|inc\)&#8221; -exec grep -i &#8216;tbl_title&#8217; {} +</p>
<p>find /var/www/html/ -regex &#8220;.*\(php\|js\|inc\)&#8221; -exec grep -i &#8216;tbl_title&#8217; {} \;</p>
<p>NB: the \; and + endings are different the + ending usefully displays the matching file name</p>
<p>Of course if you have a recent bash you will likely prefer:-</p>
<p>grep -ilR &#8211;include=*.{php,inc,js} &#8216;fn_main&#8217; c:/inetpub/wwwroot</p>
<p>or</p>
<p>grep -iR &#8211;include=*.{php,inc,js} &#8216;fn_main&#8217; c:/inetpub/wwwroot</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/bash-find-specifying-certain-file-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wonderful bindkey : assign anything to any key</title>
		<link>http://zzapper.co.uk/wonderful-bindkey-assign-anything-to-any-key/</link>
		<comments>http://zzapper.co.uk/wonderful-bindkey-assign-anything-to-any-key/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 15:07:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[shell tips]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=141</guid>
		<description><![CDATA[I have been working on a laptop a lot recently but it was bugging me that I didn&#8217;t have the * key on its own key as you do on a full size keyboard. I realized that I wasn&#8217;t using the function keys F1 to F12 at the shell level but didn&#8217;t know how to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a laptop a lot recently but it was bugging me that I didn&#8217;t have the * key on its own key as you do on a full size keyboard.  I realized that I wasn&#8217;t using the function keys F1 to F12 at the shell level but didn&#8217;t know how to configure. Now my situation is a little complicated as I&#8217;m using zsh on cygwin on a Windows 7 PC.</p>
<p>Now I&#8217;m used to using bindkey to launch widgets eg control-O to duplicate previous word on the command line , and control-L the hyper-useful suspend current command line entry to allow execution of a single command ie do a quick ls or change a permission etc.<br />
here they are:-</p>
<p><b>bindkey -M viins &#8216;^O&#8217; copy-prev-shell-word</b>               # copy previous shell word</p>
<p><b>bindkey &#8216;^L&#8217;  push-line</b>                                                           # push current command into a buffer,<br />
These use built-in widgets however the really clever amongst can develop their own.</p>
<p>Anyway I just wanted to reprogram the function keys to output another character or string. I posted a question into the zsh newsgroup and quickly got a reply.  I needed the -s option</p>
<p>What you have to do, type the following at your prompt yes actually type Control-V followed by F7</p>
<p>> <b>bindkey -s &#8220;^vF7&#8243;   &#8220;ls -l&#8221;</b> # replace the ls -l with whatever you like</p>
<p>Now heres the rub, what you actually see generated is  (will vary from system to system)<br />
<strong>bindkey -s &#8220;^[[18~&#8221; &#8216;ls -l&#8217;</strong><br />
<br /> this is what you must copy and paste into your shell startup file</p>
<p>This is actually simple enough for me to type these from the CLI for a short-term use. Boy am I going to enjoy using bindkey!</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/wonderful-bindkey-assign-anything-to-any-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zsh wonderful use of dirs,popd,pushp, cd ~5</title>
		<link>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/</link>
		<comments>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 18:36:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[shell tips]]></category>

		<guid isPermaLink="false">http://zzapper.co.uk/?p=82</guid>
		<description><![CDATA[I&#8217;ve never got the hang of popd &#38; pushd they seemed a bit pointless. zsh however has extended their abilities eg:- &#62; dirs -v    # number and list your recent directories one per line &#62; cd ~5     # cd to directory 5 in the directory stack &#62; cd -&#60;tab&#62;    # the tab complete lists the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve never got the hang of popd &amp; pushd they seemed a bit pointless. zsh however has extended their abilities eg:-</p>
<p>&gt; dirs -v    # number and list your recent directories one per line</p>
<p>&gt; cd ~5     # cd to directory 5 in the directory stack</p>
<p>&gt; cd -&lt;tab&gt;    # the tab complete lists the directory stack then type a digit to select the one you require (saves you having to do a dirs -v in the first place</p>
<p>I have to work in very complicated directory structures so this will be fantastically useful.</p>
<p>#don&#8217;t forget the zsh cd substitute command</p>
<p>&gt; cd olddir newdir</p>
<p>eg you are in</p>
<p>/inetpub/wwwroot/www.livesite.co.uk/products/</p>
<p>&gt; cd live test</p>
<p>/inetpub/wwwroot/www.testsite.co.uk/products/</p>
]]></content:encoded>
			<wfw:commentRss>http://zzapper.co.uk/zsh-wonderful-use-of-dirspopdpushp-cd-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

