zsh-workers
 help / color / mirror / code / Atom feed
* du(1) completion and a little $RANDOM problem
@ 2003-07-16 11:16 Guillaume Chazarain
  2003-07-16 11:30 ` Peter Stephenson
  0 siblings, 1 reply; 8+ messages in thread
From: Guillaume Chazarain @ 2003-07-16 11:16 UTC (permalink / raw)
  To: zsh-workers

Hi list,

Zsh's default completion on the du(1) command is to show only the
directories, but why? since du can also be used on files.

Here is what I mean, against zsh-4.1.1.

--- Completion/Unix/Type/_directories.old
+++ Completion/Unix/Type/_directories
@@ -1,4 +1,4 @@
-#compdef rmdir df du dircmp -P -value-,*path,-default-
+#compdef rmdir df dircmp -P -value-,*path,-default-
 
 local expl
 

Another problem I have deals with $RANDOM. Using echo $RANDOM works as
expected, a new random value is printed each time.

[g ~]$ echo $RANDOM
29407
[g ~]$ echo $RANDOM
31292
[g ~]$ echo $RANDOM
11843
[g ~]$ echo $RANDOM
22883
[g ~]$ echo $RANDOM
20814

But if I do echo `echo $RANDOM` then the random value is always the same.

[g ~]$ echo `echo $RANDOM`
6853
[g ~]$ echo `echo $RANDOM`
6853
[g ~]$ echo `echo $RANDOM`
6853
[g ~]$ echo `echo $RANDOM`
6853
[g ~]$ echo `echo $RANDOM`
6853


And the behaviour is the same if zsh is called as sh.

Thanks
Guillaume







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

end of thread, other threads:[~2003-08-21 12:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 11:16 du(1) completion and a little $RANDOM problem Guillaume Chazarain
2003-07-16 11:30 ` Peter Stephenson
2003-07-16 11:46   ` Bart Schaefer
2003-07-16 12:09     ` Sven Wischnowsky
2003-07-17 10:17     ` Oliver Kiddle
2003-08-20 10:35   ` PATCH: " Oliver Kiddle
2003-08-20 14:22     ` Doug Kearns
2003-08-21 12:35       ` Oliver Kiddle

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