From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24190 invoked from network); 31 Mar 2000 16:20:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Mar 2000 16:20:14 -0000 Received: (qmail 24217 invoked by alias); 31 Mar 2000 16:19:16 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3001 Received: (qmail 24197 invoked from network); 31 Mar 2000 16:19:14 -0000 From: "Bart Schaefer" Message-Id: <1000331161855.ZM11889@candle.brasslantern.com> Date: Fri, 31 Mar 2000 16:18:55 +0000 In-Reply-To: <38E2C6AA.62D027CD@asiapacificm01.nt.com> Comments: In reply to "Andrew Morton" "New user questions" (Mar 30, 3:14am) References: <38E2C6AA.62D027CD@asiapacificm01.nt.com> <38E2E5BC.F4A8CB2B@inka.de> <000001bf9a14$3f9b50b0$21c9ca95@mow.siemens.ru> <000101bf9a15$4387d7b0$21c9ca95@mow.siemens.ru> <38E336AF.C58B0A47@u.genie.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrew Morton" , zsh-users@sunsite.auc.dk Subject: Re: New user questions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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