zsh-users
 help / color / mirror / code / Atom feed
* Re: New user questions
@ 2000-03-31  7:42 Sven Wischnowsky
  2000-03-31 10:42 ` Andrew Morton
  0 siblings, 1 reply; 15+ messages in thread
From: Sven Wischnowsky @ 2000-03-31  7:42 UTC (permalink / raw)
  To: zsh-users


Andrew Morton wrote:

> Well thanks everyone for all the help.  Just about everything is working
> sweetly (better than the old shell, actually).
> 
> Trolling through the magic commands in
> /usr/share/zsh/3.1.6-dev-20/functions/Commands/ helped a lot.
> 
> A few more observations:
> 
> - The zshbuiltins manpage doesn't cover 'bindkey'

Because it's not defined by the shell core, but by the zle module. See 
zshzle(1).

> ...
> 
> - The _history-complete-older function does exactly what I wanted for
> searching back through word history!
> 
> - _history-complete-older has a bug.  In this example it is bound to ^R:
> 
> prompt> echo aa "bb" cc
> prompt> echo ^R			# OK, gives echo cc
> prompt> echo ^R^R               # oops.  gives echo aa
> 
> It is skipping quoted words in its search.

It's not a bug, it's intentional: it explicitly excludes words
starting with any of [$'"]. That was the behaviour shown by the
compctl option for history completion, but now that we have
ignored-patterns it indeed doesn't seem to make sense any more.

> ...
> 
> Question: How do I, within .zshrc, simply erase _all_ preexisting
> bindings and start afresh?  I've tried everything.
> 
> pwold011:/home/morton> bindkey -l
> .safe
> emacs
> main
> vicmd
> viins
> pwold011:/home/morton> bindkey -D emacs vicmd viins
> pwold011:/home/morton> bindkey -l
> .safe
> main
> pwold011:/home/morton> bindkey -D main
> No such keymap `main'

`main' is (internally) really only an alias or some kind of pointer to 
the keymap currently used. Keymap handling (or zle/widget stuff in
general) is one of the things we might have a look at after 3.2/4.0 is 
out. I think.

Besides... do you *really* want to remove all keymaps and begin from
scratch? Why? You would have to add all those self-insert bindings,
the cursor movement, etc etc etc. Rather tedious.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 15+ messages in thread
* New user questions
@ 2000-03-30  3:14 Andrew Morton
  2000-03-30  5:20 ` Chmouel Boudjnah
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Andrew Morton @ 2000-03-30  3:14 UTC (permalink / raw)
  To: zsh-users

Hi.  I just joined.

For the past 10-15 years I have been using the original AT&T bourne
shell into which I have hacked various interactive editing functions. 
The time has come to dump this thing - the maintenance is too high.

I'd like to use zsh and I must say that I am _very_ impressed by the
quality and professionalism of the website, documentation, mailing list
and software.  Congratulations!

A few little problems I have observed:

1: When I printed zsh_a4.ps on an HP LaserJet 4 the last few columns
were truncated.

2: When I installed zsh-3.1.6dev20-1mdk (Mandrake's RPM) I notice that
'man zshall' produces 11 lines of the form:

<standard input>:291: can't open `man1/zshmisc.1': No such file or
directory
<standard input>:292: can't open `man1/zshexpn.1': No such file or
directory


And a few questions, please.

I am trying to emulate some functions of which I have become very fond
and there are just a few which for I have not been able to find the zsh
equivalents:

Impromptu directory listing
---------------------------

prompt> cd /usr/src/li^R
linux/                  linux-2.2.9/            linux-2.3.99-pre3/
linux-akpm/

So typing ^R in a command line produces a diectory listing of matching
files and allows you to continue typing.

insert-previous-line
--------------------

pwold011:~> /sbin/shutdown
shutdown: must be root.
pwold011:~> sudo ^W

Here, typing ^W will insert _all_ of the previous line at the prompt.
(I'd expected get-line to do this, but it just beeps...)


backward-search-word
--------------------

prompt> cp /foo/bar /zot/bop
prompt> ls /fo^C

Here, ^C will search back through the word history and insert
'/foo/bar'.  If I immediately hit ^C again, it will rub out the 'o/bar'
and search further back in history, so one can just keep hitting ^C.

^C
--

This normally generates interrupt.  Is there a way of making it
available to the interactive editor without globally sttying it? (The
shell would need to restore the intr char when it leaves editing mode).

Bidirectional directory history
-------------------------------

I'd like to be able to 'cd' back to somewhere where I used to be.  I
have this set up nicely using popd.  But once I've gone back a few
levels with multiple popd's I would like to go forward again.  A ring,
rather than a stack.

Possible?

insert-previous-word
--------------------

The insert-last-word widget will insert the last word of the previous
line.  Hitting it again inserts the last word of the line before that.

I would like to do something similar, but have it walk back through all
the previous words, not just the final ones on each line:

prompt> echo aaa bbb ccc ddd
prompt> echo ^O        # Expands to echo ddd
prompt> echo ^O^O      # Expands to echo ccc

etc

forward-kill-line
-----------------

Is there a widget which deletes from the cursor to the end of line?


Changing separators
-------------------

All the editor commands define a word separator as a space.  Is there a
way of changing zsh's idea of word separators?  I would prefer that it
consider '/' to be a separator as well.

redraw
------

If asynchronous output mucks up the editor output, how to redraw it? 
'clear-screen' will do the job, but I'd prefer it not clear the screen.

Thanks!


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2000-04-01 17:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-31  7:42 New user questions Sven Wischnowsky
2000-03-31 10:42 ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2000-03-30  3:14 Andrew Morton
2000-03-30  5:20 ` Chmouel Boudjnah
2000-03-30  5:27 ` Friedrich Dominicus
2000-03-30 11:12   ` Oliver Kiddle
2000-03-30  6:50 ` Andrej Borsenkow
2000-03-30 18:22   ` Chmouel Boudjnah
2000-03-31  6:40     ` Andrew Morton
2000-03-31  7:45       ` Andrej Borsenkow
2000-03-31 10:33         ` Andrew Morton
2000-04-01 17:13       ` Zefram
2000-03-30  6:57 ` Andrej Borsenkow
2000-03-30 13:27 ` Zefram
2000-03-31 16:18   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).