Archive

Archive for November, 2012

~+ Another Magical ZSH Tip

November 17th, 2012 No comments

I’ve been using zsh’s ability to cd to any of your recent directories for a long while

e.g.

> cd -<tab> which gives you a pick list of recent directories

I’ve just learnt however about the ~+ operator which allows

vi ~+<tab>
1 — /c/aaz
2 — /c/aaa
3 — /c/aax
4 — /usr/bin

I type 1-4 to pick the desired directory and then can continue completion.

remember you need the options in your .zshrc

setopt autopushd pushdignoredups # used by cd-
autoload compinit
compinit

also to remember to visit a few directories beforehand

Categories: zsh Tags:

Cygwin, zsh & rebaseall

November 7th, 2012 No comments

If you happen knowingly or unknowingly upgrade your zsh you may run into the dreaded “cannot create fork” “dll overlapping” problem not even ls will work. It happens rarely enough that when it occurs I panic thinking that my entire Cygwin environment is corrupt, but phew it just needs a rebaseall.

Now rebaseall must be run with Cygwin shutdown and here’s the kicker and Cygwin services such as sshd must be stopped in Windows services. The easiest way I know then to run the rebaseall command is directly from Windows Run box or from a Dos prompt

\cygwin\bin\dash -c ‘/usr/bin/rebaseall’

 

and hey presto your Cygwin will be fine.

Categories: Cygwin, zsh Tags: