Latest Version

From OS X Scientific Computing

Jump to: navigation, search
Return to ZSH on OS X.

This works on OS X (ppc and intel) and also on Linux (ubuntu)

zsh_google.png


I've now got the download and svn on googlecode

or

ZSH-templates now comes with an easy-to-use configuration gui (see below).






Contents


ZSH Templates 1.1: What's New

The 1.1 version has some changes. The 1.1.x releases are minor bug-fixes and improvements.




Dotfiles

I've moved all of the dotfiles for various user-defined configuration switches into the .zsh directory, because it was making quite a mess (albeit hidden) in the user's home directory.

dotfiles.png




Configuration GUI

Perhaps more importantly, I've now simplified the configuration process with a new interactive GUI approach. (So far, this has only been implemented on OS X).

A new configuration setup function has been added, designed to be run when the templates are first installed. It will interactively prompt the user to answer a few questions, using either a series of dialog boxes, as pictured below, or a single Pashua GUI pane:


Choose emacs (default) or vi keybindings

configure_zsh_templates_1.png


Set up USER and HOST customized completion

This invokes Wataru Kagawa's User_and_Host_completions

configure_zsh_templates_2.png


Ask if Fink is present

configure_zsh_templates_3.png


Ask if some of my more idiosyncratic, and possibly annoying, functions should be loaded

Some of these, like the "sudo" function, change common commands, which shouldn't take the user by complete surprise, so hence the choice.

configure_zsh_templates_4.png

cf:

The functions.local file


Ask if you want to load the crystallography functions (and environment.xtal script)

Most users, apart from crystallographers and other biophysics geeks, won't want this.

configure_zsh_templates_5.png




Ask if X11 setup should be tweaked

This invokes my Apple X11 customization GUI

configure_zsh_templates_6.png


Do you want to read more?

Opens these pages in a web browser.

configure_zsh_templates_7.png


Set up the prompt

The one you get by default is pretty boring (but then, so am I). The user is told to run the function

 switch_prompt

to get a menu of possibilities.

switchprompt.png







ZSH Templates 1.0.5: What's New

This has been stable for me on OS X and on Ubuntu Linux.

1.0.X are bug-fixes for 1.0.0.

There are a lot of significant changes (from 0.X.Y to 1.0.X) in the following files:

  • /etc/zshenv
  • /etc/zshrc
  • $ZDOT/environment
  • $ZDOT/environment.local

have all been changed significantly.

  • The "edit" function has been completely re-written and greatly simplified.
  • The X-11 DISPLAY setting routine has been completely re-written, simplified, and de-bugged for multiple simultaneous users.

These changes have fixed a bunch of minor bugs, a few major ones, and in addition have to lead to two major improvements:




You now have the option of installing this for an individual user without contaminating the system.

The correspondence is as follows:

/etc/zshenv ===>  ~/.zshenv
/etc/zshrc   ===>  ~/.zshrc
/Library/init ===> ~/Library/init


  • On OSX, you can now put these files in either /etc or in your home directory. If the latter, you must do this:
 cp zshenv ~/.zshenv   
 cp zshrc   ~/.zshrc.  
 

Please get rid of any old /etc/zshenv and /etc/zshrc before trying this. If you put these in your home directory, you also need to put the /Library/init/zsh directory into ~/Library/init/zsh in your home directory, i.e,

 mkdir -p ~/Library/init   
 cp -R ~/Desktop/zsh-templates-1.0.2/Library/init/zsh  ~/Library/init/.
 

If you have files in /Library/init, move them aside or get rid of them. Either put everything in your home directory, or put everything in /etc and /Library/init. Don't try to mix and match. It won't work.




You can install this on Linux

On Linux (tested only on Ubuntu so far), put everything in /etc:

 sudo mkdir -p /etc/zsh/init
 sudo cp etc/zshenv /etc/zsh/zshenv
 sudo cp etc/zshrc /etc/zsh/zshrc
 sudo ln -s /etc/zsh/zshrc /etc/zshrc
 sudo ln -s /etc/zsh/zshenv /etc/zshenv
 sudo cp -R Library/init/zsh /etc/zsh/init/.

(The zsh built by Ubuntu/Debian wants the zshenv and zshrc files in /etc, but the newer one I built wants them in /etc. So the symbolic links let you have both. You will need to move aside any old copies of these files first.)




The LaunchAgent Files are turned off by default

This approach was buggy, so I have put work-arounds in the shell scripts. If you want to install these files, I recommend putting them in ~/Library/LaunchAgents, and you will have to edit the files to turn them on. (If you can't figure out how, then please don't use them.)


Return to ZSH on OS X.
Personal tools