zsh-users
 help / color / mirror / code / Atom feed
* zsh tips plea (tip of the day)
@ 2004-07-23 11:12 zzapper
  2004-07-23 11:24 ` Peter Stephenson
                   ` (4 more replies)
  0 siblings, 5 replies; 35+ messages in thread
From: zzapper @ 2004-07-23 11:12 UTC (permalink / raw)
  To: zsh-users

Sorry me again,

As this group's been a bit quiet lately, my plea would be for you experts to occasionally post a
tip, or explain some aspect of zsh. 


zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
@ 2004-07-23 11:24 ` Peter Stephenson
  2004-07-23 11:39   ` Joakim Ryden
  2004-07-23 12:49   ` Björn Lindström
  2004-07-23 16:55 ` Atom 'Smasher'
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 35+ messages in thread
From: Peter Stephenson @ 2004-07-23 11:24 UTC (permalink / raw)
  To: Zsh users list

zzapper wrote:
> As this group's been a bit quiet lately, my plea would be for you experts to 
> occasionally post a
> tip, or explain some aspect of zsh. 

The usual way of getting these is to post questions...

pws


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:24 ` Peter Stephenson
@ 2004-07-23 11:39   ` Joakim Ryden
  2004-07-23 22:55     ` Aaron Davies
  2004-07-23 12:49   ` Björn Lindström
  1 sibling, 1 reply; 35+ messages in thread
From: Joakim Ryden @ 2004-07-23 11:39 UTC (permalink / raw)
  To: Zsh users list

Peter Stephenson wrote:
> zzapper wrote:
> 
>>As this group's been a bit quiet lately, my plea would be for you experts to 
>>occasionally post a
>>tip, or explain some aspect of zsh. 
> 
> 
> The usual way of getting these is to post questions...

OK - here's a question... ;)  What's a really cool thing you have done 
with zsh recently? Or if you will... a few lines about "how I was able 
to solve my issue using zsh" (yes, I was a high school teacher in a 
previous life).

--Jo


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:24 ` Peter Stephenson
  2004-07-23 11:39   ` Joakim Ryden
@ 2004-07-23 12:49   ` Björn Lindström
  2004-07-28 15:18     ` Felix Rosencrantz
  1 sibling, 1 reply; 35+ messages in thread
From: Björn Lindström @ 2004-07-23 12:49 UTC (permalink / raw)
  To: zsh-users

Peter Stephenson <pws@csr.com> writes:

> zzapper wrote:
>
>> As this group's been a bit quiet lately, my plea would be for you
>> experts to occasionally post a tip, or explain some aspect of zsh.
>
> The usual way of getting these is to post questions...

... and if anyone ever feels the urge to push for some particular
feature, there is a more fitting forum for that - http://zshwiki.org/.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
  2004-07-23 11:24 ` Peter Stephenson
@ 2004-07-23 16:55 ` Atom 'Smasher'
  2004-07-23 20:04   ` Vincent Lefevre
  2004-07-28 12:08   ` Vincent Lefevre
  2004-07-24 16:42 ` zzapper
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 35+ messages in thread
From: Atom 'Smasher' @ 2004-07-23 16:55 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

in ~/.zshrc:

precmd () {
     print -n '\017'
}



 	...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"You can't hold a man down without staying down with him."
 		-- Booker T Washington
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iQEcBAEBCAAGBQJBAULuAAoJEAx/d+cTpVcik68H/jnnaXNuoKebakA52rVernLj
yNeGkHVvTTv2+9TbV6WO/FG5TpMV/32jChHE+FKj8e8jeUUFuyjYwUdgVh5tYENT
kY9nif6o5GreV26F4vQCZJzxX9Il1ZomaRFwJdbWvS+6Qyjx3NmzknIy4XSvvtSl
YDQH4/ca08mia/XKbsFxXMHZggyGpwCM79krow4Xi4Ypa0scidjhva1Bf0gYGrq8
z23HYUKGGCSPXQWdaJliS/2t0gVg9x8qlnXsVUhJ5sIozN8yQCMUoA8YBY7zM6Q7
P5VOcBb8Ep0qyCj8Ql2tblZD/U3FdVZb4UYecT/LeCvHPqdoAKRFmW/4y6E9ptI=
=Z2h6
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 16:55 ` Atom 'Smasher'
@ 2004-07-23 20:04   ` Vincent Lefevre
  2004-07-23 20:23     ` Philippe Troin
  2004-07-28 12:08   ` Vincent Lefevre
  1 sibling, 1 reply; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-23 20:04 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 12:55:03 -0400, Atom 'Smasher' wrote:
> in ~/.zshrc:
> 
> precmd () {
>     print -n '\017'
> }

This is really nice! Why haven't I thought about that before? :)
I wonder if this shouldn't be done by zsh in standard.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 20:04   ` Vincent Lefevre
@ 2004-07-23 20:23     ` Philippe Troin
  2004-07-23 20:26       ` Vincent Lefevre
  0 siblings, 1 reply; 35+ messages in thread
From: Philippe Troin @ 2004-07-23 20:23 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: zsh-users

Vincent Lefevre <vincent@vinc17.org> writes:

> On 2004-07-23 12:55:03 -0400, Atom 'Smasher' wrote:
> > in ~/.zshrc:
> > 
> > precmd () {
> >     print -n '\017'
> > }
> 
> This is really nice! Why haven't I thought about that before? :)
> I wonder if this shouldn't be done by zsh in standard.

