zsh-users
 help / color / mirror / code / Atom feed
From: Friedrich Dominicus <Friedrich.Dominicus@inka.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: New user questions
Date: Thu, 30 Mar 2000 07:27:24 +0200	[thread overview]
Message-ID: <38E2E5BC.F4A8CB2B@inka.de> (raw)
In-Reply-To: <38E2C6AA.62D027CD@asiapacificm01.nt.com>

Andrew Morton wrote:
> 

many questions. Let's see.
> 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.

Now you know Shells, so you should first spend some time reading zsh
docs

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

TAB and following options should do the job
setopt automenu autolist should help too

It's even better than just seeing what is there just type TAB again and
one after the other possible extension is used.

man zshopt

and you should check the compctl or the like for cd it might look like:
compctl -g '*(-/)' cd rmdir

which means that you want after a cd just directories as expansion.
> 
> 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

sudo !!$

> 
> 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

CTRL+R  (if you use emacs-bindings)




> 
> 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?

sure use s.th like
setopt pushdtohome pushdminus pushdsilent autopushd


check zshoptions
> 
> 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

echo !!(number)

in you example
echo !!1 TAB expands to echo echo aaa
> 
> forward-kill-line
> -----------------
> 
> Is there a widget which deletes from the cursor to the end of line?

CTRL+k
or kill-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.

guess zsh makes this automatically. But don't know
> 
> 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.

ctrl+l


Regards
Friedrich


  parent reply	other threads:[~2000-03-30  5:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-30  3:14 Andrew Morton
2000-03-30  5:20 ` Chmouel Boudjnah
2000-03-30  5:27 ` Friedrich Dominicus [this message]
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
2000-03-31  7:42 Sven Wischnowsky
2000-03-31 10:42 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38E2E5BC.F4A8CB2B@inka.de \
    --to=friedrich.dominicus@inka.de \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).