zsh-users
 help / color / mirror / code / Atom feed
* fg jobs info
@ 2007-09-02 15:43 Atom Smasher
  2007-09-02 17:59 ` Bart Schaefer
  0 siblings, 1 reply; 66+ messages in thread
From: Atom Smasher @ 2007-09-02 15:43 UTC (permalink / raw)
  To: zsh-users

hypothetical example....

% jobs
[1]    suspended  sleep 30
[2]    suspended  sleep 31
[3]    suspended  sleep 32
[4]    suspended  sleep 33
[5]  - suspended  sleep 34
[6]  + suspended  sleep 35

now, if i run 'fg' or 'fg %n', how can i make the command name (sleep xx) 
available to the shell?

why i want this: i've tweaked my ~/.zshrc file to fill in the tabs of 
mrxvt (and the windowlist in screen) with the current command name (and 
some other goodies, i'll post the rc file if there's interest). ie; i can 
quickly find the 'emacs somefile' tab (or screen) because the tab (or 
screen) says "emacs somefile". cool. but if i suspend the command, then 
bring it back with 'fg', the tab (or screen) now says "fg". not cool.

there are some hacks to get around this, but they're not pretty. i'm not 
sure if this can be done elegantly, without requesting a new feature that 
puts the ~real~ foreground command into an environment var, and/or a 4th 
argument to preexec.

unless there's a way to simulate the fg command (ie; a "-n" dry run 
argument) i think the best way to handle this (ideally) would be a 4th 
argument to preexec that contains what fg is bringing to the foreground.

any other thoughts?

thanks...


-- 
         ...atom

  ________________________
  http://atom.smasher.org/
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"Do not wait; the time will never be 'just right.'
 	 Start where you stand, and work with whatever
 	 tools you may have at your command, and better
 	 tools will be found as you go along."
 		-- Napoleon Hill



^ permalink raw reply	[flat|nested] 66+ messages in thread
* mailcap configuration in zsh can't open .bk files
@ 2013-08-30  1:12 vinurs
  2013-08-30  2:59 ` Phil Pennock
  0 siblings, 1 reply; 66+ messages in thread
From: vinurs @ 2013-08-30  1:12 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

Hi all,
I wrote
application/pdf; vinurs-pdf %s ;
in my .mailcap file, vinurs-pdf is a function that can open pdf files;

In zsh configuration file:
# MIME system
autoload -U zsh-mime-setup
zsh-mime-setup

then in zsh, I can open pdf files, but ,when I mv test.pdf to test.pdf.bk,
It can not be opened.
I use file --mime-type test.pdf.bk, It shows:
test.pdf.bk: application/pdf

Why this happens? How can I configure that zsh can open test.pdf.bk files.

^ permalink raw reply	[flat|nested] 66+ messages in thread
* Synchronous vs. Asynchronous
@ 2010-08-20 15:35 Bart Schaefer
  2010-08-20 15:45 ` Peter Stephenson
  0 siblings, 1 reply; 66+ messages in thread
From: Bart Schaefer @ 2010-08-20 15:35 UTC (permalink / raw)
  To: zsh-users

I just occured to me that when the zsh manual describes something as
"asynchronous" it means not synchronous with respect to the parent zsh,
e.g., that the shell will not wait for it.  That is distinct from
whether it is [not] synchronous with respect to other commands in the
same syntactic construct.

So if we're going to cause zsh to wait for >(...), we should change the
description in the documentation to no longer say "asynchronous".


^ permalink raw reply	[flat|nested] 66+ messages in thread
[parent not found: <1209745744.25440.ezmlm@sunsite.dk>]
* preexec hook: possible enhancement?
@ 2007-09-05 16:34 Matthew Wozniski
  2007-09-05 17:14 ` Bart Schaefer
  2007-09-05 19:32 ` Stephane Chazelas
  0 siblings, 2 replies; 66+ messages in thread
From: Matthew Wozniski @ 2007-09-05 16:34 UTC (permalink / raw)
  To: zsh-users

While we're on the topic of using the preexec hook to set the
titlebar, I'd like to bounce something off the list and see if 1) it's
possible and 2) people would consider it useful.  So, would it be
possible and/or useful to have the preexec hook (or some other, new
hook) fire once for each pipeline in the current command, rather
than just once using the entire current line?

For instance, if one were to type
% xterm ; echo google.com | xargs w3m ; gnome-terminal
could a hook be inserted to fire once with "xterm", once with "echo 
google.com | xargs w3m", and once with "gnome-terminal" passed to it,
rather than just once with
"xterm ; echo google.com | xargs w3m ; gnome-terminal" passed to it?

It's by no means a necessary feature, and I don't know if others would
even find it useful, but I think it would be pretty cool to watch the
titlebar change as we moved from one pipeline to the next.

~Matt


^ permalink raw reply	[flat|nested] 66+ messages in thread
* Documentation of colon in parameter expansion
@ 2007-03-31 20:51 Miciah Dashiel Butler Masters
  2007-04-01 17:53 ` Bart Schaefer
  0 siblings, 1 reply; 66+ messages in thread
From: Miciah Dashiel Butler Masters @ 2007-03-31 20:51 UTC (permalink / raw)
  To: zsh-users

Hello,

I was recently trying to look up the syntax for '${NAME-WORD}'.
A search for '${NAME:-WORD}' turns up information on that syntax,
but one must look several paragraphs down to see that '${NAME-WORD}'
is also allowed and has a distinct meaning.  The string '${NAME-WORD}'
never appears in the manual.  I foolishly assumed that this meant
that the syntax is undefined.

Since the manual can be expected to be used primarily as a reference
(I personally have not read it thru in years), it seems like my
behaviour is to be expected.  Per haps the manual should have
the string '${NAME-WORD}' immediately above or below the string
'${NAME:-WORD}', and a sentence along the lines of, 'See below about
the variant of this syntax without the colon.'

Similar naturally applies to '${NAME:+WORD}', '${NAME:=WORD}', &c. I
realise that this means a fair bit of duplication, so I only offer it
as a suggestion.

Love,

-- 
Miciah Masters <miciah.masters@gmail.com> / <mdm0304@ecu.edu> /
<miciah@myrealbox.com>



^ permalink raw reply	[flat|nested] 66+ messages in thread
* Move command line options to start of line
@ 2006-10-06 15:07 Peter Stephenson
  2006-10-07  2:55 ` Bart Schaefer
  0 siblings, 1 reply; 66+ messages in thread
From: Peter Stephenson @ 2006-10-06 15:07 UTC (permalink / raw)
  To: Zsh users list

Not sure if anybody actually needs such a thing, but the Austin group
(essentially POSIX) has been worrying about it, so I thought I'd while
away Friday afternoon by writing a zle widget (looks like Chris Johnson
had a similar idea...) Unfortunately zsh is so powerful it was trivial.

See the description at the top.

#top
# This moves an option, possibly with arguments, from before the
# cursor to immediately after the command word.
# Examples (cursor assumed to be at the end of the line):
#    ls file1 file2 -l
# -> ls -l files 1files
#
#    p4 opened -u pws
# -> p4 -u pws opened
#
# In the unlikely event that the argument of an option begins with -,
# repeated application will have the correct effect.

local -a line
integer i

line=(${(z)LBUFFER})
i=${line[(I)-*]}

(( i < 3 )) && return 1

LBUFFER="$line[1] $line[i,-1] $line[2,i-1]"
#bottom

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 66+ messages in thread
* Solved, but now a new twist (was: Double Evaluation Question (not in FAQ))
@ 2006-09-04  8:43 Com MN PG P E B Consultant 3
  2006-09-04 18:24 ` Bart Schaefer
  0 siblings, 1 reply; 66+ messages in thread
From: Com MN PG P E B Consultant 3 @ 2006-09-04  8:43 UTC (permalink / raw)
  To: zsh-users Mailinglist

> Assuming that variables are assigned in the following way:
>
>  x=abc
>  y=def
>  z='$x   $y' # Note: Single Quotes!
>
> How could I write an expression, which "evaluates" $z, in
> that it would return "abc   def"? 

Sorry, I should have read the man page in better detail before
posting this question. The solution is of course

   ${(e)z}

But now comes another twist to this problem: I found that I *also*
would like to have the resulting string to undergo tilde-expansion,
which is of course a completely different story.

That is, if I have an assignment

  x='~linus    ~steve'

Is there also a simple solution, which expands $x to the home
directories
of linus and steve, with spacing preserved?

Ronald
-- 
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@siemens.com



^ permalink raw reply	[flat|nested] 66+ messages in thread
[parent not found: <schaefer@brasslantern.com>]

end of thread, other threads:[~2013-09-02 17:45 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-02 15:43 fg jobs info Atom Smasher
2007-09-02 17:59 ` Bart Schaefer
2007-09-03  7:38   ` Stephane Chazelas
2007-09-03 15:58     ` Bart Schaefer
2007-09-03 16:31   ` Matthew Wozniski
2007-09-04 11:16   ` Atom Smasher
2007-09-04 15:31     ` Bart Schaefer
2007-09-04 20:38       ` Peter Stephenson
2007-09-04 20:45       ` Peter Stephenson
2007-09-05  9:02       ` Atom Smasher
2007-09-05  9:28         ` Peter Stephenson
2007-09-05 11:21           ` Miek Gieben
2007-09-05 11:34             ` Matthew Wozniski
2007-09-05 11:36               ` Miek Gieben
2007-09-05 11:34             ` Atom Smasher
2007-09-05 11:40             ` Frank Terbeck
2007-09-05 12:18               ` Miek Gieben
2007-09-05 15:30           ` Bart Schaefer
2007-09-05 15:55             ` Peter Stephenson
  -- strict thread matches above, loose matches on Subject: below --
2013-08-30  1:12 mailcap configuration in zsh can't open .bk files vinurs
2013-08-30  2:59 ` Phil Pennock
2013-08-30  3:27   ` shawn wilson
2013-08-30  8:29   ` Peter Stephenson
2013-08-30 17:10     ` Bart Schaefer
2013-09-01 17:11       ` Peter Stephenson
2013-09-02  1:28         ` vinurs
2013-09-02 13:46           ` Peter Stephenson
2013-09-02 17:45             ` Bart Schaefer
2010-08-20 15:35 Synchronous vs. Asynchronous Bart Schaefer
2010-08-20 15:45 ` Peter Stephenson
2010-08-20 17:36   ` Bart Schaefer
2010-08-21 18:41     ` Peter Stephenson
2010-08-21 22:31       ` Vincent Lefevre
2010-08-22  5:02         ` Bart Schaefer
2010-08-22  5:42       ` Bart Schaefer
2010-08-22 17:53         ` Peter Stephenson
     [not found] <1209745744.25440.ezmlm@sunsite.dk>
2008-05-02 17:39 ` Zsh hangs sometimes? Kamil Jońca
2008-05-02 22:44   ` Peter Stephenson
2008-05-03 11:35     ` Bart Schaefer
2008-05-04 12:13       ` Peter Stephenson
2008-05-04 17:00         ` Bart Schaefer
2008-05-04 18:14           ` Peter Stephenson
2008-05-04 20:00             ` Bart Schaefer
2008-05-05 11:54               ` Aaron Davies
2007-09-05 16:34 preexec hook: possible enhancement? Matthew Wozniski
2007-09-05 17:14 ` Bart Schaefer
2007-09-05 19:05   ` Peter Stephenson
2007-09-05 21:11     ` Matthew Wozniski
2007-09-08 17:20     ` Bart Schaefer
2007-09-05 19:32 ` Stephane Chazelas
2007-03-31 20:51 Documentation of colon in parameter expansion Miciah Dashiel Butler Masters
2007-04-01 17:53 ` Bart Schaefer
2007-04-01 18:26   ` Peter Stephenson
2006-10-06 15:07 Move command line options to start of line Peter Stephenson
2006-10-07  2:55 ` Bart Schaefer
2006-10-07  6:20   ` Andrey Borzenkov
2006-10-07 12:02   ` Peter Stephenson
2006-10-07 12:39     ` Bart Schaefer
2006-10-07 17:21       ` Dan Nelson
2006-10-07 17:36       ` Peter Stephenson
2006-09-04  8:43 Solved, but now a new twist (was: Double Evaluation Question (not in FAQ)) Com MN PG P E B Consultant 3
2006-09-04 18:24 ` Bart Schaefer
2006-09-07 17:53   ` Peter Stephenson
     [not found] <schaefer@brasslantern.com>
2006-07-30  6:29 ` Rebinding a widget within a keymap Bart Schaefer
2006-07-30 17:18   ` Peter Stephenson
2006-07-30 17:46     ` 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).