Zsh Mailing List Archive
Messages sorted by:
Re: New user questions
- X-seq: zsh-users 3001
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrew Morton" <morton@xxxxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxx
- Subject: Re: New user questions
- Date: Fri, 31 Mar 2000 16:18:55 +0000
- In-reply-to: <38E2C6AA.62D027CD@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <38E2C6AA.62D027CD@xxxxxxxxxxxxxxxxxxxxx> <m21z4t3ufz.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <38E2E5BC.F4A8CB2B@xxxxxxx> <000001bf9a14$3f9b50b0$21c9ca95@xxxxxxxxxxxxxx> <000101bf9a15$4387d7b0$21c9ca95@xxxxxxxxxxxxxx> <38E336AF.C58B0A47@xxxxxxxxxxxxx> <E12aez4-0006IZ-00@xxxxxxxxxxxxxxxxxx>
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 ...
} 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
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.
} 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.
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
Messages sorted by: