Thursday, January 5, 2012

My Favorite Unix Alias

I use this "z" command every day.  For example, let's say you have a list of files and you want to do something to one of them. 

find . | grep file_im_looking_for   | z

Up pops vim and lets you find the file hilight with the V  command and yank it.  Then you close vim, paste it on the screen and edit your command to do whatever you want.

And here it is, just add to .bash_alias file or .profile:

alias z="tee /tmp/blah; vim /tmp/blah"

How to fix your Tmux copy and paste problems

I had stopped using tmux when I went back to OSX because the copy quit working, but I've been wanting it back because I really want to use my better copy mode to copy existing text on the screen, and because it lets you search through your open windows.

So finally someone has done the research and work to get this working correctly and in a non-invasive way.  Beautiful, I can go back now.

Thank you Chris Johnsen.