Add shuf.
[platform/upstream/coreutils.git] / TODO
1 add unit tests for lib/*.c
2
3 strip: add an option to specify the program used to strip binaries.
4   suggestion from Karl Berry
5
6 doc/coreutils.texi:
7   Address this comment: FIXME: mv's behavior in this case is system-dependent
8   Better still: fix the code so it's *not* system-dependent.
9
10 ls: add --format=FORMAT option that controls how each line is printed.
11
12 cp --no-preserve=X should not attempt to preserve attribute X
13   reported by Andreas Schwab
14
15 copy.c: Address the FIXME-maybe comment in copy_internal.
16 And once that's done, add an exclusion so that `cp --link'
17 no longer incurs the overhead of saving src. dev/ino and dest. filename
18 in the hash table.
19
20 See if we can be consistent about where --verbose sends its output:
21   These all send --verbose output to stdout:
22     head, tail, rm, cp, mv, ln, chmod, chown, chgrp, install, ln
23   These send it to stderr:
24     shred mkdir split
25   readlink is different
26
27 Write an autoconf test to work around build failure in HPUX's 64-bit mode.
28 See notes in README -- and remove them once there's a work-around.
29
30 Integrate use of sendfile, suggested here:
31   http://mail.gnu.org/archive/html/bug-fileutils/2003-03/msg00030.html
32 I don't plan to do that, since a few tests demonstrate no significant benefit.
33
34 Should printf '\0123' print "\n3"?
35   per report from TAKAI Kousuke on Mar 27
36   http://mail.gnu.org/archive/html/bug-coreutils/2003-03/index.html
37
38 printf: consider adapting builtins/printf.def from bash
39
40 df: add `--total' option, suggested here http://bugs.debian.org/186007
41
42 seq: give better diagnostics for invalid formats:
43    e.g. no or too many % directives
44 seq: consider allowing format string to contain no %-directives
45
46 resolve RH report on cp -a forwarded by Tim Waugh
47
48 provide an ls option to do something like `--sort directory'
49
50 tail: don't use xlseek; it *exits*.
51   Instead, maybe use a macro and return nonzero.
52
53 add mktemp?  Suggested by Nelson Beebe
54
55 df: alignment problem of `Used' heading with e.g., -mP
56   reported by Karl Berry
57
58 tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
59
60 lib/strftime.c: Since %N is the only format that we need but that
61   glibc's strftime doesn't support, consider using a wrapper that
62   would expand /%(-_)?\d*N/ to the desired string and then pass the
63   resulting string to glibc's strftime.
64
65 sort: Compress temporary files when doing large external sort/merges.
66   This improves performance when you can compress/uncompress faster than
67   you can read/write, which is common in these days of fast CPUs.
68   suggestion from Charles Randall on 2001-08-10
69
70 sort: Add an ordering option -R that causes 'sort' to sort according
71   to a random permutation of the correct sort order.  Also, add an
72   option --random-seed=SEED that causes 'sort' to use an arbitrary
73   string SEED to select which permutations to use, in a deterministic
74   manner: that is, if you sort a permutation of the same input file
75   with the same --random-seed=SEED option twice, you'll get the same
76   output.  The default SEED is chosen at random, and contains enough
77   information to ensure that the output permutation is random.
78   suggestion from Feth AREZKI, Stephan Kasal, and Paul Eggert on 2003-07-17
79
80 unexpand: [http://www.opengroup.org/onlinepubs/007908799/xcu/unexpand.html]
81   printf 'x\t \t y\n'|unexpand -t 8,9 should print its input, unmodified.
82   printf 'x\t \t y\n'|unexpand -t 5,8 should print "x\ty\n"
83
84 Let GNU su use the `wheel' group if appropriate.
85   (there are a couple patches, already)
86
87 sort: Investigate better sorting algorithms; see Knuth vol. 3.
88
89   We tried list merge sort, but it was about 50% slower than the
90   recursive algorithm currently used by sortlines, and it used more
91   comparisons.  We're not sure why this was, as the theory suggests it
92   should do fewer comparisons, so perhaps this should be revisited.
93   List merge sort was implemented in the style of Knuth algorithm
94   5.2.4L, with the optimization suggested by exercise 5.2.4-22.  The
95   test case was 140,213,394 bytes, 426,4424 lines, text taken from the
96   GCC 3.3 distribution, sort.c compiled with GCC 2.95.4 and running on
97   Debian 3.0r1 GNU/Linux, 2.4GHz Pentium 4, single pass with no
98   temporary files and plenty of RAM.
99
100   Since comparisons seem to be the bottleneck, perhaps the best
101   algorithm to try next should be merge insertion.  See Knuth section
102   5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American
103   Mathematical Monthly 66 (1959), 387-389.
104
105 cp --recursive: perform dir traversals in source and dest hierarchy rather
106   than forming full file names.  The latter (current) approach fails
107   unnecessarily when the names become very long.
108
109 Remove suspicious uses of alloca (ones that may allocate more than
110    about 4k)
111
112 Adapt these contribution guidelines for coreutils:
113   http://sources.redhat.com/automake/contribute.html
114
115
116 Changes expected to go in, someday.
117 ======================================
118
119   dd patch from Olivier Delhomme
120
121   Andreas Gruenbacher's xattr changes
122
123   Apply Bruno Haible's hostname changes
124
125   test/mv/*: clean up $other_partition_tmpdir in all cases
126
127   ls: when both -l and --dereference-command-line-symlink-to-dir are
128   specified, consider whether to let the latter select whether to
129   dereference command line symlinks to directories.  Since -l has
130   an implicit --NO-dereference-command-line-symlink-to-dir meaning.
131   Pointed out by Karl Berry.
132
133   A more efficient version of factor, and possibly one that
134   accepts inputs of size 2^64 and larger.
135
136   dd: consider adding an option to suppress `bytes/block read/written'
137   output to stderr.  Suggested here:
138     http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=165045
139
140   Pending copyright papers:
141   ------------------------
142   ls --color: Ed Avis' patch to suppress escape sequences for
143     non-highlighted files
144
145   getpwnam from Bruce Korb
146
147   pb (progress bar) from Miika Pekkarinen
148
149   ------------------------------
150
151 Have euidaccess.m4 check for eaccess as well as euidaccess
152 If found, then do `#define euidaccess eaccess'.
153
154 Remove long-deprecated options.  Search case-insensitive for
155 `deprecated' and `remove in '.
156
157 Add a distcheck-time test to ensure that every distributed
158 file is either read-only(indicating generated) or is
159 version-controlled and up to date.
160
161 Implement Ulrich Drepper's suggestion to use getgrouplist rather
162   than getugroups.  This affects only `id', but makes a big difference
163   on systems with many users and/or groups, and makes id usable once
164   again on systems where access restrictions make getugroups fail.
165   But first we'll need a run-test (either in an autoconf macro or at
166   run time) to avoid the segfault bug in libc-2.3.2's getgrouplist.
167   In that case, we'd revert to using a new (to-be-written) getgrouplist
168   module that does most of what `id' already does.
169
170 remove `%s' notation:
171   grep -E "\`%.{,4}s'" src/*.c
172
173 remove or adjust chown's --changes option, since it
174   can't always do what it currently says it does.
175
176 Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
177   multibyte aware.  The problem is that I want to avoid duplicating
178   significant blocks of logic, yet I also want to incur only minimal
179   (preferably `no') cost when operating in single-byte mode.
180
181 Remove all uses of the `register' keyword
182
183 pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
184
185 ls.c: use gettime rather than clock_gettime, gettimeofday, time
186
187 write rules to deal with c99->c89 patches and to automatically
188   check that they apply cleanly
189
190 Use latest automake
191
192 ----------------
193 The command:
194   mv dir new-name/
195 should work the same way the underlying
196 rename ("dir", "new-name/") call does.
197 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00292.html
198
199 ----------------