zsh-users
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: "Andrew Morton" <morton@nortelnetworks.com>, zsh-users@sunsite.auc.dk
Subject: Re: New user questions
Date: Fri, 31 Mar 2000 16:18:55 +0000	[thread overview]
Message-ID: <1000331161855.ZM11889@candle.brasslantern.com> (raw)
In-Reply-To: <38E2C6AA.62D027CD@asiapacificm01.nt.com>

On Mar 30,  3:14am, Andrew Morton wrote:
} Subject: New user questions
}
} 1: When I printed zsh_a4.ps on an HP LaserJet 4 the last few columns
} were truncated.

Silly question, but ... were you actually printing on size A4 paper?

I'm jumping into the rest of this a bit late, but ...
 
} 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...)

Assuming that you have:
	bindkey "^N" down-line-or-history
	bindkey "^P" up-line-or-history
	bindkey "^U" kill-whole-line
	bindkey "^Y" yank

Then:
	bindkey -s "^W" "^P^U^Y^N^Y"

No need to write a widget for something as simple as this.  The only
tricky bit is the extra ^Y in the middle, needed to "leave the history
as you found it" for other editing commands later.

It's possible that you meant "insert the previous history line at the
cursor" ... that really does require a widget, because zsh loses the
cursor and mark positions when moving up and down through the history.

} ^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).

Check out the STTY parameter.

	stty intr '^G'		# Change interrupt character for zsh
	ttyctl -f		# Freeze settings, just in case
	export STTY='intr ^C'	# Restore interrupt for external commands
 
} 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?

The pushd/popd commands used to work this way (I still have a local hack
to enable it via setopt).  There's an example in the FAQ document that
shows how to do it with shell functions.

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

In addition to WORDCHARS (which others have pointed out), you might try
using the vi-* word motion widgets instead of the emacs ones.

One additional comment:

On Mar 30,  7:27am, Friedrich Dominicus wrote:
} Subject: Re: New user questions
}
} > insert-previous-line
} > --------------------
} > 
} > pwold011:~> /sbin/shutdown
} > shutdown: must be root.
} > pwold011:~> sudo ^W
} 
} sudo !!$

Get that `$' out of there.  Just `sudo !!' does it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~2000-03-31 16:20 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
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 [this message]
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=1000331161855.ZM11889@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=morton@nortelnetworks.com \
    --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).