How is that different from "setopt promptcr"?

Phil.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 20:23     ` Philippe Troin
@ 2004-07-23 20:26       ` Vincent Lefevre
  2004-07-23 21:37         ` Philippe Troin
  0 siblings, 1 reply; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-23 20:26 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 13:23:57 -0700, Philippe Troin wrote:
> Vincent Lefevre <vincent@vinc17.org> writes:
> 
> > On 2004-07-23 12:55:03 -0400, Atom 'Smasher' wrote:
> > > in ~/.zshrc:
> > > 
> > > precmd () {
> > >     print -n '\017'
> > > }
> > 
> > This is really nice! Why haven't I thought about that before? :)
> > I wonder if this shouldn't be done by zsh in standard.
> 
> How is that different from "setopt promptcr"?

\017 is not a CR, but a ^O (the opposite of ^N). Cat a binary file
and you would see that this is useful. :)

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 20:26       ` Vincent Lefevre
@ 2004-07-23 21:37         ` Philippe Troin
  2004-07-23 21:50           ` Vincent Lefevre
  0 siblings, 1 reply; 35+ messages in thread
From: Philippe Troin @ 2004-07-23 21:37 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: zsh-users

Vincent Lefevre <vincent@vinc17.org> writes:

> On 2004-07-23 13:23:57 -0700, Philippe Troin wrote:
> > Vincent Lefevre <vincent@vinc17.org> writes:
> > 
> > > On 2004-07-23 12:55:03 -0400, Atom 'Smasher' wrote:
> > > > in ~/.zshrc:
> > > > 
> > > > precmd () {
> > > >     print -n '\017'
> > > > }
> > > 
> > > This is really nice! Why haven't I thought about that before? :)
> > > I wonder if this shouldn't be done by zsh in standard.
> > 
> > How is that different from "setopt promptcr"?
> 
> \017 is not a CR, but a ^O (the opposite of ^N). Cat a binary file
> and you would see that this is useful. :)

I did, but I did not see the useful thing you mention.

How is echoing ^O to the terminal helps?

Phil.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 21:37         ` Philippe Troin
@ 2004-07-23 21:50           ` Vincent Lefevre
  2004-07-23 22:02             ` Dan Nelson
  0 siblings, 1 reply; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-23 21:50 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 14:37:18 -0700, Philippe Troin wrote:
> I did, but I did not see the useful thing you mention.
> 
> How is echoing ^O to the terminal helps?

^O is rmacs (end alternate character set). It is useful when ^N
(smacs: start alternate character set) has been sent to the terminal,
for instance after a binary file has been cat'ed.

The alternate character set basically corresponds to the line graphics
characters (replacing the normal ASCII characters).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 21:50           ` Vincent Lefevre
@ 2004-07-23 22:02             ` Dan Nelson
  2004-07-24  7:14               ` Vincent Lefevre
  0 siblings, 1 reply; 35+ messages in thread
From: Dan Nelson @ 2004-07-23 22:02 UTC (permalink / raw)
  To: zsh-users

In the last episode (Jul 23), Vincent Lefevre said:
> On 2004-07-23 14:37:18 -0700, Philippe Troin wrote:
> > I did, but I did not see the useful thing you mention.
> > 
> > How is echoing ^O to the terminal helps?
> 
> ^O is rmacs (end alternate character set). It is useful when ^N
> (smacs: start alternate character set) has been sent to the terminal,
> for instance after a binary file has been cat'ed.
> 
> The alternate character set basically corresponds to the line
> graphics characters (replacing the normal ASCII characters).

You could also use $termcap[me] (or $terminfo[exit_attribute_mode] if
you like typing), which will turn off colors, boldface, etc as well as
being more portable.  ^O is only a control character on some terminals;
on others it's a printable character.

-- 
	Dan Nelson
	dnelson@allantgroup.com


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:39   ` Joakim Ryden
@ 2004-07-23 22:55     ` Aaron Davies
  2004-07-24  7:22       ` Vincent Lefevre
  0 siblings, 1 reply; 35+ messages in thread
From: Aaron Davies @ 2004-07-23 22:55 UTC (permalink / raw)
  To: zsh-users

On Friday, July 23, 2004, at 07:39 AM, Joakim Ryden wrote:

> Peter Stephenson wrote:
>
>> zzapper wrote:
>>
>>> As this group's been a bit quiet lately, my plea would be for you 
>>> experts to occasionally post a tip, or explain some aspect of zsh.
>
>> The usual way of getting these is to post questions...
>
> OK - here's a question... ;)  What's a really cool thing you have done 
> with zsh recently? Or if you will... a few lines about "how I was able 
> to solve my issue using zsh" (yes, I was a high school teacher in a 
> previous life).

This isn't really recent, but probably the most common thing I do in 
zsh that can't be done anywhere else is use the advanced globbing 
stuff. For instance, I have a (fairly large) directory tree that I use 
to categorize and store incoming files that need to be processed, after 
which they get moved to archival directories through symlinks located 
in each "leaf" directory. Determining whether I have any files waiting 
for processing thus involves doing a recursive check for plain files 
only below the root of this tree. In bash, this would either be a 
significant amount of shell scripting effort or a rather ugly "find" 
command. (I hate find.) In zsh, it's "ls **/*(.)". Isn't that nice?
-- 
     __                      __
    /  )                    /  )
   /--/ __. .__  ______    /  / __. , __o  _  _
  /  (_(_/|_/ (_(_) / (_  (__/_(_/|_\/ <__</_/_)_




^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 22:02             ` Dan Nelson
@ 2004-07-24  7:14               ` Vincent Lefevre
  0 siblings, 0 replies; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-24  7:14 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 17:02:11 -0500, Dan Nelson wrote:
> You could also use $termcap[me] (or $terminfo[exit_attribute_mode] if

or $terminfo[sgr0]

> you like typing), which will turn off colors, boldface, etc as well as
> being more portable.  ^O is only a control character on some terminals;
> on others it's a printable character.

OK, so, that would be:

  print -n "$terminfo[rmacs]$terminfo[sgr0]"

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 22:55     ` Aaron Davies
@ 2004-07-24  7:22       ` Vincent Lefevre
  2004-07-24  8:00         ` Atom 'Smasher'
  2004-07-24 15:52         ` Aaron Davies
  0 siblings, 2 replies; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-24  7:22 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 18:55:09 -0400, Aaron Davies wrote:
> (I hate find.)

Me too.

> In zsh, it's "ls **/*(.)". Isn't that nice?

I hope you are not under linux, with its stupid limitation for exec.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24  7:22       ` Vincent Lefevre
@ 2004-07-24  8:00         ` Atom 'Smasher'
  2004-07-24  8:10           ` Vincent Lefevre
  2004-07-24 15:52         ` Aaron Davies
  1 sibling, 1 reply; 35+ messages in thread
From: Atom 'Smasher' @ 2004-07-24  8:00 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, 24 Jul 2004, Vincent Lefevre wrote:
> On 2004-07-23 18:55:09 -0400, Aaron Davies wrote:

>> (I hate find.)
>
> Me too.
==================

i like find.


>> In zsh, it's "ls **/*(.)". Isn't that nice?
>
> I hope you are not under linux, with its stupid limitation for exec.
===================

i avoid linux, but sometimes i have to use it... what's the limitation for 
exec?



         ...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"The master class has always declared the war with
 	 nothing to loose and all to gain; the subject class
 	 have always fought the battles with nothing to gain
 	 and all to loose."
 		-- Eugene V. Debs, 1918
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iQEcBAEBCAAGBQJBAhcpAAoJEAx/d+cTpVciFSkIAKGN2PlKG/LXmkGxrSLvI9lq
AG50Izgmnut2ENaFt/p+q0Th6Ynnn/LnnHe3d4YfuCANKXVtcu4vOtV+Cnh47wjz
h5LfamZgbDFlBRCVu/LzIOuVmmo9koHIqceWSR2RPhIqd44zvDbgX0wbsyA3GNFP
FQaMp3RJD7Yxzau2eXgE/5JSbRMeECV36K3m3d4wOQZn83I4fSM6m2iJeCvfVw+I
C8Tbxyjykc5O3q6+XNi2HXMmbh9rKt/nvUvqScSkcB5q2cGjJeiFl++7Hwy27Cpq
tSN64aC6xeEopURIQ5JLzTtZjej1PDu4nCKVVMZDnfcgh4mpp+LbMfPczdrry9c=
=jKbd
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24  8:00         ` Atom 'Smasher'
@ 2004-07-24  8:10           ` Vincent Lefevre
  2004-07-24  8:32             ` Atom 'Smasher'
  0 siblings, 1 reply; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-24  8:10 UTC (permalink / raw)
  To: zsh-users

On 2004-07-24 04:00:35 -0400, Atom 'Smasher' wrote:
> i avoid linux, but sometimes i have to use it... what's the
> limitation for exec?

There's a limitation on the number of characters or arugments:

ay:~> /bin/echo {1..30000}
zsh: argument list too long: /bin/echo
zsh: exit 127   /bin/echo {1..30000}

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24  8:10           ` Vincent Lefevre
@ 2004-07-24  8:32             ` Atom 'Smasher'
  2004-07-24 11:23               ` Vincent Lefevre
  0 siblings, 1 reply; 35+ messages in thread
From: Atom 'Smasher' @ 2004-07-24  8:32 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, 24 Jul 2004, Vincent Lefevre wrote:
> On 2004-07-24 04:00:35 -0400, Atom 'Smasher' wrote:

>> i avoid linux, but sometimes i have to use it... what's the
>> limitation for exec?
>
> There's a limitation on the number of characters or arugments:
>
> ay:~> /bin/echo {1..30000}
> zsh: argument list too long: /bin/echo
> zsh: exit 127   /bin/echo {1..30000}
=====================

i can do that in freeBSD:
 	$ ls {1..30000}
 	zsh: argument list too long: ls

i thought that's what xargs is for...
 	$ echo {1..30000} | xargs ls


         ...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"The real truth of the matter is, as you and I know, that a
 	 financial element in the large centers has owned the
 	 government of the U.S. since the days of Andrew Jackson."
 		-- Franklin Delano Roosevelt, November 21st, l933
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iQEcBAEBCAAGBQJBAh6iAAoJEAx/d+cTpVci+voIAI1CM5mIgcnGBR8dGxKXJaoH
WjidTbB7CbPvbtLDL/ZofLNMewsHuQlT+MnltGPMZ1N4/n8/Tflwgk6b5iKW9b4J
p8B1cFjLN8lzdQer9JfpY9Kb2oJGhQpw4jNAMrWaI4wOn/ku3dbBV3QWqQA7KAAf
iB81VkOHI0W1ttRWp1OWJOMmNEq36Ihur0hbdex6ytXgPKStI/ivnJ+Yhol7lsCU
Ud/9d3mJGXSuDgBEI2aOrhOZ+5LpssMzuRqolnAfYtycOkE1KvlIR9mRy7iD/3Pn
HzBrgnfb0/n3CQhuExsu4emTgvzFoK9Xg4zmCKoaaW+Y2jb19Oj6vRn4gsaQAa4=
=FArC
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24  8:32             ` Atom 'Smasher'
@ 2004-07-24 11:23               ` Vincent Lefevre
  2004-07-24 12:42                 ` Geoff Wing
  2004-07-24 17:47                 ` zsh tips plea (tip of the day) Atom 'Smasher'
  0 siblings, 2 replies; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-24 11:23 UTC (permalink / raw)
  To: zsh-users

On 2004-07-24 04:32:28 -0400, Atom 'Smasher' wrote:
> i thought that's what xargs is for...
> 	$ echo {1..30000} | xargs ls

Except that
  * xargs may be insecure, unless the option -0 is used;
  * xargs can't always be used for every command;
  * this requires more things to type (not important for scripts,
    but this may be annoying when typing commands interactively).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 11:23               ` Vincent Lefevre
@ 2004-07-24 12:42                 ` Geoff Wing
  2004-07-25  0:46                   ` Vincent Lefevre
  2004-07-24 17:47                 ` zsh tips plea (tip of the day) Atom 'Smasher'
  1 sibling, 1 reply; 35+ messages in thread
From: Geoff Wing @ 2004-07-24 12:42 UTC (permalink / raw)
  To: zsh-users

Vincent Lefevre <vincent@vinc17.org> typed:
: On 2004-07-24 04:32:28 -0400, Atom 'Smasher' wrote:
:> i thought that's what xargs is for...
:> 	$ echo {1..30000} | xargs ls
: Except that
:   * xargs may be insecure, unless the option -0 is used;

It's not about insecurity as much as that it doesn't do what you want
or expect, necessarily.

:   * xargs can't always be used for every command;
:   * this requires more things to type (not important for scripts,
:     but this may be annoying when typing commands interactively).

% print -N {1..30000} | xargs -0 ls

That doesn't do exactly the same thing but that's what you've got.
Live with it.  I use it (something like it - ``**/*(.)'') nearly
every day.  It's the same with any Unix-like system.  Everything
has limitations.  It's still a lot better/easier than using find
or similar.

Regards,
Geoff


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24  7:22       ` Vincent Lefevre
  2004-07-24  8:00         ` Atom 'Smasher'
@ 2004-07-24 15:52         ` Aaron Davies
  1 sibling, 0 replies; 35+ messages in thread
From: Aaron Davies @ 2004-07-24 15:52 UTC (permalink / raw)
  To: zsh-users


On Saturday, July 24, 2004, at 03:22 AM, Vincent Lefevre wrote:

> On 2004-07-23 18:55:09 -0400, Aaron Davies wrote:
>
>> In zsh, it's "ls **/*(.)". Isn't that nice?
>
> I hope you are not under linux, with its stupid limitation for exec.

I'm on OS X, but it has the same limitations. If I try to list my home 
directory like that, it churns for about thirty seconds, then errors 
out. For the particular problem I use it for though, that never comes 
up--there's rarely more than a few dozen files to list, and never more 
than a few hundred.
-- 
     __                      __
    /  )                    /  )
   /--/ __. .__  ______    /  / __. , __o  _  _
  /  (_(_/|_/ (_(_) / (_  (__/_(_/|_\/ <__</_/_)_


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
  2004-07-23 11:24 ` Peter Stephenson
  2004-07-23 16:55 ` Atom 'Smasher'
@ 2004-07-24 16:42 ` zzapper
  2004-07-24 18:44   ` Bart Schaefer
  2004-07-26 14:13 ` Peter Stephenson
  2004-07-29 15:24 ` zzapper
  4 siblings, 1 reply; 35+ messages in thread
From: zzapper @ 2004-07-24 16:42 UTC (permalink / raw)
  To: zsh-users

Hi,

Anyway my super tip is

> vim =some_script 

where the = will find the file if it's anyway in your paths (where is this in the doc?)

> vim **/some_script

find anyware under your current directory


zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 11:23               ` Vincent Lefevre
  2004-07-24 12:42                 ` Geoff Wing
@ 2004-07-24 17:47                 ` Atom 'Smasher'
  1 sibling, 0 replies; 35+ messages in thread
From: Atom 'Smasher' @ 2004-07-24 17:47 UTC (permalink / raw)
  To: zsh-users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Sat, 24 Jul 2004, Vincent Lefevre wrote:
> On 2004-07-24 04:32:28 -0400, Atom 'Smasher' wrote:

>> i thought that's what xargs is for...
>> 	$ echo {1..30000} | xargs ls
>
> Except that
>  * xargs may be insecure, unless the option -0 is used;
================

i consider that more of a bug-prevention option than i security option, 
although it certainly can have security related implications.


>  * xargs can't always be used for every command;
================

maybe... but it can do a lot more than most people think. like find, it's 
one of the more awkward and unintuitive commands.


>  * this requires more things to type (not important for scripts,
>    but this may be annoying when typing commands interactively).
================

i consider my command-line skills and scripting skills to reinforce each 
other, so i don't mind doing strange things (aka things i've never done 
before, or things that are hard to type) in one setting, because i will 
take that with me to the other setting.

this last point is especially true with zsh, since it blows away all other 
shells at doing things on the command line spanning multiple lines.


  	...atom

  _________________________________________
  PGP key - http://atom.smasher.org/pgp.txt
  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
  -------------------------------------------------

 	"I am committed to helping Ohio deliver its electoral
 	 votes to the president [Bush] next year"
 		-- Walden O'Dell, CEO of Diebold
 		August 2003
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.6 (FreeBSD)
Comment: What is this gibberish?
Comment: http://atom.smasher.org/links/#digital_signatures

iQEcBAEBCAAGBQJBAqDLAAoJEAx/d+cTpVcil3oH/3KGraMUx6pIhZA9t2DTq6pG
f7cJC/stCVdDuSO7PPvL2lOawJGSCRUIOlxe7irj/XD+LQEQgIe56Hq0DaYQEAdX
i1M0TdpHWuOi93Im/Myh8+3aqTjT32DNvHmmuVj11bJxNH8v5XqZ7Ka3/TVdlhdk
BCi5fDJeIfWLgkM9ohcW1Plax1ul6FcLL82tal1BfNcEExKvKDVWBJ7W5jqJBStq
TyAJBeJKesJCGM7bRPLomx4LyaIYvpo1qqd2hxDWPZ5hYYmfRYyaHKy3Q1JxtMDi
unVJxfde+p+u46aKSb1pdJSHqX9qbR9mQCcRWghz/HUGXsjxzRHuqpcFK9ZP/OA=
=ITRg
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 16:42 ` zzapper
@ 2004-07-24 18:44   ` Bart Schaefer
  2004-07-24 22:45     ` zzapper
  0 siblings, 1 reply; 35+ messages in thread
From: Bart Schaefer @ 2004-07-24 18:44 UTC (permalink / raw)
  To: zsh-users

On Sat, 24 Jul 2004, zzapper wrote:

> Hi,
> 
> Anyway my super tip is
> 
> > vim =some_script 
> 
> where the = will find the file if it's anyway in your paths (where is 
> this in the doc?)

Let's see ... fire up "info zsh", type "i", search the index for "equal" 
and the first hit is:

EQUALS <Z>
     Perform = filename expansion.  (See *Note Filename Expansion::.)

Follow the link to Filename Expansion.  About half way down the page:

If a word begins with an unquoted `=' and the EQUALS option is set, the
remainder of the word is taken as the name of a command.  If a command
exists by that name, the word is replaced by the full pathname of the
command.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 18:44   ` Bart Schaefer
@ 2004-07-24 22:45     ` zzapper
  2004-07-25 10:41       ` zzapper
  0 siblings, 1 reply; 35+ messages in thread
From: zzapper @ 2004-07-24 22:45 UTC (permalink / raw)
  To: zsh-users

On Sat, 24 Jul 2004 11:44:09 -0700 (PDT),  wrote:

>On Sat, 24 Jul 2004, zzapper wrote:
>
>> Hi,
>> 
>> Anyway my super tip is
>> 
>> > vim =some_script 
>> 
>> where the = will find the file if it's anywhere in your paths (where is 
>> this in the doc?)
>
>Let's see ... fire up "info zsh", type "i", search the index for "equal" 
>and the first hit is:
>
>EQUALS <Z>
>     Perform = filename expansion.  (See *Note Filename Expansion::.)
>
Bart,
I guess one definition of when you know a "language" is when you know how to drill down to the
relevent help section. But I actually had a good read of the FAQ tonight

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 12:42                 ` Geoff Wing
@ 2004-07-25  0:46                   ` Vincent Lefevre
  2004-07-25  4:54                     ` xargs (Re: zsh tips plea (tip of the day)) Bart Schaefer
  0 siblings, 1 reply; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-25  0:46 UTC (permalink / raw)
  To: zsh-users

On 2004-07-24 12:42:16 +0000, Geoff Wing wrote:
> Vincent Lefevre <vincent@vinc17.org> typed:
> : On 2004-07-24 04:32:28 -0400, Atom 'Smasher' wrote:
> :> i thought that's what xargs is for...
> :> 	$ echo {1..30000} | xargs ls
> : Except that
> :   * xargs may be insecure, unless the option -0 is used;
> 
> It's not about insecurity as much as that it doesn't do what you want
> or expect, necessarily.

Probably not with the above line, but I've seen code where xargs could
lead to security problems (e.g. with xargs rm -rf, where the filenames
were not necessarily all controlled by the user).

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* xargs (Re: zsh tips plea (tip of the day))
  2004-07-25  0:46                   ` Vincent Lefevre
@ 2004-07-25  4:54                     ` Bart Schaefer
  0 siblings, 0 replies; 35+ messages in thread
From: Bart Schaefer @ 2004-07-25  4:54 UTC (permalink / raw)
  To: zsh-users

Apparently no one has discovered Functions/Misc/zargs.

# This function works like GNU xargs, except that instead of reading lines
# of arguments from the standard input, it takes them from the command
# line.  This is possible/useful because, especially with recursive glob
# operators, zsh often can construct a command line for a shell function
# that is longer than can be accepted by an external command.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-24 22:45     ` zzapper
@ 2004-07-25 10:41       ` zzapper
  2004-07-25 10:53         ` zzapper
  0 siblings, 1 reply; 35+ messages in thread
From: zzapper @ 2004-07-25 10:41 UTC (permalink / raw)
  To: zsh-users

Hi

Here's a script written to test zsh itself seems to contain some good examples  of globbing

#!/usr/local/bin/zsh -f

setopt extendedglob badpattern
unsetopt kshglob

failed=0
while read res str pat; do
  [[ $res = '#' ]] && continue
  [[ $str = ${~pat} ]]
  ts=$?
  [[ $1 = -q ]] || print "$ts:  [[ $str = $pat ]]"
  if [[ ( $ts -gt 0 && $res = t) || ($ts -eq 0 && $res = f) ]]; then
    print "Test failed:  [[ $str = $pat ]]"
    (( failed++ ))
  fi
done <<EOT
# 
t foo~                foo~
t foo~                (foo~)
t foo~                (foo~|)
t foo.c               *.c~boo*
f foo.c               *.c~boo*~foo*
# closures
t fofo                (fo#)#
t ffo                 (fo#)#
t foooofo             (fo#)#
t foooofof            (fo#)#
t fooofoofofooo       (fo#)#
f foooofof            (fo##)#
f xfoooofof           (fo#)#
f foooofofx           (fo#)#
t ofxoofxo            ((ofo#x)#o)#
f ofooofoofofooo      (fo#)#
t foooxfooxfoxfooox   (fo#x)#
f foooxfooxofoxfooox  (fo#x)#
t foooxfooxfxfooox    (fo#x)#
t ofxoofxo            ((ofo#x)#o)#
t ofoooxoofxo         ((ofo#x)#o)#
t ofoooxoofxoofoooxoofxo            ((ofo#x)#o)#
t ofoooxoofxoofoooxoofxoo           ((ofo#x)#o)#
f ofoooxoofxoofoooxoofxofo          ((ofo#x)#o)#
t ofoooxoofxoofoooxoofxooofxofxo    ((ofo#x)#o)#
t aac    ((a))#a(c)
t ac     ((a))#a(c)
f c      ((a))#a(c)
t aaac   ((a))#a(c)
f baaac  ((a))#a(c)
t abcd   ?(a|b)c#d
t abcd   (ab|ab#)c#d
t acd    (ab|ab#)c#d
t abbcd  (ab|ab#)c#d
t effgz  (bc##d|ef#g?|(h|)i(j|k))
t efgz   (bc##d|ef#g?|(h|)i(j|k))
t egz    (bc##d|ef#g?|(h|)i(j|k))
t egzefffgzbcdij    (bc##d|ef#g?|(h|)i(j|k))#
f egz    (bc##d|ef##g?|(h|)i(j|k))
t ofoofo (ofo##)#
t oxfoxoxfox    (oxf(ox)##)#
f oxfoxfox      (oxf(ox)##)#
t ofoofo        (ofo##|f)#
# The following is supposed to match only as fo+ofo+ofo
t foofoofo      (foo|f|fo)(f|ofo##)#
t oofooofo      (of|oofo##)#
t fffooofoooooffoofffooofff     (f#o#)#
# If the following is really slow, that's a bug.
f fffooofoooooffoofffooofffx     (f#o#)#
# The following tests backtracking in alternation matches
t fofoofoofofoo (fo|foo)#
# Exclusion: test both types
t foo           ((^x))
t foo           ((^x)*)
f foo           ((^foo))
t foo           ((^foo)*)
t foobar        ((^foo))
t foobar        ((^foo)*)
f foot          z*~*x
t zoot          z*~*x
f foox          z*~*x
f zoox          z*~*x
t moo.cow       (*~*.*).(*~*.*)
f mad.moo.cow   (*~*.*).(*~*.*)
t moo.cow       (^*.*).(^*.*)
f sane.moo.cow  (^*.*).(^*.*)
f mucca.pazza   mu(^c#)?.pa(^z#)?
f _foo~         _(|*[^~])
t fff           ((^f))
t fff           ((^f)#)
t fff           ((^f)##)
t ooo           ((^f))
t ooo           ((^f)#)
t ooo           ((^f)##)
t foo           ((^f))
t foo           ((^f)#)
t foo           ((^f)##)
f f             ((^f))
f f             ((^f)#)
f f             ((^f)##)
t foot          (^z*|*x)
f zoot          (^z*|*x)
t foox          (^z*|*x)
t zoox          (^z*|*x)
t foo           (^foo)#
f foob          (^foo)b*
t foobb         (^foo)b*
f foob          (*~foo)b*
t foobb         (*~foo)b*
f zsh           ^z*
t a%1X          [[:alpha:][:punct:]]#[[:digit:]][^[:lower:]]
f a%1           [[:alpha:][:punct:]]#[[:digit:]][^[:lower:]]
t [:            [[:]#
t :]            []:]#
t :]            [:]]#
t [             [[]
t ]             []]
t []            [^]]]
# Case insensitive matching
t fooxx         (#i)FOOXX
f fooxx         (#l)FOOXX
t FOOXX         (#l)fooxx
f fooxx         (#i)FOO(#I)X(#i)X
t fooXx         (#i)FOO(#I)X(#i)X
t fooxx         ((#i)FOOX)x
f fooxx         ((#i)FOOX)X
f BAR           (bar|(#i)foo)
t FOO           (bar|(#i)foo)
t Modules       (#i)*m*
t fooGRUD       (#i)(bar|(#I)foo|(#i)rod)grud
f FOOGRUD       (#i)(bar|(#I)foo|(#i)rod)grud
t readme        (#i)readme~README|readme
# the readme doesn't get excluded the second time...
t readme        (#i)readme~README|readme~README
# Ranges with backtracking
t 633           <1-1000>33
t 633           <-1000>33
t 633           <1->33
t 633           <->33
# Approximate matching
t READ.ME       (#ia1)readme
f READ..ME      (#ia1)readme
t README        (#ia1)readm
t READM         (#ia1)readme
t README        (#ia1)eadme
t EADME         (#ia1)readme
t READEM        (#ia1)readme
f ADME          (#ia1)readme
f README        (#ia1)read
t bob           (#a1)[b][b]
f bob           (#a1)[b][b]a
t bob           (#a1)[b]o[b]a
f bob           (#a1)[c]o[b]
t abcd          (#a2)XbcX
t abcd          (#a2)ad
t ad            (#a2)abcd
t abcd          (#a2)bd
t bd            (#a2)abcd
t badc          (#a2)abcd
# This next one is a little tricky: a[d]bc[] = a[]bc[d]
t adbc          (#a2)abcd
f dcba          (#a2)abcd
# the next one is [d][cb][a] = [a][bc][d] with a transposition
t dcba          (#a3)abcd
t aabaXaaabY    (#a1)(a#b)#Y
t aabaXaaabY    (#a1)(a#b)(a#b)Y
t aaXaaaaabY    (#a1)(a#b)(a#b)Y
t aaaXaaabY     (#a1)(a##b)##Y
t aaaXbaabY     (#a1)(a##b)##Y
f read.me       (#ia1)README~READ.ME
t read.me       (#ia1)README~READ_ME
f read.me       (#ia1)README~(#a1)READ_ME
t test          *((#s)|/)test((#e)|/)*
t test/path     *((#s)|/)test((#e)|/)*
t path/test     *((#s)|/)test((#e)|/)*
t path/test/ohyes *((#s)|/)test((#e)|/)*
f atest         *((#s)|/)test((#e)|/)*
f testy         *((#s)|/)test((#e)|/)*
f testy/path    *((#s)|/)test((#e)|/)*
f path/atest    *((#s)|/)test((#e)|/)*
f atest/path    *((#s)|/)test((#e)|/)*
f path/testy    *((#s)|/)test((#e)|/)*
f path/testy/ohyes *((#s)|/)test((#e)|/)*
f path/atest/ohyes *((#s)|/)test((#e)|/)*
EOT
print "$failed tests failed."

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-25 10:41       ` zzapper
@ 2004-07-25 10:53         ` zzapper
  0 siblings, 0 replies; 35+ messages in thread
From: zzapper @ 2004-07-25 10:53 UTC (permalink / raw)
  To: zsh-users

On Sun, 25 Jul 2004 11:41:17 +0100,  wrote:

Hi,
Just found this in Peter Stephenson's FAQ

(People sometimes say Perl has a difficult syntax to understand; I hope I'm convincing you how naive
that view is when you have zsh.)

I concur I find Perl a breeze compared with zsh

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
                   ` (2 preceding siblings ...)
  2004-07-24 16:42 ` zzapper
@ 2004-07-26 14:13 ` Peter Stephenson
  2004-07-26 17:01   ` Bart Schaefer
  2004-07-29 15:24 ` zzapper
  4 siblings, 1 reply; 35+ messages in thread
From: Peter Stephenson @ 2004-07-26 14:13 UTC (permalink / raw)
  To: Zsh users list

One tip the casual zsh user may not be aware of is the functions listed
in the zshcontrib manual page.  There are quite a lot of nifty add-ons.
4.2.0 added a system for handling suffixes by MIME type, for example
(you just type the file name).  Somebody already mentioned zargs which
is documented there.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited. 
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-26 14:13 ` Peter Stephenson
@ 2004-07-26 17:01   ` Bart Schaefer
  0 siblings, 0 replies; 35+ messages in thread
From: Bart Schaefer @ 2004-07-26 17:01 UTC (permalink / raw)
  To: Zsh users list

On Mon, 26 Jul 2004, Peter Stephenson wrote:

> One tip the casual zsh user may not be aware of is the functions listed 
> in the zshcontrib manual page.  [...] Somebody already mentioned zargs 
> which is documented there.

Unfortunately it's _not_ documented there, unless you grab the very latest
zsh sources from SF CVS, because I hadn't committed any doc entry until
just this past weekend.

It's heavily documented in the function file itself, though.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 16:55 ` Atom 'Smasher'
  2004-07-23 20:04   ` Vincent Lefevre
@ 2004-07-28 12:08   ` Vincent Lefevre
  1 sibling, 0 replies; 35+ messages in thread
From: Vincent Lefevre @ 2004-07-28 12:08 UTC (permalink / raw)
  To: zsh-users

On 2004-07-23 12:55:03 -0400, Atom 'Smasher' wrote:
> in ~/.zshrc:
> 
> precmd () {
>     print -n '\017'
> }

I've just noticed a clash with the .zcompdump file (that gets
such ^O characters, making the completions fail). The fix:

  [[ -n $TTY ]] && print -n ... > $TTY

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% validated (X)HTML - Acorn / RISC OS / ARM, free software, YP17,
Championnat International des Jeux Mathématiques et Logiques, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 12:49   ` Björn Lindström
@ 2004-07-28 15:18     ` Felix Rosencrantz
  2004-07-28 16:17       ` DervishD
  0 siblings, 1 reply; 35+ messages in thread
From: Felix Rosencrantz @ 2004-07-28 15:18 UTC (permalink / raw)
  To: zsh-users

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1159 bytes --]

Considering the amount of traffic this thread has caused, maybe it would be a
good idea to formalize and store the zsh tips a little. 

Taking Björn's suggestion of using zshwiki.org, I would suggest someone create
a new page ZshTipsAll.  On that page people can add one line per tip. 
Something of the form "ZshTip### - tip synopsis"  Then create a page for each
ZshTip### that contains the actual tip.  If we want to formalize it a little
more, the ZshTip### page could have some sort of format convention, like vim
tips has certain meta-data about tips, like author,  complexity, and 'as of zsh
version'.  

It would then be possible to create a little script to pull a random tip like a
daily fortune. That script could be placed in your startup files.

New tips would get created as people feel the need to create them, as pleas go
out on the list, or based on questions people ask. If the tips become numerous
and popular maybe someone will create a zshtips.org or we can add a tip system
on zsh.org.

-FR.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-28 15:18     ` Felix Rosencrantz
@ 2004-07-28 16:17       ` DervishD
  2004-07-28 18:03         ` Björn Lindström
  0 siblings, 1 reply; 35+ messages in thread
From: DervishD @ 2004-07-28 16:17 UTC (permalink / raw)
  To: Felix Rosencrantz; +Cc: zsh-users

    Hi Felix :)

 * Felix Rosencrantz <f_rosencrantz@yahoo.com> dixit:
> Taking Björn's suggestion of using zshwiki.org, I would suggest
> someone create a new page ZshTipsAll.  On that page people can add
> one line per tip.  Something of the form "ZshTip### - tip synopsis"
> Then create a page for each ZshTip### that contains the actual tip. 
> If we want to formalize it a little more, the ZshTip### page could
> have some sort of format convention, like vim tips has certain
> meta-data about tips, like author, complexity, and 'as of zsh
> version'.

    I thinks this is a very good idea. I've never used a wiki before,
so I don't know what to do to create a new page in zshwiki, or if my
changes to the main page are reviewed by the maintainer, etc.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-28 16:17       ` DervishD
@ 2004-07-28 18:03         ` Björn Lindström
  0 siblings, 0 replies; 35+ messages in thread
From: Björn Lindström @ 2004-07-28 18:03 UTC (permalink / raw)
  To: zsh-users

DervishD <raul@pleyades.net> writes:

>     I thinks this is a very good idea. I've never used a wiki before,
> so I don't know what to do to create a new page in zshwiki, or if my
> changes to the main page are reviewed by the maintainer, etc.

You just click the edit link and start editing.


^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: zsh tips plea (tip of the day)
  2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
                   ` (3 preceding siblings ...)
  2004-07-26 14:13 ` Peter Stephenson
@ 2004-07-29 15:24 ` zzapper
  4 siblings, 0 replies; 35+ messages in thread
From: zzapper @ 2004-07-29 15:24 UTC (permalink / raw)
  To: zsh-users

On Fri, 23 Jul 2004 12:12:13 +0100,  wrote:

Have started a small tips page at zshwiki.org 

http://www.zshwiki.org/cgi-bin/wiki.pl?ZshContributions 

As anyone may do

zzapper (vim, cygwin, wiki & zsh)
--

vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"

http://www.vim.org/tips/tip.php?tip_id=305  Best of Vim Tips


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2004-07-29 15:26 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23 11:12 zsh tips plea (tip of the day) zzapper
2004-07-23 11:24 ` Peter Stephenson
2004-07-23 11:39   ` Joakim Ryden
2004-07-23 22:55     ` Aaron Davies
2004-07-24  7:22       ` Vincent Lefevre
2004-07-24  8:00         ` Atom 'Smasher'
2004-07-24  8:10           ` Vincent Lefevre
2004-07-24  8:32             ` Atom 'Smasher'
2004-07-24 11:23               ` Vincent Lefevre
2004-07-24 12:42                 ` Geoff Wing
2004-07-25  0:46                   ` Vincent Lefevre
2004-07-25  4:54                     ` xargs (Re: zsh tips plea (tip of the day)) Bart Schaefer
2004-07-24 17:47                 ` zsh tips plea (tip of the day) Atom 'Smasher'
2004-07-24 15:52         ` Aaron Davies
2004-07-23 12:49   ` Björn Lindström
2004-07-28 15:18     ` Felix Rosencrantz
2004-07-28 16:17       ` DervishD
2004-07-28 18:03         ` Björn Lindström
2004-07-23 16:55 ` Atom 'Smasher'
2004-07-23 20:04   ` Vincent Lefevre
2004-07-23 20:23     ` Philippe Troin
2004-07-23 20:26       ` Vincent Lefevre
2004-07-23 21:37         ` Philippe Troin
2004-07-23 21:50           ` Vincent Lefevre
2004-07-23 22:02             ` Dan Nelson
2004-07-24  7:14               ` Vincent Lefevre
2004-07-28 12:08   ` Vincent Lefevre
2004-07-24 16:42 ` zzapper
2004-07-24 18:44   ` Bart Schaefer
2004-07-24 22:45     ` zzapper
2004-07-25 10:41       ` zzapper
2004-07-25 10:53         ` zzapper
2004-07-26 14:13 ` Peter Stephenson
2004-07-26 17:01   ` Bart Schaefer
2004-07-29 15:24 ` zzapper

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