File: wcd.txt

package info (click to toggle)
wcd 3.2.0-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 804 kB
  • ctags: 640
  • sloc: ansic: 8,260; makefile: 43; sh: 6; csh: 1
file content (1795 lines) | stat: -rw-r--r-- 61,604 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
wcd  3.2.0 (Dec 1 2005) - Wherever Change Directory

usage:
       wcd [drive:][dir] [-A <path>] [-a[a]] [-b] [-c] [-d <drive>]
       [-E <path>] [-e[e]] [-f <treefile>] [-G <path>] [-GN] [-g[a|d]]
       [-h] [-i] [-j] [-k] [-l] [-[m|M|r|rmtree] <dir>] [-N] [-n <path>]
       [-o[d]] [-Q] [-S <path>] [-s] [-t] [-u <username>] [-V] [-v] [-w]
       [-x <path>] [-xf <file>] [-z #] [-[#]] [+[#]] [=]

  dir (partial) name of directory to change to.
      Wildcards *, ? and [SET] are supported!

  -A      Add tree from <path>
  -a      Add current path to treedata
  -aa     Add current and all parent paths to treedata
  -b      Ban current path
  -c      direct CD mode
  -d      set <Drive> for stack & go files (DOS only)
  -E      add tree from <path> to Extra treedata
  -e      add current path to Extra treedata
  -ee     add current and all parent paths to Extra treedata
  -f      add extra treeFile, skip default treedata file
  +f      add extra treeFile
  -G      Set directory for go-script.
  -GN     Don't create go-script
  -g      graphical tree mode
  -ga     graphical tree mode. Alternative navigation, don't jump to unrelated directories.
  -gd     dump graphical tree to stdout
  -h      show this Help
  -i      Ignore case
  +i      Regard case
  -j      Just Go mode
  -k      Keep paths in treedata when wcd cannot change to them
  -L      print software license
  -l      aLias current dir
  -M      Make directory and add to extra treedata file
  -m      Make directory and add to treedata file
  -N      Use numbers instead of letters to choose from a list
  -n      add relative treefile , skip default treedata file
  +n      add relative treefile
  -o      Use stdout based interface
  -od     Dump matches to stdout.
  -Q      Quieter operation
  -r      Remove directory and remove from treedata file
  -rmtree Remove directory Recursive and remove from treedata file
  -S      Scan disk from <path>
  +S      Scan disk from <path>, make relative treefile
  -s      (re)Scan disk from $HOME
  -t      Do not strip tmp mount dir /tmp_mnt/ (Unix only)
  -u      add treefile of other User, skip default treedata file (Unix only)
  +u      add treefile of other User (Unix only)
  -V      Verbose operation
  -w      Wild matching only
  -v      print Version info
  -x      eXclude path during disk scan
  -xf     eXclude paths from File during disk scan
  -z      set max stack siZe
  -       Push dir (# times)
  +       Pop dir (# times)
  =       Show stack

Examples:
   wcd -s                               wcd src/wcd
   wcd -S /                             wcd doe*/vhdl -u doe
   wcd w*[1-3]                          wcd src -V -f /home/doe/.extra.wcd
   wcd d:games                          wcd -a
   wcd -3                               wcd -z 0 -i howto
   wcd +                                wcd -E .
   wcd -d H doc                         wcd -n /mnt/network src
   wcd - +                              wcd -S c: -A d: -A e:
   wcd -xf /home/waterlan/.ban.wcd -s
   wcd //servername/sharename
   wcd -A //servername/sharename
   wcd -A //servername
   wcd sharename

======================================================================
= 0 Contents                                                         =
======================================================================
 1 Manual
 2 DOS/Windows installation
   - dos 16 bit
   - dos 32 bit
   - dos Bourne Again Shell (bash)
   - Z shell (zsh)
   - Long directory name support
   - Using default options
   - Use of environment variable HOME / WCDHOME
   - PDCurses interface
 3 Win32 console (Windows NT/2000/XP) installation
   - Win32 console
   - Z shell (zsh)
   - UNC support
 4 Cygwin (Windows 9x / NT) installation
 5 Unix installation
   - Bourne-like shells (ksh, bash, zsh)
   - C Shell (csh)
   - Hints
 6 Know problems
 7 Source code
 8 Modification history
 9 Copyright
10 Acknowledgements
11 Contact / Download new versions

======================================================================
= 1 Manual                                                           =
======================================================================

WCD(1)                           WCD(1)


NAME
       wcd - Wherever Change Directory
       chdir for DOS and Unix

SYNOPSIS
       wcd [drive:][dir] [-A <path>] [-a[a]] [-b] [-c] [-d <drive>]
       [-E <path>] [-e[e]] [-f <treefile>] [-G <path>] [-GN] [-g[a|d]]
       [-h] [-i] [-j] [-k] [-l] [-[m|M|r|rmtree] <dir>] [-N] [-n <path>]
       [-o[d]] [-Q] [-S <path>] [-s] [-t] [-u <username>] [-V] [-v] [-w]
       [-x <path>] [-xf <file>] [-z #] [-[#]] [+[#]] [=]

DESCRIPTION
       Wcd.  Directory changer for DOS and Unix.  Another Norton Change Direc-
       tory (NCD) clone with more features.

       Wcd is a program to change directory fast. It saves time typing at  the
       keyboard.  One  needs  to  type only a part of a directory name and wcd
       will jump to it. Wcd has a fast selection method in  case  of  multiple
       matches and  allows  aliasing  and  banning  of    directories. Wcd also
       includes a full-screen interactive directory browser with speed search.

       By default (if no wildcards are used) wcd searches for a directory with
       a name that begins with the typed name.

       For instance:

     wcd Desk

       will change to directory /home/waterlan/Desktop
       When there are multiple matches, wcd will present the user  a  list  of
       all  matches.  The user can then make a selection with a few keystrokes
       (most of the times only one).

       Wcd fully supports wildcards, i.e. *, ? and [SET].

       `*' matches any sequence of characters (zero or more)
       `?' matches any character
       [SET] matches any character in the specified set,
       [!SET] or [^SET] matches any character not in the specified set.

       A set is composed of characters or ranges; a range looks like ``charac-
       ter hyphen character'' (as in 0-9 or A-Z).  [0-9a-zA-Z_] is the minimal
       set of characters allowed in the [..] pattern construct.    Other charac-
       ters  are  allowed  (i.e. 8 bit characters) if your system will support
       them.  To  suppress  the   special  syntactic  significance  of  any  of
       ``[]*?!^-\'',  in- side or outside a [..] construct and match the char-
       acter exactly, precede it with a ``\'' (backslash).


       Using wildcards makes powerful searching possible. For instance:

     wcd *top
       match any directory name that ends with "top".


     wcd *top*
       match any directory that has "top" in the name.

     wcd [a-c]*
       match any directory name that begins with "a", "b" or "c".

       It is also possible to give a part of a directory path. E.g.:

     wcd me/Desk

       wcd searches for directory that begins   with  "Desk"  and  which  path
       matches *me/Desk*

       It  is  allowed  to  type any kind of expression with slashes and wild-
       cards. E.g.:

     wcd src*/*1?/a*2

       If no wildcards are used and wcd finds a perfect match, wcd will ignore
       all  wild matches by default. This behaviour can be changed with the -w
       option.

       The interactive directory browser can be started by using option -g.

     wcd -g

       See option -g for more information.

       Wcd generates a treedata file were it searches the directory.  On  Unix
       systems wcd  does  add links to the treedata files while scanning the
       disk, but does not follow them. While following links wcd could end up
       scanning infinite loops, or scan very large portions of a network.

       Wcd can also change to directories that are not in the  treedata  file.
       E.g.:

     wcd ..

       If  wcd found  a  match but cannot change to the directory it tries to
       remove it from the default treedata file.  Not from the extra  treedata
       file.  See also option -k.

       Wcd  keeps  a  directory stack which is stored on disk. The stack has a
       default size of 10 and is cyclic. See options -z, -, + and =.


       Wcd supports 8 bit character sets (non-ASCII characters).

       In multi-user environments a very handy option -u can be used to change
       to directories of other users. See option -u.

       On DOS and Windows systems it does not matter if you use a slash (/) or
       a backslash (\) as directory-separator.

       It is possible on DOS and Windows systems to change drive and directory
       in one go by preceding the directory name with the drive name.

     wcd d:games

       The Windows versions (console, zsh, cygwin) support Windows SMB LAN UNC
       paths without drive letter such as \\servername\sharename. Wcd for win-
       dows console makes use of the 'pushd' command to   automatically map  a
       UNC  path  to  a  drive letter. In windows zsh and Cygwin UNC paths are
       fully supported. The current working directory can be a UNC path.

       Remark about 8 bit characters: Only the original equipment manufacturer
       (OEM)  code  page installed with Windows appears correctly in a command
       prompt window that uses Raster fonts. Other code pages appear correctly
       in  full-screen mode or command prompt windows that use TrueType fonts.


FILES
       wcd.exe
      The binary. Do not rename it to 'wcd' on Unix systems. In a Bourne-
      like or C shell the binary is always called by a function or alias,
      because the current working directory of a Bourne-like or  C    shell
      can   only  be  changed  by the builtin cd command. See also section
      INSTALLATION.


       default treedata file
      DOS: \treedata.wcd or %HOME%\treedata.wcd
      UNIX: $HOME/.treedata.wcd

      This is the default treedata file where wcd searches   for  matches.
      If it is not readable wcd will create a new one.


       extra treedata file
      DOS: \extra.wcd or %HOME%\extra.wcd
      UNIX: $HOME/.extra.wcd

      An  optional    extra treedata file. If it exists and is readable wcd
      will try to find matches in this file also.


       ban file
      DOS: \ban.wcd or %HOME%\ban.wcd
      UNIX: $HOME/.ban.wcd

      In this optional file wcd  places  banned  paths.  See  option  -b.
      Wildcards are supported.


       alias file
      DOS: \alias.wcd or %HOME%\alias.wcd
      UNIX: $HOME/.alias.wcd

      Optional file with wcd aliases. See option -l.


       stack file
      DOS: c:\stack.wcd or %HOME%\stack.wcd
      UNIX: $HOME/.stack.wcd

      In this file wcd stores it's stack. The drive-letter can be changed
      with the -d option.


       go-script
      DOS BASH: c:\wcd.go or %HOME%\wcd.go
      WIN32 CONSOLE: c:\wcdgo.bat or %HOME%\wcdgo.bat
      WIN32 ZSH: %HOME%\wcd.go
      UNIX: $HOME/bin/wcd.go

      This is the shell script which wcd.exe creates each   time. It  is
      sourced via a function or an alias. The drive-letter can be changed
      with the -d option.  For history reasons it is placed by default in
      ~/bin  on  Unix systems.  The directory of this file can be changed
      with the option -G.


       relative treedata file
      DOS: <path>\rtdata.wcd
      UNIX: <path>/.rtdata.wcd

      Text file with relative paths from <path>. See options +S,  -n  and
      +n.


       The  win32 console version of wcd behaves as the DOS version.  The Cyg-
       win version of wcd behaves as the UNIX version.


       All .wcd files are ASCII text files. They can be edited with  a   text-
       editor.


       If the environment variable WCDHOME is set wcd will use WCDHOME instead
       of HOME.


OPTIONS
       -A <path>
         Add directory tree from <path> to default treedata.

         The directory tree starting  from    <path>   is  appended  to  the
         default treedata file.

        Example: wcd -A .

         With  the Windows console version one can scan all shared direc-
         tories of a Windows LAN server by typing something like: wcd  -A
         \\servername.


       -a     Add current path to default treedata file.

         Use  this    option to quickly add the current path to the default
         treedata file. Re-scanning the complete disk  can   take  a  long
         time in some cases.

       -aa    Add current and all parent paths to default treedata.

       -b     Ban current path.

         Wcd places the current path in the ban file. This means that wcd
         ignores all matches of this directory and its sub directories.

         The ban file can be edited with a text editor. Use of  wildcards
         are supported and it is matched against absolute path.

         Banned  paths  are  not  excluded from scanning the disk.    To do
         that use option -xf.

       -c     direct CD mode

         By default wcd works as follows:
          1. Try to find a match in the treedata file(s)
          2. If no match, try to open the directory you typed.

          In direct CD mode wcd works in reversed order.
          1. Try to open the directory you typed.
          2. If not, try to find a match in the treedata file(s).

       -d <drive>
         Set drive for stack and go file (DOS only).

         The stack file and the go-script are by default stored on    drive
         c:  if  environment variable HOME is not set. Use this option if
         drive C: is a read-only drive.  This  option  must  be  used  in
         front of the stack options -, + and =.

       -E <path>
         Add directory tree from <path> to Extra treedata file.

         The directory tree starting from <path> is appended to the Extra
         treedata file

       -e     Add current path to extra treedata file.

         Use this option to quickly add the current  path   to  the   extra
         treedata file.

       -ee    Add current and all parent paths to extra treedata file.

       -f <filename>
         Add another treedata file to be scanned, do not include your
         own treedata file.

       +f <filename>
         Add another treedata file to be scanned, include your own tree-
         data file.

       -G <path>
         Set directory path of go-script.


       -GN    Don't create go-script.

         This option can be used in combination with the option -j if one
         doesn't want wcd to create a go-script.


       -g     Graphical interface (only in version with curses interface).

         Wcd  starts  a  textual curses based `graphical' interface.  The
         user can select a directory via a full-screen interactive direc-
         tory  browser. It has a Vi(m) like navigation and search method.

         If no search string is given wcd presents the whole  tree    which
         is in the default treedata file and the extra treedata files.

         If  a  search  string  is given the match list is presented as a
         graphical tree.


       -ga    Graphical interface with alternative  way   of  navigating.  With
         this option one can't jump to unrelated directories.


       -gd    Dump the treedata files as a tree to stdout.


       -i     Ignore  case.   Dos  and Windows versions of wcd ignore case by
         default. Unix versions regard case by default.


       +i     Regard case.  See also option -i.


       -j     just go mode

         In this mode wcd will not present a list when there is more than
         directory    that  matches the  given  directory.   Wcd will just
         change to the first option. When wcd is invoked again  with  the
         same arguments it will change to the next option, and so on.

         Wcd will print the directory to go to to stdout.   So a different
         installation method can be used. One could make the  following
         function for bash or ksh:

         function wcd()
         {
      cd "`$HOME/bin/wcd.exe -j $*`"
         }

         On  windows systems, if one is running 4NT shell, one could make
         the following alias:

         alias wcd `cd %@execstr[wcdwin32.exe -z 0 -j %1]`

         This method eliminates the need of the go-script, so one can use
         option -GN in combination with -j.


       -k     Keep paths.

         Keep  paths  in  treedata   when  wcd cannot change to them.  The
         default behaviour of wcd is that it tries to remove  paths  from
         the  treedata  when wcd cannot change to them.  With this option
         this behaviour is turned off.

       -l     aLias current path.

         Wcd places the current path and the alias  in  the  alias    file.
         Aliases are case sensitive.

       -M <dir>
         Make directory and add to extra treedata file.


       -m <dir>
         Make directory and add to treedata file.


       -N     Use numbers instead of letters.

         Wcd  with    a conio or curses based interface (see section INTER-
         FACE) presents a match list default numbered with letters.  When
         the  -N  option is used the match list is numbered with numbers.
         Regardless of the -N option one can type a letter or numbers  to
         make a selection from the list of matches.


       -n <path>
         Add  relative  treedata  file  (Unix:  <path>/.rtdata.wcd,  DOS:
         <path>\rtdata.wcd), do not scan the default  treedata  file.  If
         <path>   is   a   file, wcd   will   add   <path>  instead  of
         <path>/.rtdata.wcd or <path>\rtdata.wcd.  See also option +S.

         Example:
         suppose another system has  been NFS  mounted  to  mount  point
         /mnt/network


          wcd -n /mnt/network src

         Wcd  now opens  file /mnt/network/.rtdata.wcd The file contains
         the paths relative from that point.

         The relative treedata file  should  already  have   been  created
         using the wcd +S option.


       +n <path>
         Add another relative treedata file. See option -n.


       -o     Use stdin/stdout interface.

         When  for    some  kind of reason the conio or curses interface of
         wcd doesn't work one can fall back to the stdin/stdout interface
         of wcd by using the -o option.


       -od    Dump all matches to stdout.


       -Q     Quieter operation.

         Printing of the final match is suppressed.

       -r <dir>
         Remove directory and remove from treedata file.

         If the directory is empty, wcd will remove it, and try to remove
         it from the treedata file.


       -rmtree <dir>
         Recursively remove directory and remove from treedata file.

         Wcd will remove the directory and all it's sub  directories  and
         files, and remove the directories from the treedata file.


       -S <path>
         Scan disk from a certain path.

         If  you  have a small Unix system like a PC with a few users you
         can for instance scan the disk from /.  With the Windows console
         version  one  can  scan  all shared directories of a Windows LAN
         server by typing something like: wcd -S \\servername.

         The existing default treedata file is overwritten.


       +S <path>
         Scan disk from a certain path. Make relative treedata file.

         Scan disk from path <path> and place relative paths in  a    rela-
         tive  treedata file.  This file is used by the -n and +n options
         of wcd. E.g.  wcd -n <path> src

       -s     (re)Scan disk from your $HOME directory.

         This is recommended if you are on a large  Unix  server  network
         with  very  much users.  This is the default scanning mode.  Wcd
         for DOS scans the current disk from root \  or  from  %HOME%  if
         HOME is set.  The existing default treedata file is overwritten.


       -t     Do not strip tmp mount dir /tmp_mnt (Unix only)

         Wcd strips  by  default  /tmp_mnt/  from  the  match.  Directory
         /tmp_mnt is  used  by  the  automounter.   This behaviour can be
         turned off with the -t option.


       -u <username>
         Add default treedata file of other user, do not include your own
         default treedata file.

         Wcd now scans the treedata file of another user On Unix the base
         directory for user home directores is assumed to be /home    ,  so
         wcd  tries  to scan /home/<username>/.treedata.wcd.  On DOS/Win-
         dows the base directory for user home directores is  assumed  to
         be  \\users  ,  so  wcd  tries  to scan \\users\<username>\tree-
         data.wcd.

         One can define a different base directory with environment vari-
         able WCDUSERSHOME.  See section ENVIRONMENT.


       +u <username>
         Add treedata file of other user, include your own treedata file.


       -V     verbose operation.

         With this option wcd prints all filters, bans and excludes.

       -v     Print version info.



       -w     Wild matching only.

         Treat all matches as wild matches.

       -x <path>
         Exclude <path> from scanning.

         When  this  option  is  used wcd will exclude <path> and all its
         subdirectories when wcd is scanning a disk. Wildcards  are  sup-
         ported and matched against absolute paths. Option -x can be used
         multiple times.

      wcd -x <path1> -x <path2> -s

         Option -x must be used in front of any scan option (-s, -S,  +S,
         -A, -E).

         On DOS/Windows systems one must specify the drive letter depend-
         ing on if enviroment variable HOME or WCDHOME is set.   If  HOME
         or  WCDHOME  is set one needs to specify the drive letter. Exam-
         ple:

      wcd -x c:/temp -S c:

         Otherwise don't specify drive letter.

      wcd -x /temp -s


       -xf <file>
         Exclude all paths listed in <file> from scanning.

         When this option is used wcd will exclude all  paths  listed  in
         <file> and all their subdirectories when wcd is scanning a disk.
         Wildcards are supported and they are  matched  against  absolute
         paths;  one  path  per  line.  Be aware that wcd will not ignore
         leading or trailing blanks on a line,  because  they  are    legal
         characters in a directory name.  Option -xf can be used multiple
         times. When one wants to exlude all banned paths   from  scanning
         one can do the following (example for wcd on unix):

      wcd -xf ~/.ban.wcd -s

         Wildcards    are  supported.  For instance to exclude all your CVS
         directories with cvs administrative files add a line with:
         */CVS

         Option -xf must be used in front of any scan option (-s, -S, +S,
         -A, -E).

       -z #   Set maximum stack size.

         The  default  size  of  the  stack is 10. Stack operation can be
         turned off by setting the size to 0.  This option must  be  used
         in  front of any other stack option (-,+,=).  Otherwise the size
         of the stack will be set back to the default 10. A correct  com-
         mand is:

      wcd -z 50 -

         The  new stack size will be 50, wcd will go one directory back.
         A wrong command is:

      wcd - -z 50

         Wcd goes one directory back, the stack gets the default size 10.
         '-z 50' is ignored.

         Add  this    option as the first option to your wcd alias or func-
         tion.  E.g. for the bash this would be:

         function wcd
         {
       wcd.exe -z 50 $*
       . $HOME/bin/wcd.go
         }


       -[#]   Push dir [ # times ].

         Go back a directory. 'wcd -' goes one directory back. To go more
         directories  back  add  a number to it. E.g. wcd -3 The stack is
         cyclic.

       +[#]   Pop dir [ # times ].

         Go forward a directory. 'wcd +' goes one directory  forward.  To
         go  more directories forward add a number to it. E.g. wcd +2 The
         stack is cyclic.

       =      Show stack.

         Use this option if don't know anymore how many times to push  or
         pop.  The stack is printed and you can choose a number. The cur-
         rent place in the stack is marked with an asterisk '*'.


INTERFACE
       Wcd has three different interfaces to choose from a  list  of  matches.
       The interface can be chosen at compile time.

       The  first  interface  uses  plain  stdin/stdout.   A  numbered list is
       printed in the terminal. The user has to choose from the list by typing
       a  number  followed by <Enter>. This interface does not provide scroll
       back functionality in case of a long list.  The scroll back  capability
       of the terminal/console has to be used.  It is very small and portable.

       The second interface is built with the conio  library.  It  provides  a
       builtin scroll back capability.  The user is presented a list numbered
       with letters.  Choosing from a list can be done by  pressing  just  one
       letter. This interface is fast because it saves keystrokes.  If possi-
       ble the screen will be restored after exiting.  One who prefers to type
       numbers can  use  the -N option.  This interface is meant for DOS sys-
       tems.

       The third interface is built with the curses library. It is similar  to
       the  conio  interface  with  additional sideways scrolling.  The curses
       version of wcd has also an additional `graphical' interface.   It  lets
       the  user  select  a  directory via a full-screen interactive directory
       browser. It has a Vi(m) like navigation and search method.  It  can  be
       activated  with  option -g.  This interface is portable to DOS, Windows
       and Unix.

       By using the -o option one can always fall  back   to  the  stdin/stdout
       interface.



ENVIRONMENT
       HOME and WCDHOME
      Wcd   uses environment variable HOME to determine where to store its
      files. See also section FILES.  Environment variable WCDHOME    over-
      rides  HOME. If both HOME and WCDHOME are set, WCDHOME will be used
      instead of HOME.

      For the Unix and Cygwin version it is required that HOME or WCDHOME
      is set. For the other versions of wcd the use of these variables is
      optional.


       TERMINFO
      If  the  environment variable TERMINFO is defined, wcd with ncurses
      interface checks for a local terminal definition before checking in
      the standard place. This is useful if terminal definitions are  not
      on  a  standard place. Often used standard places are /usr/lib/ter-
      minfo and /usr/share/terminfo.

       PDC_RESTORE_SCREEN
      Wcd with PDCurses interface   recognizes  the    environment  variable
      PDC_RESTORE_SCREEN.   If this environment variable is set, PDCurses
      will take a copy of the contents of the screen at the time that wcd
      is  started;    when  wcd exits, the screen will be restored. One can
      set this variable e.g. in AUTOEXEC.BAT. Example:

         set PDC_RESTORE_SCREEN=1

      For Cygwin this would be 'export PDC_RESTORE_SCREEN=1'.


       SHELL
      Printing of #!$SHELL on the first line of the go-script for Bourne-
      like   or C shell is needed for 8 bit characters. Some shells other-
      wise think that the go-script is a binary file and will not source
      it.   In  Cygwin bash one may need to define $SHELL with an 'export'
      command, otherwise wcd can't read the variable.


       BASH
      Wcd for DOS bash uses $BASH instead of $SHELL, because $SHELL point
      to  the  DOS    command  shell.  One may need to define $BASH with an
      'export' command, otherwise wcd can't read the variable.


       WCDFILTER
      Specify filters with environment variable WCDFILTER.   All  directo-
      ries   that  don't  match  the filter(s) are ignored.  A list can be
      specified by separating filters with colons (:) on Unix/Cygwin  and
      semicolons  (;)  on  DOS/Windows systems (Similar as specifying the
      PATH variable). Filters are case sensitive on Unix and case insen-
      sitive on DOS/Windows.

      Example Unix: export WCDFILTER=projects:doc

      Example DOS/Windows: set WCDFILTER=projects;doc


       WCDBAN
      The   paths specified with environment WCDBAN will be banned by wcd.
      See also option -b. Specify a list of paths separated by colons  on
      Unix/Cygwin and semicolons on DOS/Windows.


       WCDEXCLUDE
      The paths specified with environment WCDEXCLUDE will be excluded by
      wcd. See also options -x and -xf. Specify a list of paths separated
      by colons on Unix/Cygwin and semicolons on DOS/Windows.

      Example Unix: export WCDEXCLUDE=/dev:/tmp:*CVS

      Example DOS/Windows: set WCDEXCLUDE=*/windows;*/temp;*CVS


       WCDUSERSHOME
      With   this  variable one can set the base directory where the users
      home directories are.  If this variable is not set wcd will assume
      /home  on  Unix, and \\users on DOS/Windows.  This variable is used
      to scan treedata files of other users. See also options -u an +u.


       In  verbose  mode  wcd  will  print all filters, bans and excludes. See
       option -V.


======================================================================
= 2 DOS/Windows installation                                         =
======================================================================
- dos 16 bit version:

 Make sure that wcd.exe is in your path.

......................................................................
- dos 32 bit version:

 Make sure that wcd.exe and cwsdpmi.exe are in your path.
 (requires 80386 CPU or higher)

......................................................................
- dos Bourne Again Shell (bash):

(32 bit)

1)

 copy wcd.exe to your c:/bin directory.

2)

 Add the following function to your ~/_bashrc
 file. Notice that under Windows 95/NT the ~/.bashrc
 file overrides the ~/_bashrc file. In that case place
 the function in ~/.bashrc

function wcd
{
   c:/bin/wcd.exe $*
   . c:/wcd.go
}

Start a new bash

Attention!
wcd 2.1 and later writes the wcd.go file now always on drive C: unless
other specified with the -d option.

If you use environment variable HOME make a function like this:

function wcd
{
   c:/bin/wcd.exe $*
   . $HOME/wcd.go
}

......................................................................
- Z shell (zsh)

The dos bash version of wcd can also be used for the win32 port of zsh if it is used  under
Windows  95 or 98. Note that you need the windows zsh version to get UNC path support.
It is required that environment variable HOME or WCDHOME is set. A function
like the following must be defined.  This can be done in $HOME/.zshenv


function wcd
{
   c:/bin/wcd.exe $*
   . $HOME/wcd.go
}
......................................................................
- Long directory name support

The 32 bit DOS versions for DOS supports long directory names
in a Windows 95/98 Dos-box.

Wcd makes use of DJGPP's LFN (long filename) API, which works under
Windows 95 and 98. LFN support does not work if you started your PC
in MS-DOS mode.

LFN support can be controlled with the environment variable LFN.

set LFN=y  enables LFN support.
set LFN=n  disables LFN support.

If variable LFN is not set, LFN is by default enabled.

Notice that you need to have set LFN=y in your DJGPP.ENV file
if you have the DJGPP compiler installed.

...

Current DOS version of Wcd does not support LFN under Windows NT.

An alpha version of an LFN driver for NT which enables long file name
support for DJGPP programs, written by Andrew Crabtree, can be downloaded
from Andrew's site (http://www.goof.com/pcg/data/djgpp/lfn0106.zip).

If you need LFN support under Windows NT use the win32 console
version of wcd.

......................................................................
- Using default options

If you want to use some options by default use an alias or macro to do that.
Smarter shells like 4DOS and NDOS are able to set aliases like this:
alias wcd=wcd.exe -Q

In DOS BASH add the options in your function.

In the MS-DOS COMMAND.COM shell you can use the 'doskey' command to define
a macro. You could add the following line to you AUTOEXEC.BAT file:
doskey wcd=wcd.exe -Q $*

......................................................................
- Use of environment variable HOME / WCDHOME

The DOS versions of wcd can make use of environment variable HOME.
(UNIX version always uses HOME.)

set HOME=c:/home/waterlan

If HOME is set, wcd will place all it's files (treedata.wcd, extra.wcd,
alias.wcd, ban.wcd, wcd.go) in directory %HOME% .
The behaviour of wcd is then equal to the UNIX version of wcd.
Wcd will scan the disk default from %HOME%. Drives will not
be automaticly scanned by changing to them.
You need to tell wcd explicitly. E.g.:

wcd -S c: -A d: -A e:

Matching of directories is now global over all scanned drives.

...

If HOME is set, DJGPP bash will read '_bashrc' from %HOME%.
Your wcd function could now look like:

function wcd
{
   c:/bin/wcd.exe $*
   . $HOME/wcd.go
}

If the environment variable WCDHOME is set wcd will use
WCDHOME instead of HOME.

......................................................................

Adding extra directories:

You can add an extra directory-list in the file \extra.wcd or %HOME%\extra.wcd

Example:

d:/games
d:/games/invaders
e:/project_a

See also options -e and -E

======================================================================
= 3 Win32 console (Windows NT/2000/XP) installation                  =
======================================================================
- Win32 console

Notice that under Windows NT console (MS-DOS prompt) a win32-program cannot
change the current work directory (although a DOS-program can on NT4).
That is why wcd generates a batch script (c:\wcdgo.bat or %HOME%\wcdgo.bat)
which must be executed in the current shell.

1)
Copy wcd.bat and wcdwin32.exe somewhere in PATH.


2)
Edit wcd.bat depending if you use environment variable HOME or not.

Suppose you installed wcd in c:\bin

If you don't use environment variable HOME wcd.bat looks like:

 @echo off
 c:\bin\wcdwin32.exe %*
 c:\wcdgo.bat

If you do use environment variable HOME wcd.bat looks like:

 @echo off
 c:\bin\wcdwin32.exe %*
 %HOME%\wcdgo.bat

3)
To be sure that you execute the correct 'wcd.bat' you could
optionally create a macro for wcd:

 doskey wcd=c:\bin\wcd.bat $*


Notice that environment variable WCDHOME overrides HOME.

......................................................................
- Z shell (zsh)

A win32 port of zsh has been made by Amol Deshpande (ftp://ftp.blarg.net/users/amol/zsh).

It  is  required that environment variable HOME or WCDHOME is set.  A function must be defined
(e.g. in $HOME/.zshenv) like this:


function wcd
{
   c:/bin/wcdwin32.exe $*
   . $HOME/wcd.go
}

......................................................................

- UNC support

UNC stands for Universal Naming Convention.
It is a Windows 9x/NT way of accessing network drives without
using a drive letter.
It's from Windows SMB LAN manager networking.
A UNC path looks like: \\servername\sharename

In Windows networking, you can map a drive letter to a UNC:
  net use G: \\gui_fileserv\apps

The win32 console version of wcd supports UNC paths since version 3.1.0. 
To change to the UNC path wcd makes use of the 'pushd' command in the
wcdgo.bat script. 

Quote from John Savill's Windows NT/2000 FAQ (http://www.windows2000faq.com):

``The 'pushd' command automatically maps a drive and navigates to it. If you
run the 'net use' command after you run pushd, you'll see a new drive mapping.
After you're done working in the UNC location, use the 'popd' command to
navigate back to your original network location before you ran 'pushd'.''

Options -S, -A and -E can also work on servernames. For instance:

  wcd -S \\servername

will search for shared directories on the server and scan them all.



The Win32 zsh version of wcd has full support of UNC paths. In zsh one
can change directly to UNC paths, without mapping to a drive letter.

======================================================================
= 4 Cygwin (Windows 9x / NT) installation                            =
======================================================================

1)
Make sure that environment variable HOME is set.
Create a directory $HOME/bin

2)

 copy wcd.exe to your $HOME/bin directory.

3)

 Add the following function to your ~/.bashrc file.

function wcd
{
   $HOME/bin/wcd.exe $*
   . $HOME/bin/wcd.go
}

Start a new bash

......................................................................

The Cygwin version behaves exactly as the Unix version of wcd.

o) regards case by default.
   - Use option -i to ignore case.
o) does not use drive letters.
o) Uses the same filenames for treedata files etc.

UNC paths are fully supported.

======================================================================
= 5 UNIX installation                                                =
======================================================================

Note that the current working directory of a Bourne-like or C shell can only be
changed by the builtin cd command. Therefore the binary is always called by a
function or alias. The function or alias sources a shell script (go-script)
which is generated by the binary wcd.exe. Wcd can only work after the function
or alias is defined.

The following examples show the installation on a system where you don't have
root privileges. Read the manpage of the shell you are using on how to define a
function or an alias.

If the environment variable WCDHOME is set wcd will use
WCDHOME instead of HOME.

......................................................................

Bourne-like shells:

Korn Shell (ksh, pdksh), Bourne Again Shell (bash), Z shell (zsh),
ash, ... :

1)

 copy wcd.exe to your $HOME/bin directory.

2)

 Add the following function to a startup file of your shell,
 e.g. in $HOME/.kshrc (ksh), $HOME/.bashrc (bash) or in
 $HOME/.zshenv (zsh).


function wcd
{
   $HOME/bin/wcd.exe $*
   . $HOME/bin/wcd.go
}

Start a new shell

......................................................................

C Shell (csh):

1)

 copy wcd.exe to your $HOME/bin directory.

2)

 Add the following alias to your $HOME/.cshrc
 file.

alias wcd "$HOME/bin/wcd.exe \!* ; source $HOME/bin/wcd.go"

Start a new C Shell

......................................................................

The executable can be shared among all users. The wcd.go file
is personal:

function wcd
{
   /usr/local/bin/wcd.exe $*
   . $HOME/bin/wcd.go
}

......................................................................

The first time wcd is used the program will scan your
disk and build a .treedata.wcd file in your HOME-directory.
The .treedata.wcd file can be updated by feeding the -s option.

wcd.exe will generate each time a script wcd.go in your
$HOME/bin directory which must be executed via the function.

......................................................................

Adding extra directories not on your own account:

You can add an extra directory-list in the file $HOME/.extra.wcd


Example:

/home/piet/vhdl
/home/piet/project_a/c/src
/home/jan/perl

See also options -e and -E

......................................................................

It is possible to turn off the automatic pathname expansion
of the unix shell.

In the C shell (csh) you can use 'set noglob' to turn it off, and
'unset noglob' to turn it on again. One could make the following
wcd alias:

alias wcd "set noglob; $HOME/bin/wcd.exe \!* ; unset noglob; source $HOME/bin/wcd.go"

In the Korn Shell and the Bash the pathname expansion can be turned off and
on with 'set -o noglob' and 'set +o noglob' (or 'set -f' and 'set +f').
But the function

function wcd
{
 set -o noglob
 /home/waterlan/bin/wcd.exe $*
 set +o noglob
 . $HOME/bin/wcd.go
}

does not have the desired effect. Can somebody help?

======================================================================
= 6 Know problems                                                    =
======================================================================

1. Unix and DOS 32 bit version:
   - Strange behaviour when the argument has a wildcard and matches a
     file or directory in the current directory.

  This is the result of the pathname expansion of the shell.
  The work-around is to "double quote" the argument (in some shells).
  See also the section Unix installation.

......................................................................

If you think you found a bug do the following.
First check that you have the latest version of WCD. The bug
may already have been solved.
If it has not been solved than send me an e-mail.
Describe the bug and tell me
what version of WCD you use and under what operating system.
Addresses are at the end of this file.

Also ideas to improve wcd are welcome.

======================================================================
= 7 Source code                                                      =
======================================================================

The 16 bit DOS version has been compiled with Borland C/C++ 4.02, but will
also compile with Borland 3.

The 32 bit dos versions are compiled with DJGPP and do not use DOSDIR. DJGPP is
a mix of DOS/Unix (both 'MSDOS' and 'unix' are defined).  DOSDIR's
dd_findfirst/dd_findnext implementation for Unix is build with opendir/readdir.
Using DJGPP's implementation of opendir/readdir to scan a disk is about a
factor 100 slower than using findfirst/findnext (with DJGPP 2.01, gcc 2.7.2).
Also using DOSDIR's dd_findfirst/dd_findnext for DOS is very slow when it is
compiled with DJGPP.  It is about a factor 35 slower than using DJGPP's
findfirst/findnext.  Probably due to a slow stat() function in dd_initstruct().
Using DOSDIR in combination with DJGPP would make scanning the disk very slow.

The win32 console version is by default compiled with MinGW.  Win32 versions
can also be compiled with Borland, Cygwin and LCC. Although Borland 4 can
compile wcd with conio interface for windows console, it doesn't work well. The
screen gets garbled after exit.

Wcd for Unix compiles with gcc and with the native system C compilers such as
HP-UX cc or SunOS cc.

Wcd can optionally have a curse-based interface.  Wcd compiles with curses,
ncurses and pdcurses. Ncurses is preferred, because of portability and it
restores the screen automatically after exit (if possible) and has better
support for resizing of the terminal.

The ncurses (new curses) library is a free software emulation of curses in
System V Release 4.0, and more. It uses terminfo format, supports pads and
color and multiple highlights and forms characters and function-key mapping,
and has all the other SYSV-curses enhancements over BSD curses.
The ncurses distribution is available via anonymous FTP at the GNU distribution
site ftp://ftp.gnu.org/pub/gnu/ncurses. It is also available at
ftp://ftp.clark.net/pub/dickey/ncurses. 

PDCurses is a port of System VR4 curses for multiple platforms.  PDCurses has
been ported to DOS, OS/2, X11, WIN32 and Flexos. A directory containing the
port-specific source files exists for each of these platforms.
Get it at http://pdcurses.sourceforge.net/

DJGPP is a project to port the GNU C/C++ compiler to DOS.
It includes a shell (bash) and many ported unix utilities.
For more information about DJGPP take a look at this
internet homepage:   http://www.delorie.com/djgpp/

Cygwin is a project to port the GNU C/C++ compiler to Windows.
It includes a shell (bash) and many ported unix utilities.
For more information about Cygwin take a look at this
internet homepage:   http://cygwin.com/

MinGW is a project to port GNU C/C++ compiler to Windows.
internet homepage: http://www.mingw.org/

LCC is a free C compiler for windows.
internet homepage: http://www.cs.virginia.edu/~lcc-win32/

======================================================================
= 8 Modification history                                             =
======================================================================

   V1.0 beta Oct-1996  Original version.
   V1.0      Nov 14 1996. Always let the user choose
             in case of multiple match.
   V1.2c     Feb 11 1997.
             Many bugs have been solved.
   V1.3a     May 2 1997
             The Unix version can now also deal with
             directory names with spaces, dollars,
             backslashes, single quotes and double quotes.
   V1.4      Jun 18 1997
             Search with subdirectory definition
             (E.g. wcd adir1/adir2).

   V1.4      Aug 18 1997
        Added 32 bit DOS version. Changed source code
        for DJGPP compiler.
        This version is faster but needs a 80386 CPU
        or higher.

   V1.4b     Sep 12 1997
        Small bug fix perfect match list.
        Quiet option added.

   V1.5      Oct 28 1997
             More options: -Q -f -u
        Dos versions can work on read-only drives if
        TEMP environment variable is set.
        C shell support.

   V1.5a     Nov 10 1997
             Bug fix dos32 bit version long dir names support
        in Windows 95 dos-box

   V1.6      Nov 11 1997
        Added Unix bash support
        Added a DOS bash version

   V1.7e     Dec 9 1997
        - Add directories without scanning.
        - Improved choosing from a list.
        - quiet option default ON in DOS versions.
        - changed MAX_LIST and MAX_WILD_LIST to 22
        - no drive in treedata (DOS)
        - direct CD mode

   V1.8.0    Feb 9 1998
        - Change drive and dir in one go (Dos).
        - Ban paths
        - Alias directories

   V1.8.3    Feb 26 1998
        - Bug fix. Dos version crashed on read-only drive if
          TEMP environment variable was not set.

  V2.0.0     Mar 9 1998
        - Changed distribution conditions to GNU General
          Public License.

  V2.0.4   Mar 12 1998
         - More scanning options: -S <dir>, -A <dir>, -E <dir>
         - check for double matches
         - source Ansi C compliant
         - ending '/' allowed in database

   2.0.5 - Bug solved. Endless loop on 64 bit Unix system (SGI IRIX64)

  V2.1.0   Jun 18 1998
      - Directory stack
      - Data structures with dynamic memory allocation
      - ignore case option (unix)
      - go $HOME when no directory is given
      - man page

        Jun 29 1998
   2.1.1   - Bug fix: alias, ban and stack could not deal with
                  paths with spaces.
   2.1.2   - Bug fix: backspace in long match list (DOS)
   2.1.3   - Bug fix: command line parsing (DOS 32 bit)
   2.1.4   - quiet option default ON (Unix)

        Jul 15 1998
   2.1.5   - Sort match lists

   2.1.6  Jul 22 1998
         - removed "dangerous" gets() function.
        (In the way gets() was used in wcd it was
       not dangerous. gets() has been removed to
       avoid warnings some compilers or systems give
       (e.g. gcc or FreeBSD).)

   2.1.7  Sep 2 1998
         - bug fix: give warning if cannot change to directory
       that is in database.

   2.2.0 Jan 29 1999
         - changed name to Wherever Change Directory
         - automaticly remove directories from treedata to which cannot be changed.
         - links support (unix only)
         - restore text screen after list (dos only)
         new options:
          -m       make directory and add to treedata file
          -M       make directory and add to extra treedata file
          -r       remove directory and remove from treedata
          -rmtree  remove directory recursive and remove from treedata
          -n  +n   use relative treefile
          +S       make relative treefile
          -t       don't skip mount string before /home (unix only)
         changed options: -u, +u, -f, +f
         - some minor changes.

2.2.1 Jan 29 1999

     bug fix +S,-n,+n options on directory /

2.2.2 Feb 24 1999

     bug fix on automounted directories (Unix).

2.2.3 Mar 21 1999

     -All versions can read DOS and UNIX text files.
     -INSTALLATION section in manpage

2.2.4 Apr 14 1999

     -DOS versions can use environment variable HOME
     -path fixing
     -options -S, +S, -A, -E, -m, -M, -r, and -rmtree can be repeated.

2.2.5 Apr 15 1999
     - bug fix path fixing

2.2.6 May 12 1999
     new options:
     -aa   Add current and all parent paths to treedata
     -ee   add current and all parent paths to Extra treedata

2.2.7 Sep 30 1999
     - environment variable WCDHOME overrides HOME.
     - improved choosing from list (DOS versions).
     - improved manpage
     - mode bits for new directory created with -m option
       are now only defined by umask.

2.2.8 Nov 19 1999
     - option -i now also for dos versions
     - new option: +i  regard case
     - minor update interface dos versions
     - win32 console port

2.2.9 Jan 16 2000
     - new option -w: Wild matching only.
     - made wcd compile with MINGW32 compiler.
     - win32 version for Amol Deshpande's Win32 port
       of zsh (ftp://ftp.blarg.net/users/amol/zsh).
     - bug fix: read long paths from stack file (dos 32 bit)

2.3.0 Apr 27 2000
     - Optional ncurses based interface for unix versions.

2.3.1 May 28 2000
     - bug fix in ncurses interface (array bounds read/write)
     - update manpage
     - minor changes

2.3.2 Jun 10  2000
     - update for curses and PDCurses

2.3.3 Oct 15 2000
     - fall back from curses to stdout
     - new option: -N  use numbers instead of letters
     - new option: -o  use stdout instead of curses or conio
     - scroll back stack for conio version

3.0.0 Apr 12 2001

  -g   Curses version only:
       Full screen interactive directory browser.
       `Graphical' match list.
       Vi(m) like tree navigation and search,
       with wildcard and subdir support
  -gd  Curses verion only:
       dump tree to stdout
  -j   justgo mode
  -G   set path for go-script
  -GN  Don't create go-script

3.0.1 Jul 6 2001
     - update to compile 16 bit dos version with PDCurses.
     - minor update manpage
     - makefile for SunOS curses
     - rpm .spec file update for Redhat 7.1

3.0.2 Oct 17 2001
     - bugfix: path quoting in go-script:
       win32: paths with ampersand (&) or percent (%)
       unix, dos bash, win zsh: paths with grave accent (`)
       unix: path with backslash (\)
     - update manpage section DESCRIPTION

3.0.3 Nov 25 2001
   - Zoom, fold and condense in graphical tree mode.

3.0.4 Jul 6 2002
   - Graphical tree mode: Terminal resize (on systems that support it).
   - Update manpage.
   - wildcards support in banfile
   - Exclude paths from scanning: options -x and -xf
   - Compiles now with LCC windows C compiler.
   - Improved sideways scrolling of matchlist (curses).
   - Arrow keys work in matchlist in win32 version (curses).
   - Option -k : Keep paths in treedata when wcd cannot change to them.

3.0.5 Jul 8 2002
  - bugfix: compile errors

3.0.6 Sep 4 2002
  - bugfix option -x when used multiple times.
  - minor updates manpage
  - support longer paths on unix (1024 chars)

3.0.7 Oct 17 2002
  - minor updates in documentation: manpage, wcd.txt and INSTALL
  - fixed a memory leak which could cause unix versions of wcd to
    generate incorrect treedata files during disk scan with paths
    excluded.

3.1.0 Nov 13 2002
  - Windows console version supports Windows LAN UNC paths.
  - Option -gd will dump all treefiles that are read.

3.1.1 May 20 2003
  - patch for compile problems w.r.t. gcc and <stdbool.h> (thanks Kevin M. Rosenberg)
    See INSTALL.
  - fix compile problems on Mac OS X/Darwin (thanks Zoltan Varady).
  - default makefile for DOS 16 bit (compact memory model) works again
    (thanks to Eric Auer).
  - smaller 16 bit DOS binaries (stripped).

3.1.2 Oct 19 2003
  - Specify filters with environment variable WCDFILTER.
    All directories that don't match the filter(s) are ignored.
  - Add bans with environment variable WCDBAN
  - Add excludes with environment variable WCDEXCLUDE
  - New option: -V  Verbose operation.
  - Removed option -q
  - Removed duplicate wcd.c file for DJGPP.

3.1.3 Oct 23 2003
  - bugfix: fixed bufferoverflow, introduced in wcd 3.1.2 when environment
    variable WCDBAN or WCDEXCLUDE was used.

3.1.4 Jun 29 2004
  - Don't print "-> <dirname>" when can't change to directory.
  - Update man page.

3.1.5 Aug 27 2005
  - win32 console with PDCurses: use original colours
    (thanks to Gabor Grothendieck and Mark Hessling)
  - wcd with PDCurses: restore screen by default, no need to set enviroment
    variable PDC_RESTORE_SCREEN.(thanks to Gabor Grothendieck)
  - New option -ga : Alternative way of navigating in graphics mode. Don't
    jump to unrelated directories (thanks to Ken Zinnato).
  - New option -od : dump matches to stdout.(Thanks to Richard Boss)
  - Updated makefiles for windows compilers. Added makefile for Borland C
    with PDCurses.
  - Fix for disk scanning problem for Borland CPP 5.x

3.1.6 Sep 29 2005
  - Support UNC paths in Cygwin version, including scanning
    of servers (wcd -S //servername).
  - Cygwin and Win32 ZSH version: Select correct directory
    in graphical tree mode if current working directory is a UNC path.
  - Try to create directory for go-script when it doesn't exist.

3.2.0 beta11 Nov 23 2005
  - Support 8 bit characters (non-ASCII characters). (Thanks to Richard Boss)
  - Reorganised source zip package.
  - Bugfix Curses interface: uninitialised data was written to screen.
    This problem showed up with wcd with PDCurses interface on some
    Windows 2000/XP systems by printing a lot of garbage in the console
    (many small rectangles) when environment variable PDC_RESTORE_SCREEN was
    set. (Thanks to Scott D Friedemann)
  - Don't set variable PDC_RESTORE_SCREEN automatically.
  - Curses interface: Print match list at bottom of console. (Thanks to Richard Boss)
  - Use reverse colours to highlight.
  - Bugfix PDCurses 1144353 : When PDC_RESTORE_SCREEN was set and the console
    buffer was too big wcd scrolled away.  (thanks to Mark Hessling )
  - DOS and Windows version can use option -u.
  - Set base directory for users home directories with environment variable
    WCDUSERSHOME.

======================================================================
= 9 Copyright                                                        =
======================================================================

Copyright (C) 1997-2005 Erwin Waterlander

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

.......................................................................

Data structures with dynamic memory allocation were created
with Ondrej Popp's C3PO ( Compiler Compiler Compiler Popp Ondrej ).

http://www.creativefun.org/

e-mail: ondrej@creativefun.org
        ondrej.popp@philips.com
.......................................................................

For the DOS-16-bit and the Unix version I use DOSDIR. Only the parts
of DOSDIR that are distributed under GNU General Public License are
used in WCD.

DOSDIR: A Portable DOS/UNIX/VMS Directory Interface

DOSDIR minimizes the OS-specific directory access code for applications
allowing programmers to concentrate on the application itself and not
on the low-level directory and file structure.  DOSDIR applications
will run on their native operating systems with the appropriate file
syntax and handling, which is expected for that platform.

Copyright (C) 1994 Jason Mathews.

        Jason Mathews
        The MITRE Corporation
   202 Burlington Road
   Bedford, MA 01730-1420

   Email: mathews@mitre.org, mathews@computer.org

.......................................................................

wcd_fixpath() is a modified version of
_fixpath()  Copyright (C) 1995-1996 DJ Delorie, see COPYING.DJ for details

_fixpath() is a library function of libc for DJGPP.
See also http://www.delorie.com/djgpp/

.......................................................................

I used the regular matching algorithm, recmatch(), of Info-Zip's
unzip program.

recmatch() was written by Mark Adler.

Copyright (C) 1990-1992 Mark Adler, Richard B. Wales, Jean-loup Gailly,
Kai Uwe Rommel and Igor Mandrichenko.

Mark Adler (original Zip author; UnZip decompression; writer of
recmatch() ) and Greg Roelofs (former UnZip maintainer/co-author)
have given permission to me to distribute recmatch() (match.c,match.h)
under the GNU General Public License conditions as long as there's
some sort of comment included that indicates it came from Info-ZIP's
UnZip/Zip and was written by Mark Adler.

   Info-ZIP's home WWW site is at:

   http://www.info-zip.org/pub/infozip/

......................................................................

Both DOSDIR and UNZIP are among others distributed by the Simtel.Net(sm)
world-wide network.

DOSDIR can also be download from my own homepage
http://www.xs4all.nl/~waterlan/

......................................................................

Ideas and source code of NCD (Ninux Czo Directory) have been
used in the WCD graphical interface.

Ninux Change Directory
Copyright (C) 1995 Borja Etxebarria
<borja@bips.bi.ehu.es> or <jtbecgob@s835cc.bi.ehu.es>
http://www.ibiblio.org/pub/Linux/utils/shell/ncd-0.9.8.tgz

Additions on NCD were made by Olivier Sirol (Czo)

Ninux Czo Directory
Copyright (C) 1995 Borja Etxebarria
Copyright (C) 1996 Olivier Sirol
Olivier Sirol <sirol@ecoledoc.ibp.fr>
http://www.ibiblio.org/pub/Linux/utils/file/managers/ncd1_205.tgz

======================================================================
= 10 Acknowledgements                                                =
======================================================================

Thanks to the following people for giving ideas and/or
reporting/solving bugs:

Leo Sevat           (? I forgot. ew)
Paul Lippens        (? I forgot. ew)
Ondrej Popp         (relative treefiles)
Ad Vaassen          (subdirectories)
Michael Magan       (interface)
Christopher Drexler (bugfix on SGI IRIX64)
Richard Tietjen     (HOME on DOS/Windows)
Howard Schwartz     (interface: use letters, WCDHOME)
Ajit J. Thakkar     (zsh on windows)
Christian Mondrup   (man page)
Gary R. Johnson     (graphical tree mode)
Peter Gutmann       (just go mode)
Etienne Joarlette   (SunOS makefile)
Edwin Rijpkema      (zoom in graphical tree mode)
Juhapekka Tolvanen  (man page)
Andre vd Avoird     (Keep paths, -k)
Gabor Grothendieck  (UNC paths support)
Kevin M. Rosenberg  (patch for compile problems w.r.t. gcc and <stdbool.h>, man page)
Zoltan Varady       (fix compile problems on Mac OS X/Darwin)
Eric Auer           (default makefile for DOS 16 bit (compact memory model) works again)
Val Vakar           (WCDFILTER)
Jari Aalto          (man page)
Gabor Grothendieck &(original console colours on windows)
Mark Hessling
Gabor Grothendieck  (automatically set PDC_RESTORE_SCREEN)
Richard Boss        (dump matches to stdout)
Ken Zinnato         (alternative tree navigation)
Scott D Friedemann  (fix: curses interface writes uninitialised data to screen)
Richard Boss        (8-bit characters)
Richard Boss        (print match list at bottom of console)
Mark Hessling       (fix: scroll away problem on Windows NT/2000/XP)


Thanks to the following people for using their Free software:

Ondrej Popp,                        C3PO
Jason Mathews,                      dosdir
Mark Adler,                         recmatch()
DJ Delorie                          _fixpath()
Borja Etxebarria & Olivier Sirol    Ninux Czo Directory
Felix Kasza (MVPS.ORG http://www.mvps.org/win32/) WIN32 API sample WNetOpenEnum()/WNetEnumResource()

======================================================================
= 11 Contact / Download new versions                                 =
======================================================================

I can be contacted via E-mail:
          waterlan@xs4all.nl

Address : Zeelsterstraat 59b
          5652 EB Eindhoven
          The Netherlands

--

The latest version of WCD, executables and sources, can be downloaded from
this internet-pages:

http://www.xs4all.nl/~waterlan/

--

For each release of wcd there are two main packages
(the question marks indicate the version number):

wcd-?.?.?-src.tar.gz   : package for Unix systems.
   Includes source code in unix text.

wcd???bs.zip : package for DOS and Windows.
   Includes source code in DOS text and DOS and
   Windows ready-to-run binaries.
  
wcd???s.zip : package for DOS and Windows.
   Includes source code in DOS text.
  
--

Wcd is also distributed by:

Simtel.Net:
http://www.simtel.net/pub/simtelnet/msdos/dirutl/
ftp://ftp.simtel.net/pub/simtelnet/msdos/dirutl/

Garbo:
http://garbo.uwasa.fi/pc/dirutil/
ftp://garbo.uwasa.fi/pc/dirutil/

Ibiblio (was Metalab (was SunSite)):
http://www.ibiblio.org/pub/Linux/utils/shell/

SourceForge:
http://sourceforge.net/projects/wcd/

-- 
Erwin Waterlander