Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ZSh Noob questions



"Christopher R. Parr" wrote:
> I'm new to the zsh, but I love it.

You probably ought to send this sort of question to zsh-users rather
than zsh-workers.  It will be copied to zsh-workers automatically.

> 1. I have set up 2 aliases using alias -g ... . But after rebooting,
> the global aliases are gone. Where should they be saved?

Probably .zshrc in your home directory.  Read the manual entry
STARTUP/SHUTDOWN files in the zsh manual page.

> 2. Some keys don't work (eg Del, Home, End). How can this be fixed?

At the command line, type read<Return>, then C-v (hold down Ctrl and type v),
then the key you want to get to work.  (This assumes your terminal is
set up in a reasonably standard fashion.)  You should see some
hieroglyphics, for example

% read
^V<Insert>

gives me

^[[2~

You need to bind an editor command to that as a string.  The easiest
way is to copy the characters you see, rather than cutting and pasting
(that's because that ^[ is really a single escape character and it's
easier to have the two separate characters in a file; zsh understands
what they mean).  Then use this with the bindkey command as described
in the zshzle manual page, for example:

bindkey '^[[2~' overwrite-mode

This turns my insert key into a toggle between insert and overwrite modes.

If you didn't get a string of character when you hit the key, but
something else happened (for example the terminal scrolled) then the
terminal is intercepting the key and using it before the shell gets its
hands on it.  Investigate your terminal's settings.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author