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 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831
|
.\"
.\" Copyright (c) 1995-2002 Takashi SHIRAI
.\" <shirai@nintendo.co.jp>
.\"
.\" @(#)fd.1 2.00a 02/06/02
.\" fd - File & Directory maintenance tool
.TH FD 1 "February 6, 2002"
.de sh
.br
.PP
\fB\\$1\fR
.PP
..
.SH NAME
fd \- file & directory maintenance tool
.SH SYNOPSIS
.B fd
[
.B \-aefhikmnrstuxv
] [
.BI \- NAME = value
] [
.I directory
]
.br
.B fdsh
[
.B \-acefhikmnrstuxv
] [
.I args
]
.SH DESCRIPTION
.B fd
is a file & directory maintenance tool
considered for the text terminals on general UNIX.
It aims for a clone of the same named utility
which is made for the PC/AT compatible machine and PC-9800 series.
In fact, it is upper compatible functionally.
.B fd
shows the browser screen listing files when you have invoked it.
You can input some key which is bound each command,
to execute various operations.
(In the following description,
.B (U)
means that the operation is implemented only on UNIX version
and not effective on MS-DOS version.
As well as it,
.B (D)
means that the operation is implemented only on MS-DOS version.)
.SS Options
The command line option is used for setting internal shell operations
and setting the internal variables described below.
You can use any variable name as the internal variable,
but
.B fd
can accept only those
which are described in the below section of
.BR "ENVIRONMENT VARIABLES" .
If you specify
.IR directory ,
the current directory is moved to the directory initially.
The following options are available for the internal shell.
.TP
.BI \-c " string"
Commands described by
.I string
are executed and exit immediately.
It is effective only when it is invoked as
.BR fdsh .
.TP
.B \-i
If the
.B \-i
flag is present or if the standard input/output is a terminal,
the shell is interactive shell.
.TP
.B \-s
If the
.B \-s
flag is present or if no
.I args
is specified,
commands for the shell are read from the standard input.
Any remaining argument specifies the positional parameter.
.TP
.B \-r
The shell is a restricted shell.
Specifically, the following operations are disallowed.
.RS 10
.PD 0
.PP
changing the current directory
.br
setting the value of
.B $PATH
and
.B $SHELL
.br
specifying command names include
.B /
.br
redirecting output
.RB ( >
and
.BR >> )
.ta 1.5i 3i
.nf
.ft B
IN_DIR OUT_DIR LOG_TOP
LOG_DIR ATTR_FILE COPY_FILE
MOVE_FILE DELETE_FILE DELETE_DIR
RENAME_FILE MAKE_DIR WRITE_DIR
TREE_DIR BACKUP_TAPE EDIT_FILE
UNPACK_FILE PACK_FILE LOG_TREE
COPY_TREE MOVE_TREE UNPACK_TREE
FIND_DIR
.ft R
.fi
.PD
.RE
.RS
When invoked as
.B rfd
or
.BR rfdsh ,
it becomes this restricted shell automatically.
.RE
In addition,
the options described below in the description of
.B set
builtin command are available.
.SS Screen Layout
.B fd
has the 3 major screen modes.
In the browser screen,
you can select from the file list and execute each command.
In the archive browser screen,
files in the archive file are listed separately by directory,
and you can browse as well as the browser screen.
In the tree screen,
you can move on the directory tree and select the directory path.
In all screen modes,
each
.B 3
lines on the top/bottom of the screen are used for the various information of
.B fd.
The top information lines sometimes become
.B 4
lines.
The screen layout is the following.
.IP line# 10
Description
.IP \fB1\fP
The title line.
The clock at the right end is updated every
.B 10
seconds.
.IP \fB2\fP
The information line.
It displays informations in this order:
the current page (and the total pages),
the number of marks (ant the total marks),
the sorted type,
the pattern string for file search.
.IP \fB3\fP
The path line.
It displays the fullpath of the current directory.
In the archive browser screen,
it displays the fullpath of the archive file
and the current path in the archive.
.IP "\fB2\fP (optional)"
The file size information line.
It displays the total size of the marked files in the directory
(and the total size of all files),
the total capacity and the free size of the file system
including the current directory.
This line appears by the environment variable
.B SIZEINFO
setting.
When this line is displayed,
The information line and the path line are displayed 1 line under each.
.IP "\fBbottom \- 2\fP"
The stack line.
It displays files temporarily which you push in stack,
when arranging files.
.IP "\fBbottom \- 1\fP"
The function line.
It displays the operations of function keys.
.IP "\fBbottom\fP"
The status line.
It displays the status of the file on the cursor position.
It also displays warning messages when command is executed with some troubles.
.SS Internal Commands
You can use the following internal commands on
.BR fd .
While any user can change the key binding for these internal commands,
here shows the default key binding.
The identifier is used when it is executed from the command line of
.B EXECUTE_SH
command,
and when the user defines the key binding.
.br
.ta 2i 5i
.nf
Identifier Command Key
\fBCUR_UP\fP Move a cursor up \fBUp\fP
\fBCUR_DOWN\fP Move a cursor down \fBDown\fP
\fBCUR_RIGHT\fP Move a cursor right \fBRight\fP
\fBCUR_LEFT\fP Move a cursor left \fBLeft\fP
\fBROLL_UP\fP Turn ahead to the next page \fBPageDown\fP
\fBROLL_DOWN\fP Turn back to the prev. page \fBPageUp\fP
\fBCUR_TOP\fP Move a cursor top \fBBeg\fP(<)
\fBCUR_BOTTOM\fP Move a cursor bottom \fBEol\fP(>)
\fBFNAME_RIGHT\fP Shift right a filename \fB(\fP
\fBFNAME_LEFT\fP Shift left a filename \fB)\fP
\fBONE_COLUMN\fP Change layout into 1 column \fB1\fP
\fBTWO_COLUMNS\fP Change layout into 2 columns \fB2\fP
\fBTHREE_COLUMNS\fP Change layout into 3 columns \fB3\fP
\fBFIVE_COLUMNS\fP Change layout into 5 columns \fB5\fP
\fBMARK_FILE\fP Mark a file \fBTab\fP
\fBMARK_FILE2\fP Mark and move down \fBSpace\fP
\fBMARK_FILE3\fP Mark and move in a page \fB^Space\fP(^@)
\fBMARK_ALL\fP Mark all files \fBHome\fP(+)
\fBMARK_REVERSE\fP Mark all files reversely \fBEnd\fP(-)
\fBMARK_FIND\fP Mark the matched files \fB\(**\fP
\fBIN_DIR\fP Change to a sub directory \fBReturn\fP
\fBOUT_DIR\fP Change to a parent directory \fBBs\fP
\fBLOG_TOP\fP Change to a root directory \fB\e\fP
\fBREREAD_DIR\fP Reread the current directory \fB^L\fP
\fBPUSH_FILE\fP Push a file to the stack \fBDel\fP(])
\fBPOP_FILE\fP Pop a file from the stack \fBIns\fP([)
\fBLOG_DIR\fP Change to a logical directory \fBF1\fP(l)
\fBEXECUTE_FILE\fP Execute a file \fBF2\fP(x)
\fBCOPY_FILE\fP Copy a file \fBF3\fP(c)
\fBDELETE_FILE\fP Delete a file \fBF4\fP(d)
\fBRENAME_FILE\fP Rename a file \fBF5\fP(r)
\fBSORT_DIR\fP Sort the current directory \fBF6\fP(s)
\fBFIND_FILE\fP Find files \fBF7\fP(f)
\fBTREE_DIR\fP Display the tree screen \fBF8\fP(t)
\fBEDIT_FILE\fP Edit a file \fBF9\fP(e)
\fBUNPACK_FILE\fP Unpack a file \fBF10\fP(u)
\fBATTR_FILE\fP Change a file attribute \fBF11\fP(a)
\fBINFO_FILESYS\fP Display a file system info. \fBF12\fP(i)
\fBMOVE_FILE\fP Move a file \fBF13\fP(m)
\fBDELETE_DIR\fP Delete a directory \fBF14\fP(D)
\fBMAKE_DIR\fP Make a directory \fBF15\fP(k)
\fBEXECUTE_SH\fP Execute a child process \fBF16\fP(h)
\fBWRITE_DIR\fP Write a displayed directory \fBF17\fP(w)
\fBBACKUP_TAPE\fP Backup into a tape \fBF18\fP(b)
\fBVIEW_FILE\fP View a file \fBF19\fP(v)
\fBPACK_FILE\fP Pack a file \fBF20\fP(p)
\fBLOG_TREE\fP Change directory with tree \fBL\fP
\fBCOPY_TREE\fP Copy a file with tree \fBC\fP
\fBMOVE_TREE\fP Move a file with tree \fBM\fP
\fBUNPACK_TREE\fP Unpack a file with tree \fBU\fP
\fBFIND_DIR\fP Find a file recursively \fBF\fP
\fBSYMLINK_MODE\fP Switch the symbolic link mode \fBS\fP
\fBFILETYPE_MODE\fP Switch the file type symbol \fBT\fP
\fBDOTFILE_MODE\fP Switch the dot file display \fBH\fP
\fBFILEFLG_MODE\fP Switch the file flag display \fBO\fP
\fBLAUNCH_FILE\fP Invoke the launcher \fBReturn\fP
\fBSEARCH_FORW\fP Search forward a file \fB^S\fP
\fBSEARCH_BACK\fP Search backward a file \fB^R\fP
\fBSPLIT_WINDOW\fP Split into the windows \fB/\fP
\fBNEXT_WINDOW\fP Change to the next window \fB^\fP
\fBEDIT_CONFIG\fP Invoke the customizer \fBE\fP
\fBHELP_MESSAGE\fP Display a help screen \fB?\fP
\fBQUIT_SYSTEM\fP Quit from fd \fBEsc\fP(q)
\fBWARNING_BELL\fP Bell for warning
\fBNO_OPERATION\fP Do nothing
.fi
.PP
The last 2 internal commands are used
when you want change the default key binding to cancel.
.SS Internal Commands Description
The detail of each internal command is the following.
Internal commands with similar function are described together.
.RS 3
.IP "\fBMove cursor\fP" 5
Move a cursor.
.IP "\fBTurn page\fP"
Turn to the previous/next page,
when files are not completely held in a screen.
Also if you try to move out of the page with Cursor move,
the page will be turned.
.IP "\fBMove to the top/bottom\fP"
Move a cursor to the top/bottom of the file list.
When the list is not held in a screen,
the page is turned.
.IP "\fBShift filename\fP"
Shift the displayed string of filename on the cursor position,
when the filename is longer than the prepared column width.
It is displayed as shifted to right/left by 1 character.
The display of the status line is also shifted simultaneously.
.IP "\fBChange layout\fP"
Change the number of columns into each value.
There are usually
.B 2
columns per screen.
As the column width per file is changed according to the number of columns,
the displayed information is also changed.
.IP "\fBMark file\fP"
Mark the file on the cursor position.
You cannot mark any directory.
.RB [ Space ]
marks and moves down a cursor.
.RB [ ^Space ]
also marks and moves down a cursor,
but doesn't turn the page.
.RB [ Home ]
marks all the files,
.RB [ End ]
marks all the files reversely.
.RB [ \(** ]
additionally marks the file which matches the wildcard.
You must input the wildcard string whenever you push
.RB [ \(** ].
Marked files are used as the target of
.BR ATTR_FILE ,
.BR COPY_FILE ,
.BR DELETE_FILE ,
.BR MOVE_FILE ,
.B UNPACK_FILE
and the user defined command macros.
.IP "\fBChange directory\fP"
.RB [ Return ]
changes the current directory
to the directory on the cursor position.
If you want to change it to the parent directory,
you should move a cursor to the file of ".\|." and push
.RB [ Return ],
or simply push
.RB [ Bs ].
.RB [ \e ]
changes the current directory to the root directory.
.IP "\fBPush/pop file stack\fP"
.RB [ Del ]
pushes the file on the cursor position to the file stack,
and temporarily deletes the file from the file list screen.
You can push files to the file stack up to
.B 5
files.
.RB [ Ins ]
pops the file from the file stack
and insert it on the cursor position.
The last pushed file is popped first.
But this order is expediently displayed in
.BR fd ,
and it is reset by Directory move.
.IP "\fBRedraw screen\fP"
Redraw the file list screen
by rereading the information of the current directory.
It is useful when some other process add/delete files,
or when something break the screen display.
Moreover,
when you use the terminal which doesn't raise
.B SIGWINCH
signal at changing the screen size (like
.BR kterm (1)
on HP-UX, etc.),
you must intentionally redraw after you change the screen size.
.IP "\fBChange logical directory\fP (Logdir)"
Change the current directory to the inputted pathname.
When you input the pathname which starts with '/',
it means not the relative move but the absolute move.
When you input the pathname "\fB.\fP",
the pathname of the current directory is adjusted into absolute expression.
Except this case,
the current directory always is shown as the virtual pathname,
by reason of a link and so on.
When you input the pathname "\fB?\fP",
you can move to the current directory when
.B fd
was invoked.
When you input the pathname "\fB-\fP",
you can move to the last visited directory.
Moreover,
When you input the pathname "\fB@\fP" in floppy drive,
you can move to the directory on UNIX file system,
where you existed before moving to floppy drive.
.B (U)
(Note:
This command is called as "Loddsk" in the original FD on MS-DOS,
which is short for "LOGical DiSK drive".
This "logical" means the drive name prefixed to pathnames,
and it is virtually named against "physical disk drive".
On UNIX,
since "logical disk drive" never means pathname nor directory,
this command name "Change logical directory" is not suitable.
But this name is expediently inherited from the original version.)
.IP "\fBExecute file\fP (eXec)"
Execute the file on the cursor position with some parameters,
as the child process.
The cursor position in command line exists
after the filename in case of the executable file,
and before the filename except it.
You should fill suitable parameters or command name in each case.
The up/down cursor keys can provide the command history
which you executed before.
On MS-DOS version,
the LFN form filename in the command line
which is quoted with the quotation mark \fB"\fP
is automatically replaced into 8+3 form filename before execution.
In this case,
when there is the filename described by the string quoted with \fB"\fP,
this string is always replaced into 8+3 form filename after deleting \fB"\fP,
otherwise it is never replaced including \fB"\fP.
.IP "\fBCopy file\fP (Copy)"
Copy the file on the cursor position to the specified directory.
When the cursor position indicates a directory,
its contents are copied recursively.
When some files are marked,
the target is not the file on the cursor position but the marked files.
When the same named file exists in the destination,
you can select the operation from the following:
"Update (by timestamp)",
"Rename (each copied file)",
"Overwrite",
"Not_copy_the_same_name",
"Forward".
If you select "Forward",
you should specify the directory as the destination to forward.
All files which have the same names are moved to the specified directory.
.IP "\fBDelete file\fP (Delete)"
Delete the file on the cursor position.
No directory can be deleted.
When some files are marked,
the target is not the file on the cursor position but the marked files.
When you don't have write permission on the file,
you are confirmed for security.
.IP "\fBRename file\fP (Rename)"
Rename the file on the cursor position.
You cannot rename to the same name as any existent file.
When you specify the pathname with some directory name,
it is also moved to the directory.
.IP "\fBSort file\fP (Sort)"
Sort files in the current directory.
You can select the sorted type from the following:
"fileName", "Extension", "Size", "Timestamp", "Length (of filename)",
and specify "Up (incremental order)" or "Down (decremental order)".
When the sorted type before sorting is the one except "No chg (not sort)",
the choice will include "No chg".
When you sort after sorting another sorted type,
the previous sorted result is based in sorting.
This sorting has a priority except specified type,
the directory is always precedes any file,
except for the case of "No chg".
In case of "Length",
files which have the same filename length are sorted in order of their names.
But this sorting is expediently displayed in
.BR fd ,
and it is reset by Directory move.
.IP "\fBFind file\fP (Find)"
Find the files matching the wildcard, and display only them.
The filename which starts with '.'
doesn't match the wildcard which starts with '\(**' nor '?'.
If you want to cancel the File find,
you should move the current directory,
or do
.B FIND_FILE
again and input a null line.
When the current directory has the files
which have the extension registered to associate with an archive browser,
the string which starts with '/' is used
to find not the filename but the filename in archive files,
and only the archive files which contain matched files are displayed.
This function is available in the archive browser.
After Find file,
you can not do
.BR WRITE_DIR .
.IP "\fBDisplay tree screen\fP (Tree)"
Display the directory tree based on the current directory.
You can select the directory in the tree screen,
to move the current directory.
.IP "\fBEdit file\fP (Editor)"
Edit the file on the cursor position.
The editor is used referring the internal variable
.BR EDITOR ,
or referring the environment variable
.BR EDITOR
when the internal variable is undefined.
.IP "\fBUnpack file\fP (Unpack)"
Unpack the archive file on the cursor position into the specified directory.
In builtin configuration,
you can unpack only the tar file and its compressed file
and the LHa compressed file.
You can describe configurations in the initial configuration file
to support archivers except these.
.IP "\fBChange attribute\fP (Attr)"
Change the file access mode and the timestamp
of the file on the cursor position.
When some files are marked,
the target is not the file on the cursor position but the marked files.
In case of the marked files,
you must select the mode or the timestamp,
before changing it all together.
When you input the mode,
cursor keys move a cursor to the position you want to change,
.RB [ Space ]
reverses the attribute on the position.
You should notice that
the attribute of the execution bit is not a binary toggle but a triple toggle,
which includes setuid bit, setgid bit, and sticky bit respectively.
When you input the timestamp,
you move a cursor to the position you want to change,
and input a numeric value.
Finally,
.RB [ Return ]
executes the change.
You can cancel with
.RB [ Esc ].
Be careful that the limit check of date is not perfect.
Moreover,
.RB [ a ](Attr),
.RB [ d ](Date),
.RB [ t ](Time)
move a cursor
to the each beginning of input line.
On the OS which has the attribute of file flags,
you can change the file flags as well as the mode.
But the value of flags which you can change is based on your permission.
.IP "\fBFile system information\fP (Info)"
Display the information of the specified file system.
When the inputted pathname is not the special file
which indicates a file system,
the information of the file system including the pathname is displayed.
.IP "\fBMove file\fP (Move)"
Move the file on the cursor position to the specified directory.
When the cursor position indicates a directory,
the directory itself is moved.
When some files are marked,
the target is not the file on the cursor position but the marked files.
When the same named file exists in the destination,
you can select the operation as well as
.BR COPY_FILE .
When the destination belongs to the different file system,
copy and delete are just executed continuously.
.IP "\fBDelete directory\fP (rmDir)"
Delete the directory on the cursor position recursively.
When the directory in a symbolic link,
only the link is deleted and the linked directory has no effect.
.IP "\fBMake directory\fP (mKdir)"
Make the sub directory on the current directory.
When the inputted sub directory string includes '/',
which is the pathname delimiter,
it goes on making directory recursively
until the directory described by the string is finally created.
When you input the pathname which starts with '/',
the directory is made not on the current directory
but on the absolute path described.
.IP "\fBExecute child process\fP (sHell)"
Execute the inputted command string as the child process,
by handling the internal shell.
You can refer the command history and use automatic LFN replacement,
as well as
.BR EXECUTE_FILE .
When you push only
.RB [ Return ]
without any input,
the user shell which is described by
the internal variable or the environment variable
.B SHELL
is invoked.
In this case,
you should input "\fBexit\fP" to return to
.BR fd .
When the value of
.B SHELL
is
.BR fdsh ,
the internal shell is executed as the interactive shell.
However,
when there is the same command name as a builtin command or a internal command,
the builtin command or the internal command are executed
instead of the external command.
You can refer the clause of `\fBBuiltin Commands\fP'
for the details of the builtin command.
.IP "\fBWrite directory\fP (Write)"
Write the displayed directory.
The gap between files on the directory entry is filled.
When it is executed after arranged by
.BR PUSH_FILE ,
.B POP_FILE
and
.BR SORT_DIR ,
the result is written.
When the displayed directory doesn't belong to
the hierarchy under your home directory,
you are confirmed for security
whether if any other user doesn't use the directory.
Since it is insecure,
you cannot write the NFS mounted directory and some special directories.
If you execute the internal command which arranges the file order,
and then try to execute the internal command which will break that order,
you will be confirmed whether if you write the directory or not,
just before the internal command is executed.
For this function,
you can write the directory
without intentionally executing this Directory write command.
But when the displayed directory is not under your home directory,
this confirmation is not done.
.IP "\fBBackup tape\fP (Backup)"
Backup the file on the cursor position into the specified storage device.
When the cursor position indicates a directory,
all of its contents are backuped.
When some files are marked,
the target is not the file on the cursor position but the marked files.
.BR tar (1)
is used for backup.
When you specify the filename except special files indicates devices
as input of the device name,
the archive file is created with that filename.
.IP "\fBView file\fP (View)"
View the file on the cursor position.
The pager is used referring the internal variable
.BR PAGER ,
or referring the environment variable
.B PAGER
when the internal variable is undefined.
.IP "\fBPack file\fP (Pack)"
Pack the file on the cursor position into the specified archive file.
When the cursor position indicates a directory,
all of its contents are packed into the archive file.
When some files are marked,
the target is not the file on the cursor position but the marked files.
According to the extension of the inputted archive file,
the associated archiver is automatically selected.
In builtin configuration,
you can pack only the tar file and its compressed file
and the LHa compressed file.
You can describe configurations in the initial configuration file
to support archivers except these.
When you use
.BR tar (1),
you may sometimes be unable to pack a lot of files at once,
because of the maximum parameter length which can be given at once.
In those case,
you can create the archive file with
.BR BACKUP_TAPE .
.IP "\fBOperations with tree\fP"
.RB [ L ],
.RB [ C ],
.RB [ M ]
and
.RB [ U ]
can make you select the pathname
from the directory tree instead of the string input.
They execute the internal command equivalent to
.BR LOG_DIR ,
.BR COPY_FILE ,
.B MOVE_FILE
and
.BR UNPACK_FILE ,
respectively.
.IP "\fBFind file recursively\fP"
Find the file matching the wildcard recursively under the current directory,
and move the directory where the found file exists.
When the cursor position indicates a directory,
it find the file under the directory on the cursor position
instead of the current directory.
You will be confirmed for each matching file whether if you move or not,
and you can select
.RB [ n ](No)
unless the target file is displayed.
.IP "\fBInvoke launcher\fP"
.RB [ Return ]
executes the operation according to
the extension of the file on the cursor position,
unless the cursor position indicates a directory.
In builtin configuration,
the archive browser is registered with the tar file and its compressed file
and the LHa compressed file.
You can describe configurations in the initial configuration file
to register launchers except these.
When the file on the cursor position has the unregistered extension,
it will behave as same as
.BR VIEW_FILE .
In the archive browser,
the registered launcher is available,
so that you can invoke the archive browser recursively.
.IP "\fBSwitch symbolic link mode\fP"
In case of the symbolic link file,
the file information displayed in the file column and the status line
shows not the status of its referential file but the status of the link itself.
It switches to show the status of the referential file.
.B (U)
In the mode of showing the status of the referential file,
.RB ' S '(Symbolic
Link)
is displayed on the left end of the function line.
.IP "\fBSwitch file type symbol mode\fP"
Switch to display the symbol which means the file type
after the filename in the file list,
like as the display in -F option of
.BR ls (1).
It is toggle to switch if display the symbol or not.
The each symbol means the following.
.RS 10
.ta 0.5i
.nf
\fB/\fP directory
\fB@\fP symbolic link
\fB\(**\fP executable file
\fB=\fP socket
\fB\(bv\fP FIFO
.fi
.RE
.RS 10
(MS-DOS version and the floppy drive)
.ta 0.5i
.nf
\fB/\fP directory
\fB\(**\fP executable file
\fB=\fP system file
\fB\(bv\fP label
.fi
.RE
.RS
In the mode of displaying the file type symbol,
.RB ' T '(Type)
is displayed on the left end of the function line.
.RE
.IP "\fBSwitch dot file display mode\fP"
Switch not to display the file whose filename starts with '.' in the file list.
It is toggle to switch if display the dot file or not.
In the mode of not displaying the dot file,
.RB ' H '(Hidden)
is displayed on the left end of the function line.
.IP "\fBSwitch file flag display mode\fP"
Switch to display the file flag, which exists in some OS,
instead of the file mode on each file.
It is toggle to switch if display the file flag or the file mode.
This is not available on any OS without the file flag.
The each symbol means the following respectively.
.B (U)
.RS 10
.ta 0.5i
.nf
\fBA\fP Archived
\fBN\fP Nodump
\fBa\fP system Append-only
\fBc\fP system unChangeable (immutable)
\fBu\fP system Undeletable
\fBa\fP user Append-only
\fBc\fP user unChangeable (immutable)
\fBu\fP user Undeletable
.fi
.RE
.RS
In the mode of displaying the file flag,
.RB ' F '(Flags)
is displayed on the left end of the function line.
.RE
.IP "\fBSearch file\fP"
Search the current directory incrementally for the filename,
with moving a cursor.
When you execute this command, to switch to the search mode,
a prompt appears in the function line.
You can input the filename in this prompt,
and a cursor will move to the filename matching the string
which is already inputted at that present.
.RB [ Esc ]
switches to the normal mode.
.IP "\fBSplit window\fP"
Switch from the normal non-split window mode to the split window mode.
In the split window mode,
the screen is split into 2 windows vertically,
so that you can operate works individually on each window.
.IP "\fBChange window\fP"
Change effective window between each windows in the split window mode.
In non-split window mode, it is ineffective.
.IP "\fBInvoke customizer\fP"
Invoke the customizer which interactively changes the configurations
to be set up by the internal variable and the builtin command.
While the configurations which is set up here is reflected immediately,
you must intentionally save configurations in the customizer
if you want to reflect in the initial configuration file.
.IP "\fBDisplay help\fP"
Display the list of the current key bindings and their command descriptions.
When the list is not completely held in a screen,
it prompts for every screen.
In case of the circulated executable binary file,
this screen shows
the E-mail address of the circulation manager in the function line.
Please contact here when something will happen.
.IP "\fBQuit\fP (Quit)"
Quit from
.BR fd .
.RE
.SS Commands
In
.B EXECUTE_SH
and the initial configuration file,
you can use the internal commands described above
and the builtin commands described below,
as well as the external commands.
With these commands,
a pipeline can consist of one or more commands separated by
.B \(bv
or
.BR &\|\(bv .
.B \(bv
connects the standard output of the previous command
to the standard input of the next command.
.B &\|\(bv
connects both the standard output and standard error output
of the previous command
to the standard input of the next command.
The exit status of a pipeline is the exit status of the last command.
You can start a pipeline with
.BR ! ,
then the exit status of a pipeline will be
the logical NOT of the exit status of the last command.
Moreover,
a command list can consist of one or more pipelines separated by
.BR ; ,
.BR & ,
.BR && ,
.BR \(bv\|\(bv .
This command list can end with
.B ;
or
.BR & .
These separators mean the following.
.RS 3
.PD 0
.IP "\fB;\fP" 5
Execute commands sequentially.
.IP "\fB&\fP"
Execute commands synchronously,
not waiting for the preceding pipeline to finish.
.IP "\fB&\|&\fP"
Execute the following pipeline
only if the preceding pipeline returns a 0 exit status.
.IP "\fB\(bv\|\(bv\fP"
Execute the following pipeline
only if the preceding pipeline returns a non-0 exit status.
.PD
.RE
In these command lists,
a newline means as same as
.BR ; .
The input/output of each command in the command list
can be redirected with the following redirectees.
These redirectees can be placed on any position in the command string.
.RS 3
.PD 0
.IP "\fIn\fR\fB<\fP\fIfile\fR" 10
Redirect the input indicated by the file descriptor
.I n
into the input from
.IR file .
If
.I n
is omitted,
it is regarded as the standard input is specified.
.IP "\fIn\fR\fB>\fP\fIfile\fR"
Redirect the output indicated by the file descriptor
.I n
into the output to
.IR file .
If
.I n
is omitted,
it is regarded as the standard output is specified.
If
.I file
doesn't exist it is created,
otherwise it is truncated to 0 length before output.
.IP "\fIn\fR\fB>\|>\fP\fIfile\fR"
Redirect the output indicated by the file descriptor
.I n
into the output to
.IR file .
If
.I n
is omitted,
it is regarded as the standard output is specified.
If
.I file
doesn't exist it is created,
otherwise output is appended to it.
.IP "\fIn1\fR\fB<\|&\fP\fIn2\fR"
Redirect the input indicated by the file descriptor
.I n1
into the input indicated by the file descriptor
.IR n2 .
If
.I n1
is omitted,
it is regarded as the standard input is specified.
.IP "\fIn1\fR\fB>\|&\fP\fIn2\fR"
Redirect the output indicated by the file descriptor
.I n1
into the output indicated by the file descriptor
.IR n2 .
If
.I n1
is omitted,
it is regarded as the standard output is specified.
.IP "\fB&\|>\fP\fIfile\fR"
Redirect both the standard output and the standard error output
into the output to
.IR file .
.IP "\fIn\fR\fB<\|>\fP\fIfile\fR"
.IP "\fIn\fR\fB>\|<\fP\fIfile\fR"
Redirect both the input/output indicated by the file descriptor
.I n
into the input/output from/to
.IR file .
If
.I n
is omitted,
it is regarded as the standard input is specified.
.IP "\fIn\fR\fB<\|-\fP"
.IP "\fIn\fR\fB<\|&\|-\fP"
Close the input indicated by the file descriptor
.IR n .
If
.I n
is omitted,
it is regarded as the standard input is specified.
.IP "\fIn\fR\fB>\|-\fP"
.IP "\fIn\fR\fB>\|&\|-\fP"
Close the output indicated by the file descriptor
.IR n .
If
.I n
is omitted,
it is regarded as the standard output is specified.
.IP "\fIn\fR\fB<\|<\fP[\fB\-\fP]\fIword\fR"
Redirect the input indicated by the file descriptor
.I n
into the input which is read up to a input line as same as
.IR word ,
or to an end of file.
If any part of
.I word
is quoted,
no input line is evaluated.
Otherwise,
each input line is evaluated to expand variables or replace strings.
When you specify
.BR \- ,
all tabs on the beginning of input lines is stripped to be send to a command.
If
.I n
is omitted,
it is regarded as the standard input is specified.
.PD
.RE
On each command line,
the string from
.RB ' # '
to the end of line and a null line are ignored.
When the line ends with
.RB ' \e ',
it is referred as continuing into the next line,
so that you can split a long line with this.
.SS Builtin Commands
.B fd
has the following builtin commands.
These builtin commands can be used in
.B EXECUTE_SH
and the initial configuration file.
.IP "\fBif\fP \fIlist\fR \fBthen\fP [\fBelif\fP \fIlist\fR \fBthen\fP \fIlist\fR] .\|.\|. [\fBelse\fP \fIlist\fR] \fBfi\fP" 14
The
.I list
of
.B if
clause and
.B elif
clauses are executed in order,
and if each exit status is a 0,
then the
.I list
of
.B then
clause associated with it is executed and the
.B elif
clauses after it are ignored.
If no
.I list
of
.B if
clause nor
.B elif
clauses return a 0, the
.I list
of
.B else
clause is executed.
If no
.I list
of
.B then
clauses nor
.B else
clause is executed,
then
.B if
returns a 0 exit status.
.IP "\fBwhile\fP \fIlist\fR \fBdo\fP \fIlist\fR \fBdone\fP"
The
.I list
of
.B while
clause is executed repeatedly,
and while its exit status is 0, the
.I list
of
.B do
clause is executed repeatedly.
If the
.I list
of
.B do
clause is never executed,
then
.B while
returns a 0 exit status.
.IP "\fBuntil\fP \fIlist\fR \fBdo\fP \fIlist\fR \fBdone\fP"
The
.I list
of
.B until
clause is executed repeatedly,
and while its exit status is NOT 0, the
.I list
of
.B do
clause is executed repeatedly.
If the
.I list
of
.B do
clause is never executed,
then
.B until
returns a 0 exit status.
.IP "\fBfor\fP \fINAME\fR [\fBin\fP \fIvalue\fR .\|.\|.] \fBdo\fP \fIlist\fR \fBdone\fP"
The internal variable
.I NAME
is substituted for values of
.I value
one by one, and
.I list
is executed according to the each value.
If
.B in
.I value
is omitted,
then each positional parameter is substituted one by one.
.IP "\fBcase\fP \fIword\fR \fBin\fP [\fIpattern\fR [\fB\(bv\fP \fIpattern\fR] .\|.\|. \fB)\fP \fIlist\fR \fB;\|;\fP] .\|.\|. \fBesac\fP"
The string
.I word
is compared with the each
.IR pattern ,
.I list
associated with the
.I pattern
which first matches it is executed.
.IP "\fB(\fP\fIlist\fR\fB)\fP"
Execute
.I list
in a sub shell.
.IP "\fB{\fP \fIlist\fR\fB;\fP \fB}\fP"
Execute
.I list
in the current shell.
.IP "\fINAME\fR\fB=\fP[\fIvalue\fR] [\fIcom\fR .\|.\|.]"
Define a internal variable which is available only in
.BR fd .
It substitutes the value (string)
.I value
for the internal variable
.IR NAME .
When you describe the command
.I com
after the definition of a variable,
.I com
is executed on the state
where this variable is regarded as the environment variable.
In this case,
the definition of
.I NAME
is not remain as the environment variable nor the internal variable.
If
.I value
is omitted,
the value of the internal variable
.I NAME
is defined as a null.
If you want to delete the definition of a internal variable, use
.BR unset .
.IP "\fIname\fR\fB()\fP \fB{\fP \fIlist\fR; \fB}\fP"
Define a function whose body is
.IR list ,
as the name of
.IR name .
The defined function can be used in the command line of
.B EXECUTE_SH
and each command macro described below.
You can use the positional parameter
.BI $ n
in each description of
.IR list ,
which indicates the argument when the function is invoked.
.B $0
is
.I name
itself, and
.BR $1 \- $9
indicates each argument.
Although you cannot omit
.B { }
and
.IR list ,
you can omit
.B { }
before/after
.I list
which consists of a single command.
If you want to delete the definition of a function, use
.BR unset .
.IP "\fB!\fP\fInum\fR"
Execute the command
which has the history number specified with the numeric value
.IR num .
When
.I num
is negative value,
it executes the command
which has the history number as the current history number minus
.IR num .
.IP "\fB!!\fP"
Execute the previous command.
This is synonym for
.BR !\-1 .
.IP "\fB!\fP\fIstr\fR"
Execute the command history
which starts with the string
.IR str .
.IP "\fB:\fP [\fIarg\fR .\|.\|.]"
No effect.
But it evaluates
.I arg
and performs redirection.
.IP "\fB.\fP \fIfile\fR"
.PD 0
.IP "\fBsource\fP \fIfile\fR"
.PD
Read and evaluate commands from
.IR file .
.I file
must exists on the directory which
.B PATH
includes,
or be described with pathname.
The each line format is based on the format of
.BR EXECUTE_SH .
You can describe this in the file as nesting.
.IP "\fBalias\fP [\fIname\fR[\fB=\fP\fIcom\fR]]"
Define a alias whose body is
.IR com ,
as the name of
.IR name .
The defined alias can be used in the command line of
.B EXECUTE_SH
and each command macro described below.
The alias substitution is performed recursively.
If
.I com
is omitted,
the alias of
.I name
is displayed.
If both
.I com
and
.I name
are omitted,
all the current alias definition list is displayed.
.IP "\fBarch\fP \fIext\fR [\fIpack unpack\fR]"
Register the archiver command associated with the archive file
which has extension
.IR ext .
The pack command is specified as
.IR pack ,
and the unpack command is specified as
.IR unpack ,
using the macro representation quoted with \fB"\fP.
When
.I ext
starts with
.BR / ,
uppercase/lowercase is ignored in the comparison of any extension.
If both
.I pack
and
.I unpack
are omitted,
the archiver command registration for the extension
.I ext
is deleted.
.IP "\fBbg\fP [\fIjob\fR]"
Continue the execution of the job specified with
.I job
in the background.
The following format is available to specify a job.
.B (U)
.RS 20
.ta 0.5i
.nf
\fB%\fP
\fB%+\fP the current job
\fB%-\fP the previous job
\fB%\fP\fIn\fR the job with job number \fIn\fR
\fB%\fP\fIstr\fR the job whose command line starts with \fIstr\fR
.fi
.RE
.RS
But, you must describe these
.B %
in the command line of
.B EXECUTE_SH
as the duplicated expression, such as
.BR %% ,
for the reason of the parameter macro function described below.
If
.I job
is omitted,
the current job is continued in the background.
.RE
.IP "\fBbind\fP \fIc\fR [\fIcom1\fR [\fIcom2\fR] [\fB:\fP\fIcomment\fR]]"
Bind the command
.I com1
to the key
.IR c .
When you want to specify a control character for
.IR c ,
you can prefix
.B ^
into 2 characters,
such as ^A.
When you want to specify a character with the META key
(or the ALT key on MS-DOS version),
you can prefix
.B @
into 2 characters,
such as @a.
When you want to specify a function key and a special key,
you can use each identifier described in
.B keymap
command after,
such as F10.
Or you can describe the escape sequence,
such as
.B \en
and
.BR \ee ,
and the octal expression,
such as
.BR \eooo .
In case of binding the internal command of
.BR fd ,
you can the command identifier as it is.
When you want to define the internal command with some arguments
or define the command in the macro representation,
you should describe the string quoted with \fB"\fP.
If
.I com2
is not omitted,
.I com2
is executed when the cursor position indicates a directory.
When the key
.I c
is the function key of F1-F10,
if you describe
.I comment
prefixed with
.B :
trailing the command description,
you can change the display of associated part in the function line into
.IR comment .
However, note that,
with the key binding for the control key,
the configuration in the edit mode described below is prior to the key binding.
If both
.I com1
and
.I com2
are omitted,
the registration of key binding for the key
.I c
is deleted.
.IP "\fBbreak\fP [\fIn\fR]"
Exit from the loop,
it is used in the
.B for
statement and so on.
If
.I n
is specified,
it breaks
.I n
levels from the loop.
.IP "\fBcd\fP [\fIdir\fR]"
Change the current directory in
.B fd
to
.IR dir .
If
.I dir
is omitted,
it moves to the directory indicated by the internal variable
.BR HOME .
It is useful to define the key macro as "cd $HOME".
If you specify the pathname as "\fB.\fP", "\fB?\fP", "\fB-\fP", "\fB@\fP",
it behaves like as
.BR LOG_DIR .
.IP "\fBchdir\fP [\fIdir\fR]"
Same as
.BR cd .
.B (D)
.IP "\fBcheckid\fP [\fIfile\fR .\|.\|.]"
Calculate the unique ID of the specified file and display it,
according to the MD5 algorithm in RFC1321.
When you specify multiple
.IR file s,
the IDs of all specified files are calculated and displayed.
When you specify nothing,
the ID of running
.B fd
itself is displayed.
Since this algorithm is guaranteed to be secure,
it is available to confirm the identity of files.
.IP "\fBcls\fP"
Clear the screen.
.B (D)
.IP "\fBcontinue\fP \fIn\fR"
Resume the next iteration in the loop,
it is used in the
.B for
statement and so on.
If
.I n
is specified,
it resumes the next iteration in the loop
.I n
- 1 levels
out of the loop.
.IP "\fBcopy\fP [\fB/ABVY\-Y\fP] \fIsrc\fR [\fB/AB\fP] [\fB\+\fP \fIsrc2\fR [\fB/AB\fP] [\fB\+\fP .\|.\|.]] [\fIdest\fR [\fB/AB\fP]]"
Copy the file indicated by
.I src
into the file or the directory indicated by
.IR dest .
When
.I dest
indicates a directory,
the filename in the destination is
.IR src .
If
.I dest
is omitted,
it is copied into the current directory.
You can specify multiple source files by describing to separate them with
.BR \+ ,
or by using the wildcard.
When you separate them with
.BR \+ ,
those files are concatenated and copied.
When you use the wildcard,
they are copied one by one in case that the destination is a directory,
and they are concatenated in case that the destination is a file.
.B (D)
When you specify
.BR /A ,
it is treated as the ASCII text file.
When you specify
.BR /B ,
it is treated as the binary file.
When you specify
.BR /V ,
it is verified to copy.
When you specify
.BR /Y ,
it doesn't prompts for confirming to overwrite into the destination.
When you specify
.BR /\-Y,
it prompts for confirmation before overwriting into the destination.
.IP "\fBdel\fP [\fB/P\fP] \fIfile\fR"
.PD 0
.IP "\fBerase\fP [\fB/P\fP] \fIfile\fR"
.PD
Delete the files indicated by
.IR file .
You can specify multiple files by using wildcard.
.B (D)
When you specify
.BR /P ,
it prompts for confirmation before deleting files.
.IP "\fBdir\fP [\fB/PWSBLV\fP] [\fB/A\fP[\fBDRHSA\-\fP]] [\fB/O\fP[\fBNSEDGA\-\fP]] [\fIdir\fR]"
List files and sub directories in the directory indicated by
.IR dir .
If
.I dir
is omitted,
the information in the the current directory is listed.
.B (D)
When you specify
.BR /P ,
it prompts for every screen.
When you specify
.BR /W ,
it is listed in the wide view.
When you specify
.BR /A ,
it lists only the files
which have the attribute indicated by the trailing character.
.RS 20
.ta 0.3i 2i 2.3i
.nf
\fBD\fP directory \fBR\fP read only file
\fBH\fP hidden file \fBS\fP system file
\fBA\fP ready to archive \fB-\fP except it
.fi
.RE
.RS
When you specify
.BR /O ,
it sorts with the sorted type indicated by the trailing character.
.RE
.RS 20
.ta 0.3i 2i 2.3i
.nf
\fBN\fP by name \fBS\fP by size
\fBE\fP by extension \fBD\fP by date & time
\fBG\fP directory first \fBA\fP by last access time
\fB-\fP reverse order
.fi
.RE
.RS
When you specify
.BR /L ,
it uses lowercase.
When you specify
.BR /V ,
it lists the verbose information.
.RE
.IP "\fBecho\fP [\fB\-n\fP] [\fIarg\fR .\|.\|.]"
Echo
.I arg
to the standard output.
When you don't specify
.BR \-n ,
newline is added to output trailing after
.IR arg .
See
.BR echo (1)
for details.
.IP "\fBeval\fP [\fIarg\fR .\|.\|.]"
Evaluate
.I arg
and execute the results.
.IP "\fBevalmacro\fP [\fIarg\fR .\|.\|.]"
Evaluate parameter macros included in
.I arg
and execute the results.
Since
.B eval
doesn't evaluate any parameter macro,
you should choose them according to uses.
When in the function,
you cannot use any parameter macro,
then you need this command to extract parameter macros.
.IP "\fBexec\fP [\fIcom\fR [\fIarg .\|.\|.\fR]]"
Execute
.I com
in place of the execution of
.BR fd .
You can specify
.I arg
as arguments of
.IR com .
.IP "\fBexit\fP [\fIn\fR]"
Exit from
.BR fd .
When you specify
.IR n ,
it exits with the exit status
.IR n .
.IP "\fBexport\fP [\fINAME\fR[\fB=\fP[\fIvalue\fR]] .\|.\|.]"
Mark the internal variable
.I NAME
to be inherited to child processes as the environment variable.
Since then,
the definition of
.I NAME
can be referred in any child process.
When you
.B export
the undefined internal variable,
it doesn't become the environment variable
until the internal variable is defined.
When you want to define the value at the same time,
you should specify
.IR value .
If only
.B =
is specified and
.I value
is omitted,
the value of the environment variable
.I NAME
is defined as a null.
If no argument is specified,
all of the
.BR export ed
environment variables are listed.
When you want to delete the definition of the environment variable,
you can use
.BR unset .
.IP "\fBfd\fP [\fIdirectory\fR]"
Invoke
.B fd
from the internal shell.
If you specify
.IR directory ,
the current directory is moved to the directory initially.
You can return to the internal shell by
.BR QUIT_SYSTEM .
It is effective only when it is invoked as
.BR fdsh .
.IP "\fBfg\fP [\fIjob\fR]"
Continue the execution of the job specified with
.I job
in the foreground.
The following format is available to specify a job.
.B (U)
.RS 20
.ta 0.5i
.nf
\fB%\fP
\fB%+\fP the current job
\fB%-\fP the previous job
\fB%\fP\fIn\fR the job with job number \fIn\fR
\fB%\fP\fIstr\fR the job whose command line starts with \fIstr\fR
.fi
.RE
.RS
But, you must describe these
.B %
in the command line of
.B EXECUTE_SH
as the duplicated expression, such as
.BR %% ,
for the reason of the parameter macro function described below.
If
.I job
is omitted,
the current job is continued in the foreground.
.RE
.IP "\fBgetkey\fP [\fInum\fR]"
Get the key code sequence for the pushed key.
It prompts after executed,
and displays the key code sequence for the key which you push to specify.
It continues until you push any key
.I num
times.
When
.I num
is more than
.B 1
time,
you can stop it with pushing
.RB [ Space ].
When
.I num
is
.B 0
time,
it continues forever until
.RB [ Space ]
is pushed.
The displayed sequence can be used as the key code sequence for
.B keymap
command.
.B (U)
If
.I num
is omitted,
it is regarded as
.B 1
time is specified.
.IP "\fBhash\fP [\fB\-r\fP \(bv \fIcom\fR .\|.\|.]"
Search the absolute path for
.I com
referring to
.BR PATH ,
which indicates the search path when the external command is executed,
and register the result in the hash table.
When you specify
.B \-r
instead of
.IR com ,
all the memorized hash table are discarded.
If
.I com
is omitted,
the hash table information is listed.
.BR hits ,
.BR cost ,
.B command
indicate the number of times the command has been executed,
the measure of the work required to search it in the search path,
and the absolute path for the command,
respectively.
When the command is searched in a relative directory,
it is necessary to re-search whenever the current directory is moved,
because it is not registered as the absolute path.
In such command,
.B \(**
trailing
.B hits
is displayed.
.IP "\fBhistory\fP [\fIn\fR]"
List the last
.I n
command histories with the history number.
If
.I n
is omitted,
all of the memorized command histories are listed.
.IP "\fBjobs\fP"
List the running jobs.
.B (U)
.IP "\fBkconv\fP [\fB\-i\fP \fIin\fR] [\fB\-o\fP \fIout\fR] [\fIinfile\fR [\fIoutfile\fR]]"
Read from
.I infile
and convert its Kanji code from
.I in
to
.IR out ,
and output to
.IR outfile .
In
.I in
and
.IR out ,
you can specify the string which used in the environment variable
.B FNAMEKCODE
described below.
If each of them is omitted,
it is regarded as that the Kanji code specified in compile is specified.
If
.I outfile
is omitted,
it outputs to the standard output.
If also
.I infile
is omitted,
it reads from the standard input.
.B (U)
.IP "\fBkeymap\fP [\fIc\fR [\fIstr\fR]]"
Map the sequence
.I str
as key code of the special key
.IR c .
You can use only the following identifiers as
.IR c .
.B (U)
.RS 20
.ta 0.9i 2i 2.9i
.nf
\fBUP\fP Up \fBDOWN\fP Down
\fBRIGHT\fP Right \fBLEFT\fP Left
\fBBEG\fP Begin \fBEOL\fP Eol
\fBHOME\fP Home \fBEND\fP End
\fBINS\fP Insert \fBDEL\fP Delete
\fBINSLIN\fP InsLine \fBDELLIN\fP DelLine
\fBPPAGE\fP PageUp \fBNPAGE\fP PageDown
\fBENTER\fP Enter \fBBS\fP Bs
\fBCLR\fP Clear \fBHELP\fP Help
\fBPLUS\fP + (tenkey) \fBMINUS\fP - (tenkey)
\fBASTER\fP \(** (tenkey) \fBSLASH\fP / (tenkey)
\fBCOMMA\fP , (tenkey) \fBDOT\fP . (tenkey)
\fBEQUAL\fP = (tenkey) \fBRET\fP Return (tenkey)
\fBTK0\fP.\|.\fBTK9\fP 0-9 (tenkey)
\fBF1\fP.\|.\|.\fBF20\fP function key
.fi
.RE
.RS
You can use the escape sequence in the key code sequence,
such as
.B \en
=0x0a and
.B \ee
=0x1b.
You can also use the octal expression,
such as
.BR \eooo .
You can describe the control character prefixing
.BR ^ ,
such as ^A.
.B ^
itself can be described as
.BR \e^ .
If
.I str
is omitted,
the key code sequence for
.I c
is displayed.
If both
.I str
and
.I c
are omitted,
all of the mappings for special keys are listed.
When you specify
.I str
as \fB"\|"\fP,
the key code mapping for
.I c
is canceled.
.RE
.IP "\fBkill\fP [\fB\-l\fP \(bv \fB\-\fP\fIsignal\fR] [\fIpid\fR \(bv \fIjob\fR .\|.\|.]"
Send the signal indicated by
.I signal
to the process indicated by the process number
.I pid
or
to the job indicated by
.IR job .
.I signal
is described as a numeric value or a signal name.
If
.I signal
is omitted,
.B SIGTERM
is send.
When you specify
.BR \-l ,
it lists the signal names which can be used as
.I signal
instead of sending a signal.
.IP "\fBlaunch\fP \fIext\fR [\fIcom\fR [\fIformat\fR [\fItop\fR \fIbottom\fR]]]"
Register the behavior for the extension
.I ext
as the launcher.
You should the macro representation quoted with \fB"\fP as
.IR com .
When you register the archive browser,
you should describe the command to list the archived files as
.IR com ,
and describe the format of the list as
.IR format .
When you describe
.I top
and
.IR bottom ,
you can specify unnecessary lines in the list as the number of lines
from the top/bottom line.
When
.I ext
starts with
.BR / ,
uppercase/lowercase is ignored in the comparison of any extension.
If
.I com
is omitted,
the launcher registration for
.I ext
is canceled.
.IP "\fBmd\fP \fIdir\fR"
.PD 0
.IP "\fBmkdir\fP \fIdir\fR"
.PD
Create the directory
.IR dir .
.B (D)
.IP "\fBprintarch\fP [\fIext\fR]"
Print the archiver commands registered for the archive file
which has the extension
.IR ext .
If
.I ext
is omitted,
all of the registered archiver commands are listed.
.IP "\fBprintbind\fP [\fIc\fR]"
Print the command binded to the key
.IR c .
You can specify the key as well as
.BR bind .
If
.I c
is omitted,
all of the registered key bindings are listed,
which is defined not as the internal command but as the command macro.
The key bindings of internal commands can be referred in
.BR HELP_MESSAGE .
.IP "\fBprintdrv\fP [\fIc\fR]"
Print the device file and the number of heads/sectors/cylinders
of the floppy drive registered for the drive name
.IR c .
.B (U)
If
.I c
is omitted,
all of the registered floppy drives are listed.
.IP "\fBprintlaunch\fP [\fIext\fR]"
Print the command macro registered as the launcher for the extension
.IR ext .
When it is registered as the archive browser,
the format for listing is also printed.
If
.I ext
is omitted,
all of the registered launchers are listed.
.IP "\fBpwd\fP"
Display the current directory with the absolute representation.
.IP "\fBread\fP [\fINAME .\|.\|.\fR]"
Read one line from the standard input
and substitute that string for the internal variable
.IR NAME .
The inputted string is separated with
.B IFS
into some words.
When multiple
.IR NAME s
are specified,
words are substituted one by one from the first of line,
and all the rest are substituted for the last
.IR NAME .
When the number of words in inputted string is less than the number of
.IR NAME ,
a null is substituted for the rest of
.IR NAME .
.IP "\fBreadonly\fP [\fINAME\fR[\fB=\fP[\fIvalue\fR]] .\|.\|.]"
Mark the internal variable
.I NAME
to be readonly.
Since then,
you cannot change the value of
.IR NAME .
When you want to define the value at the same time,
you should specify
.IR value .
If only
.B =
is specified and
.I value
is omitted,
the value of the internal variable
.I NAME
is defined as a null.
If no argument is specified,
all of the readonly internal variables are listed.
.IP "\fBrd\fP \fIdir\fR"
.PD 0
.IP "\fBrmdir\fP \fIdir\fR"
.PD
Delete the directory
.IR dir .
You cannot delete the non-empty directory.
.B (D)
.IP "\fBren\fP \fIold\fR \fInew\fR"
.PD 0
.IP "\fBrename\fP \fIold\fR \fInew\fR"
.PD
Rename the filename or the directory name
.I old
into
.IR new .
You can specify the wildcard in
.I old
and
.I new
to rename the multiple filenames all together.
.B (D)
.IP "\fBrem\fP [\fIarg\fR .\|.\|.]"
No effect,
same as
.BR : .
.B (D)
.IP "\fBreturn\fP [\fIn\fR]"
Return from a function with the return value specified by
.IR n .
If
.I n
is omitted,
the return value is the exit status of the last executed command.
It cannot be used out of a function.
.IP "\fBset\fP [\fB\-\-aefhkmntuvx\fP] [\fIarg\fR .\|.\|.]"
List internal variables and functions, without any argument.
When you specify
.IR arg ,
.I arg
is substituted for the positional parameter
.BR $1 ,
.BR $2 ,
\&.\|.\|.,
.BI $ n
in order.
When you specify any option,
each option means the following.
When you use
.B \+
instead of
.BR \- ,
the option parameter turns off each option.
.RS
.PD 0
.IP "\fB\-a\fP" 5
.B Export
any internal variable automatically when it is defined.
.IP "\fB\-e\fP"
Exit immediately when any command returns the exit status except
.BR 0 .
.IP "\fB\-f\fP"
Disable the wildcard expansion.
.IP "\fB\-h\fP"
Register any command to the hash table just before it is executed.
The commands used in a function are read when it is defined,
and are registered to the hash table.
The command hash itself is always valid,
if
.B -h
option is set or not.
.IP "\fB\-k\fP"
Treat all
.IR NAME\fB=\fP [ value ]
formed arguments as the variable definition,
while they are not placed on the beginning of command line string.
.IP "\fB\-m\fP"
Enable the job control.
This option is valid by default.
.B (U)
.IP "\fB\-n\fP"
Read command inputs but don't execute them.
.IP "\fB\-t\fP"
Exit immediately after executing the current command input.
.IP "\fB\-u\fP"
Treat the reference of undefined variables as an error.
.IP "\fB\-v\fP"
Display the command inputs whenever they are read.
.IP "\fB\-x\fP"
Display the command strings whenever they are executed.
.IP "\fB\-\-\fP"
Indicate the end of options.
No flag is changed.
.PD
.RE
.IP "\fBsetdrv\fP \fIc\fR \fIdevice\fR \fIhd\fR \fIsc\fR \fIcl\fR"
Specify the device file indicated by
.I device
for the MS-DOS floppy drive named as
.IR c .
At the same time,
.IR hd ,
.IR sc ,
.I cl
are specified as the number of heads(sides)/sectors/cylinders(tracks)
in the format which is treated in the driver of
.IR device .
In special case,
when you want to treat the 640KB2DD(hd=2/sc=8/cl=80) floppy disk
with the driver which can treat only the 820KB2DD(hd=2/sc=9/cl=80) floppy disk,
you should specify the value adding
.B 100
(108) as the value of
.IR sc .
.B (U)
On the PC-UNIX environment which is worked on PC,
specifying the string
.B HDD
or
.B HDD98
instead of
.IR hd ,
.IR sc ,
.IR cl ,
can register the MS-DOS partition on the hard disk
for the PC/AT compatible machine or PC-9800 series.
In this case,
You should describe the device file
as the device name prepared per the physical drive unit
rather than the device name prepared per the partition (slice).
The MS-DOS partitions included in the drive unit
are automatically expanded to the drive name after the drive name
.IR c .
When no MS-DOS partition is included in the specified drive unit,
this command is ignored.
You can confirm what drive name is valid by
.B printdrv
command.
But any hard disk is registered as readonly, for security.
.IP "\fBshift\fP [\fIn\fR]"
Rename the positional parameters from
.BI $ n\+1
into ones from
.B $1
in order.
The original positional parameters from
.B $1
to
.BI $ n
are discarded.
If
.I n
is omitted,
it is regard as
.B 1
is specified.
.IP "\fBtest\fP [\fIexpr\fR]"
.PD 0
.IP "\fB[\fP \fIexpr\fR \fB]\fP"
.PD
Evaluate the conditional expression
.IR expr .
See
.BR test (1)
for details.
.IP "\fBtimes\fP"
Display the accumulated user and system time for the processes
which has so far been executed.
.IP "\fBtrap\fP [\fIcom\fR] [\fIn\fR .\|.\|.]"
Read and execute the command
.I com
when
.B fd
receives the signal
.IR n .
If
.I com
is omitted,
the trap for the signal is reset.
When you specify
.I com
as a null,
the signal ignored.
When you specify
.I n
as
.BR 0 ,
the command
.I com
is executed on exit.
If both
.I com
and
.I n
are omitted,
all of the registered traps are listed.
.IP "\fBtype\fP [\fIcom\fR .\|.\|.]"
Display how each
.I com
would be treated when it is used as a command name.
.IP "\fBulimit\fP [\fB\-SH\fP] [\fB\-a\fP \(bv \fB\-cdflmnstv\fP] \fIn\fR"
Set the resource limits for
.B fd
and its child processes to the value indicated by
.IR n .
You can use the string
.B unlimited
or the numeric value in
.IR n ,
.B unlimited
means the maximum specifiable value.
.B (U)
When you specify
.BR \-H ,
a hard limit is set.
When you specify
.BR \-S ,
a soft limit is set.
When you don't specify neither of them,
both limits are set.
If
.I n
is omitted,
the current limit is displayed.
When you specify
.BR \-a ,
all of the resource limits are displayed.
When you specify the following options,
the each resource limit is individually set or displayed.
If no option is specified,
it is regarded as
.B \-f
is specified.
.RS
.PD 0
.IP "\fB\-c\fP" 5
maximum core file size (in blocks)
.IP "\fB\-d\fP"
maximum size of data segment (in KB)
.IP "\fB\-f\fP"
maximum file size (in blocks)
.IP "\fB\-l\fP"
maximum size of locked in memory (in KB)
.IP "\fB\-m\fP"
maximum size of resident set (in KB)
.IP "\fB\-n\fP"
maximum number of open file files
.IP "\fB\-s\fP"
maximum size of stack segment (in KB)
.IP "\fB\-t\fP"
maximum CPU time (in seconds)
.IP "\fB\-v\fP"
maximum size of virtual memory (in KB)
.PD
.RE
.IP "\fBumask\fP [\fInnn\fR]"
Set the file creation mask to
.IR nnn .
If
.I nnn
is omitted,
the current value of the file creation mask is displayed.
See
.BR umask (2)
for details.
.IP "\fBunalias\fP \fIname\fR"
Cancel the definition of the alias
.IR name .
You can use the wildcard in
.IR name ,
in this case,
all of the matched alias definitions are canceled.
When you specify "\(**",
all of the alias definitions are invalid.
.IP "\fBunset\fP [\fINAME\fR .\|.\|.]"
Delete the defined internal variable or function for each
.IR NAME .
But the following variable definition cannot be deleted.
.RS 20
.ta 1i 2i 3i
.nf
.ft B
PATH PS1 PS2 IFS
.ft R
.fi
.RE
.IP "\fBunsetdrv\fP \fIc\fR \fIdevice\fR \fIhd\fR \fIsc\fR \fIcl\fR"
Delete the registered floppy drive.
Only the registration with which
all of
.IR device ,
.IR hd ,
.IR sc ,
.I cl
are corresponded is deleted,
then you should confirm to delete very well.
.B (U)
When it is registered as
.B HDD
or
.B HDD98
in
.BR setdrv ,
you should describe
.B HDD
or
.B HDD98
instead of
.IR hd ,
.IR sc ,
.IR cl .
.IP "\fBwait\fP [\fIpid\fR \(bv \fIjob\fR]"
Wait for the process indicated by
.I pid
or for the job indicated by
.IR job ,
and return its exit status.
If both
.I pid
and
.I job
are omitted,
the current job is waited.
.B (U)
.IP "\fICOMMAND\fR [\fIarg\fR]"
Execute the internal command
.I COMMAND
of
.BR fd .
You can describe each command identifier in
.IR COMMAND .
Some internal commands can take a parameter argument
.I arg
as the number of times or the destination directory.
.PP
.B ~
and
.B $
in the previous registration string are expanded.
But these expansions are restrained in the string quoted with
.B '
instead of \fB"\fP.
.SS Tree Screen
Since representing the whole file system in tree structure takes too many time,
only the directories which are direct ancestors
and the direct sub directories are displayed,
first in the tree screen.
In the directories which are direct ancestors,
the other sub directories (if exists)
are grouped as "\fB.\|.\|.\fP".
These grouped sub directories will be expanded automatically
when a cursor is placed on its position.
The sub directories which are not expanded yet are represented with
.RB ' > '
trailing the filename,
which shows as they are.
Such directory is never expanded until it is required to expand explicitly,
then you should expand it by the following key inputs
before moving to any hidden sub directory.
In the tree screen,
the following key inputs are available.
.PD 0
.RS
.IP "\fBUp\fP, \fBDown\fP" 10
Move a cursor.
.IP "\fBRight\fP"
Expand the sub directory on the cursor position.
.IP "\fBTab\fP"
Expand the sub directory on the cursor position recursively.
.IP "\fBPageUp\fP, \fBPageDown\fP"
Move a cursor by half screen.
.IP "\fBHome\fP(<), \fBEnd\fP(>)"
Move a cursor to the top/bottom of tree.
.IP "\fB?\fP"
Move a cursor to the current directory.
.IP "\fBBs\fP"
Move a cursor to the parent directory.
.IP "\fBLeft\fP"
Group sub directories of the directory on the cursor position,
or move a cursor to the parent directory.
.IP "\fB(\fP, \fB)\fP"
Move a cursor to the previous/next directory
among the same level sub directories.
.IP "\fBA\fP \- \fBZ\fP"
Move a cursor to the directory
whose name starts with the character or its lowercase.
.IP "\fBl\fP"
Change the directory tree into the specified directory.
Moving to the floppy drive is also available.
.IP "\fB^L\fP"
Redraw the tree structure.
.IP "\fBReturn\fP"
Select the directory.
.IP "\fBEsc\fP"
Cancel.
.RE
.PD
.PP
When directories are recursively expanded,
the machine operation is so late that it maybe seems to freeze.
In this case,
you can input any key while operating.
If key input is recognized while expanding directories,
expanding has been stopped at that moment in spite of not finishing.
Even if key repeat keeps effective,
any operation will be delayed for this function.
.SS Archive Browser
When the launcher is invoked on the position of the file
whose extension is registered to associate with an archive browser,
the archive browser screen has come.
In this screen,
you can browse files in the archive file as well as in the normal directory.
But you cannot use the following internal commands in this screen.
.PD 0
.PP
.RS
.ta 1.5i 3i 4.5i
.nf
.ft B
LOG_TOP LOG_DIR ATTR_FILE COPY_FILE
MOVE_FILE DELETE_FILE DELETE_DIR RENAME_FILE
MAKE_DIR WRITE_DIR TREE_DIR EDIT_FILE
LOG_TREE COPY_TREE MOVE_TREE FIND_DIR
SYMLINK_MODE DOTFILE_MODE FILEFLG_MODE SPLIT_WINDOW
.ft R
.fi
.RE
.PD
When you want to register a new archive browser,
you must describe the format listed by the archiver
as the following representation.
One format string represents the format for 1 file in the list.
.PD 0
.PP
.RS
.ta 1i
.nf
\fB%a\fP Field which indicates a file mode
\fB%u\fP Field which indicates UID of a file
\fB%g\fP Field which indicates GID of a file
\fB%s\fP Field which indicates a file size
\fB%y\fP Field which indicates a file creation year
\fB%m\fP Field which indicates a file creation month
(No concerning if numeric or alphabetical)
\fB%d\fP Field which indicates a file creation day
\fB%t\fP Field which indicates a file creation time
("HH:MM:SS" form, MM and SS can be lacking)
\fB%f\fP Field which indicates a filename
\fB%x\fP Field which is needless (ignored)
\fB%%\fP % itself
\fB\en\fP Newline
\fBSpace Tab\fP 0 or more characters of spaces or tabs
.fi
.RE
.PD
.PP
In this description,
the field means the area separated by spaces, tabs or newlines.
When the string which indicates each information
is separated by these characters,
you can simply describe the above string which indicates that field.
When the string is separated by another character,
you should describe the above string with that separator.
You can describe to indicate the field length as numeric, such as
.IR %10a .
This example means that
the field which indicates a file mode consists of 10 characters.
When a field may have the different meanings according to situation,
you should describe it quoted with
.BR "{ }" ,
such as
.IR %{yt} .
This example means that
this field indicates a creation year or a creation time.
When the information for 1 file consists of multiple lines,
you should place a
.B \en
on the position of newline in the format string.
For example,
the following are the format strings for the list of some archivers.
While some spaces are used here for easiness to see,
these spaces are not always necessary
because any space between fields is ignored.
.PD 0
.IP "`\fBlha l\fP'" 18
"%9a %u/%g %s %x %m %d %{yt} %f"
.IP "`\fBlha v\fP' (MS\-DOS)"
"%f\en%s %x %x %y-%m-%d %t"
.IP "`\fBtar tvf\fP' (BSD)"
"%9a %u/%g %s %m %d %t %y %f"
.IP "`\fBtar tvf\fP' (SVR4)"
"%a %u/%g %s %m %d %t %y %f"
.PD
.PP
If you register archive browsers with above format,
in the builtin command of
.B EXECUTE_SH
or in the initial configuration file,
you can use the archive browser which is not prepared by default.
But,
if you want to execute or view files in the archive file,
you must register the archiver command for the archive file, too,
don't forget this.
On some OS,
.BR tar (1)
may output the Japanese timestamp when
.I japanese
is substituted for the environment variable
.BR LANG .
Since
.B fd
cannot analyze the representation like this,
you should describe
.I `export LANG=C'
in the initial configuration file,
or specify
.B LANG
in the description of listing command,
such as
.IR "`LANG=C tar tvf'" .
.SS Floppy Drive (U)
You can access the MS-DOS formatted floppy disk,
by representing to prefix "\fIc\fR\fB:\fP" to the directory name.
But,
it is necessary to register the floppy drive
and set the environ variable
.B DOSDRIVE
which makes this function effective, in advance.
Each registered drive is distinguished with the drive name.
You should tag the physically different drive as the different drive name.
When the same physical drive supports multiple formats,
you can register each format with the same drive name,
or the different drive name each other.
If you tag the same drive name,
the justice of the format is tried in registered order,
so that you should register the format which you often use in the first place.
Each drive of the floppy drive has the its own current directory.
The default value of this is a root directory,
and the current directory is moved back to a root directory again
whenever you change a floppy disk.
When you describe the directory name as starting with '/' after
.RB ' : ',
it means the absolute path representation of that drive.
If this '/' is not exist,
it means the relative path representation
from the current directory of that drive,
don't forget this.
Regrettably,
some internal commands like as
.BR WRITE_DIR ,
.B INFO_FILESYS
cannot support the floppy drive.
Some filenames are renamed when they are copied from UNIX
for reason of the filename length limit.
When you use a lowercase letter as the drive name,
you can access it as the floppy drive which can treat the Long File Name (LFN)
for MS-Windows formatted floppy disk.
In this case,
you can copy a file with a long filename on UNIX as it is.
But,
when the UNICODE translation table
.B fd-unicd.tbl
is not exist in the same directory as the invoked
.B fd
exists,
any Kanji filename cannot be treated as LFN representation.
Reversely,
when you use a uppercase letter as the drive name,
LFN is ignored and 8+3 formed filename is treated.
MS-DOS version inherits this specification by the case of a drive name.
.SS String Input
When you input the string, such as the pathname,
the following key inputs are available.
The kind of referred history differs with the input string required.
In the split window mode,
the current directory of another window is always placed
on the top of the pathname history.
.PD 0
.IP "\fBLeft\fP, \fBRight\fP" 10
Move a cursor.
.IP "\fBUp\fP, \fBDown\fP"
Refer the previous histories (only commands and pathnames),
or move a cursor.
.IP "\fBBeg\fP"
Move a cursor to the beginning of string.
.IP "\fBEol\fP"
Move a cursor to the end of string.
.IP "\fBIns\fP"
Switch a input method to the insert/overwrite mode.
(Default value is the insert mode.)
.IP "\fBDel\fP"
Delete a character on the cursor position.
.IP "\fBBs\fP"
Delete a character before the cursor position.
.IP "\fBDelLin\fP"
Delete a string after the cursor position.
.IP "\fBInsLin\fP"
Treat the next input character as it is,
effective to input control characters.
.IP "\fBEnter\fP"
Insert a filename of the file on the cursor position.
.IP "\fBPageUp\fP"
Convert a character on the cursor position to uppercase.
.IP "\fBPageDown\fP"
Convert a character on the cursor position to lowercase.
.IP "\fBTab\fP"
Complete a pathname on the cursor position,
or move to the next choice in the completion choice list.
When there are two or more completion choices,
inputting this some times can display the completion choice list.
.IP "\fB^L\fP"
Redraw the input string.
.IP "\fBReturn\fP"
Decide the input,
or decide the choice in the completion choice list.
.IP "\fBEsc\fP"
Cancel.
.PD
.PP
The inputted string is expanded before evaluation as following.
These expansions are also valid in the string of command macros.
But these expansions are restrained
in the string quoted with the quotation mark
.BR ' .
.IP "\fB~\fP" 8
Indicate your home directory,
when it is the beginning of filename.
.IP "\fB~\fP\fIuser\fR"
Indicate
.IR user 's
home directory,
when it is the beginning of filename.
.B (U)
.IP "\fB~FD\fP"
Indicate the directory where the invoked
.B fd
is exists,
when it is the beginning of filename.
.IP "\fB$\fP\fINAME\fR"
.PD 0
.IP "\fB${\fP\fINAME\fR\fB}\fP"
.PD
Indicate the value of the internal variable or the environment variable
.IR NAME .
When both are defined,
the internal variable is prior.
When both are undefined,
it is replaced a null.
The brace
.B "{ }"
separates
.I NAME
from its trailing characters.
When
.I NAME
is the following character,
it is replaced by the value substituted automatically by the shell.
.RS
.PD 0
.IP "\fB0\fP" 7
The executable filename when invoked.
.IP "[\fB1\fP\-\fB9\fP]"
The positional parameter.
.IP "\fB\(**\fP"
The all positional parameters which starts from
.BR $1 .
\fB"$\(**"\fR is replaced by \fB"$1 $2\fR .\|.\|.\fB"\fR.
.IP "\fB@\fP"
The all positional parameters which starts from
.BR $1 .
\fB"$@"\fR is replaced by \fB"$1" "$2"\fR .\|.\|. .
.IP "\fB#\fP"
The number of positional parameters.
.IP "\fB\-\fP"
The option flags which is set by options when invoked or
.B set
command.
.IP "\fB?\fP"
The exit status of the last executed command.
.IP "\fB$\fP"
The process number of the current shell.
.IP "\fB!\fP"
The process number of the last executed background process.
.PD
.RE
.IP "\fB${\fP\fINAME\fR\fB:\-\fP\fIword\fR\fB}\fP"
If the value except a null is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise it is replaced by
.IR word .
.IP "\fB${\fP\fINAME\fR\fB:=\fP\fIword\fR\fB}\fP"
If the value except a null is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise
.I word
is substituted for the internal variable
.IR NAME ,
and this expression itself is replaced by
.IR word .
But you cannot substitute the value for any positional parameter.
.IP "\fB${\fP\fINAME\fR\fB:?\fP\fIword\fR\fB}\fP"
If the value except a null is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise
display
.I word
and exit from the shell.
If
.I word
is omitted,
the string
.RB `` "parameter null or not set" ''
is displayed in its place.
.IP "\fB${\fP\fINAME\fR\fB:\+\fP\fIword\fR\fB}\fP"
If the value except a null is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by
.IR word ,
otherwise it is replaced by a null.
.IP "\fB${\fP\fINAME\fR\fB\-\fP\fIword\fR\fB}\fP"
If any value is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise it is replaced by
.IR word .
.IP "\fB${\fP\fINAME\fR\fB=\fP\fIword\fR\fB}\fP"
If any value is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise
.I word
is substituted for the internal variable
.IR NAME ,
and this expression itself is replaces by
.IR word .
But you cannot substitute the value for any positional parameter.
.IP "\fB${\fP\fINAME\fR\fB?\fP\fIword\fR\fB}\fP"
If any value is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by the value,
otherwise
display
.I word
and exit from the shell.
If
.I word
is omitted,
the string
.RB `` "parameter null or not set" ''
is displayed in its place.
.IP "\fB${\fP\fINAME\fR\fB\+\fP\fIword\fR\fB}\fP"
If any value is substituted
for the internal variable or the environment variable
.IR NAME ,
it is replaced by
.IR word ,
otherwise it is replaced by a null.
.IP "\fB\e\fP\fIc\fR"
It indicates a character
.I c
itself.
You can use it
when you want to use the preceding meta-character
as a character with no evaluation,
such as
.B ~
or
.BR $ .
You can describe
.B \e
itself as "\fB\e\e\fP".
But,
on MS-DOS version,
because
.B \e
which is used as the pathname delimiter
must be treat as well as the normal character,
.BI % c
is expediently used in place of
.BR \e .
.PP
.PD
The following is replaced only in the shell
which is executed by
.B EXECUTE_SH
and
.BR EXECUTE_FILE .
.IP "\fB`\fP\fIlist\fR\fB`\fP" 8
.I list
is executed
and this string is replaced by its standard output.
.IP "\fB?\fP"
.PD 0
.IP "\fB\(**\fP"
.IP "\fB[\fP"
.IP "\fB]\fP"
.PD
The string including these letters is pattern-matched with existent files.
When it is matched,
it is replaced by all of the matched filenames
which are sorted in alphabetical order.
.RS
.PD 0
.IP "\fB?\fP" 5
Match any single character except
.BR / .
.IP "\fB\(**\fP"
Match any 0 or more length string not including
.BR / .
.IP "\fB\(**\(**\fP"
Match any 0 or more length string including
.BR / .
.IP "\fB[\fP.\|.\|.\fB]\fP"
Match any one of the characters enclosed by
.BR "[ ]" .
When enclosed characters include
.BR \- ,
it matches any character
whose character code is between characters before/after
.BR \- .
.IP "\fB[!\fP.\|.\|.\fB]\fP"
Match any one of the characters not enclosed by
.BR "[ ]" .
.PD
.PP
But,
when the first character of the filename is
.BR . ,
.BR ? ,
.B \(**
and
.B \(**\(**
don't match it.
.RE
.SS Edit Mode
When you want to use some functions bound to special keys,
such as a cursor key or a scroll key,
such a key doesn't exist in some terminals.
In such a case,
substituting the string for the internal variable
.B EDITMODE
can make you use some control keys as alternative to these special keys.
Since this alternative key function is prior to
the key binding by the builtin command,
the key binding is invalid for the control characters
used as the alternative keys.
The prepared edit modes are the following 3 modes.
.IP "\fBemacs\fP" 8
.RS 12
.ta 0.5i 1.5i 2i 3i 3.5i
.nf
\fB^P\fP = \fBUp\fP \fB^A\fP = \fBBeg\fP
\fB^N\fP = \fBDown\fP \fB^E\fP = \fBEol\fP \fB^D\fP = \fBDel\fP
\fB^F\fP = \fBRight\fP \fB^Q\fP = \fBInsLin\fP
\fB^B\fP = \fBLeft\fP \fB^K\fP = \fBDelLin\fP
\fB^V\fP = \fBPageDn\fP \fB^Y\fP = \fBPageUp\fP \fB^O\fP = \fBEnter\fP
\fB^M\fP = \fBReturn\fP \fB^I\fP = \fBTab\fP \fB^H\fP = \fBBs\fP
\fB^[\fP = \fBEsc\fP \fB^G\fP = \fBEsc\fP
.fi
.RE
.IP "\fBwordstar\fP"
.RS 12
.ta 0.5i 1.5i 2i 3i 3.5i
.nf
\fB^E\fP = \fBUp\fP \fB^A\fP = \fBBeg\fP \fB^V\fP = \fBIns\fP
\fB^N\fP = \fBDown\fP \fB^F\fP = \fBEol\fP \fB^G\fP = \fBDel\fP
\fB^F\fP = \fBRight\fP \fB^W\fP = \fBHome\fP \fB^]\fP = \fBInsLin\fP
\fB^S\fP = \fBLeft\fP \fB^Z\fP = \fBEnd\fP \fB^Y\fP = \fBDelLin\fP
\fB^C\fP = \fBPageDn\fP \fB^R\fP = \fBPageUp\fP \fB^N\fP = \fBEnter\fP
\fB^M\fP = \fBReturn\fP \fB^I\fP = \fBTab\fP \fB^H\fP = \fBBs\fP
\fB^[\fP = \fBEsc\fP
.fi
.RE
.IP "\fBvi\fP"
.B vi
mode has the 2 local modes: "insert mode" and "command mode",
and the function of keys are quite different with each mode.
You are in the command mode when you start to input,
then you must input any key among 4 keys which switch to the insert mode,
in order to input normal keys.
.RS 12
.ta 0.5i 1.5i 2i 3i 3.5i
.nf
(command mode)
\fBk\fP = \fBUp\fP \fB0\fP = \fBBeg\fP \fBI\fP = \fBIns\fP
\fBj\fP = \fBDown\fP \fB$\fP = \fBEol\fP \fBx\fP = \fBDel\fP
\fBl\fP = \fBRight\fP \fBg\fP = \fBHome\fP
\fBh\fP = \fBLeft\fP \fBG\fP = \fBEnd\fP \fBD\fP = \fBDelLin\fP
\fB^F\fP = \fBPageDn\fP \fB^B\fP = \fBPageUp\fP \fBo\fP = \fBEnter\fP
\fB^M\fP = \fBReturn\fP \fB^I\fP = \fBTab\fP \fB^H\fP = \fBBs\fP
\fB^[\fP = \fBEsc\fP
(from command mode to insert mode)
\fBi\fP, \fB:\fP = only switch its mode
\fBa\fP = + \fBRight\fP \fBA\fP = + \fBEol\fP
\fBR\fP = overwrite
\fBr\fP = overwrite once
(insert mode)
\fB^V\fP = \fBInsLin\fP \fBEsc\fP = to command mode
.fi
.RE
.RS
This key binding is so particular
that it is not suitable for those who don't use
.B vi
editor everyday.
.RE
.SS Parameter Macros
You can use the following parameter macros in the string
which is used for the registration of command macros and for executing command.
But,
you cannot use them in the functions,
the input file for
.B source
command,
and the initial configuration file,
then you should use
.B evalmacro
command when you want to use any parameter macro in them.
.IP "\fB%C\fP" 8
The filename on the cursor position.
Or, it indicates the archive filename,
in the macro to register the archiver command.
.IP "\fB%X\fP"
The filename except its extension on the cursor position.
Or, it indicates the archive filename except its extension,
in the macro to register the archiver command.
Only the last one extension is removed.
.BR T ,
.BR TA ,
.B M
trailing
.B %X
are replaced by
.BR %T ,
.BR %TA ,
.B %M
except its extension respectively.
On MS-DOS version,
you can describe a trailing
.B S
as well as them.
.IP "\fB%P\fP"
The pathname of the current directory.
.IP "\fB%K\fP"
Prompt and return to
.B fd
after a command is finished.
But,
the meaning of
.B %K
is reverse in
.B EXECUTE_FILE
and
.BR EXECUTE_SH ;
it prompts by default and doesn't prompt if
.B %K
is specified.
You can never specify to prompt
in macros to register the archive browser of the launcher
and macros to register the archiver command.
.IP "\fB%T\fP"
List marked files separated by spaces as possible.
When files are so many that the command line exceeds
.B 1023
characters,
the rest of marked files are ignored.
.IP "\fB%TA\fP"
List marked files as well as
.BR %T ,
and repeat the same command for spilt files to complete all marked files.
.IP "\fB%M\fP"
Execute the same command as many times as marked files,
sending the marked file one by one.
It is useful to mark files by
.B MARK_FIND
and execute "mv %M %XM.bak" by
.BR EXECUTE_SH .
.IP "\fB%N\fP"
Restrain the filename addition even if the parameter is omitted.
.IP "\fB%R\fP"
Make you input the additional parameter in executing a macro,
if the length of command string has enough margin.
The cursor position in input is placed on the position of
.B %R
in a macro.
But,
.B %R
is ignored in macros to register the archive browser of the launcher,
macros to register the archiver command,
and
.BR EXECUTE_FILE ,
.BR EXECUTE_SH .
.IP "\fB%S\fP"
The 8+3 formed filename
with which the LFN formed filename on the cursor position is replaced.
You can use it
when you use external commands which can treat only 8+3 formed arguments.
.BR T ,
.BR TA ,
.B M
trailing
.B %S
can be described as well as
.BR %X .
.B (D)
.IP "\fB%JS\fP"
The Kanji code of the string enclosed by this macro
is converted into Shift JIS.
.B (U)
.IP "\fB%JE\fP"
The Kanji code of the string enclosed by this macro
is converted into EUC-JP.
.B (U)
.IP "\fB%J7\fP"
The Kanji code of the string enclosed by this macro
is converted into 7bit JIS.
.B (U)
.IP "\fB%J8\fP"
The Kanji code of the string enclosed by this macro
is converted into 8bit JIS.
.B (U)
.IP "\fB%JJ\fP"
The Kanji code of the string enclosed by this macro
is converted into ISO-2022-JP.
.B (U)
.IP "\fB%JH\fP"
The Kanji code of the string enclosed by this macro
is converted into HEX.
.B (U)
.IP "\fB%JC\fP"
The Kanji code of the string enclosed by this macro
is converted into CAP.
.B (U)
.IP "\fB%JU\fP"
The Kanji code of the string enclosed by this macro
is converted into UTF-8.
.B (U)
.PP
When no filename parameter,
such as
.B %C
and
.BR %T ,
is taken with the result to expand parameter macros in a command macro,
the filename on the cursor position is automatically added
to the last of expanded string,
as
.I ./filename
form.
This addition is not done,
in case of the input string for executing command,
or when
.B %N
macro is specified.
.SS Customize
You can customize
.fd
as the following ways.
If you specify some configuration in multiple ways overlapped,
it is prior in this order.
.RS 3
.IP "\fBExecuting builtin commands with EXECUTE_SH\fP" 10
You can execute builtin commands for each registration for
the internal variable definition,
the environment variable definition,
the alias definition,
the function definition,
the key binding,
the keymap changing,
the launcher registration,
the archiver command registration,
and the floppy drive registration.
.IP "\fBCustomizer\fP"
.B EDIT_CONFIG
command is available for
the internal variable definition,
the key binding,
the keymap changing,
the launcher registration,
the archiver command registration,
and the floppy drive registration.
.IP "\fBCommand line options\fP"
You can specify the command line options as
.RI ` \fB\-\fPNAME\fB=\fPvalue '
form,
to define the internal variables.
.IP "\fB.fd2rc\fP"
You can prepare the initial configuration file
.B .fd2rc
on your home directory,
to execute the command which is written in this file,
before the startup of
.BR fd .
You can describe builtin commands and external commands in it
to set up each configuration.
Yet,
when
.B fdsh
is invoked as a login shell,
.B .fdshrc
is read instead of
.BR .fd2rc .
The initial configuration file
.B /etc/fd2rc
which is prepared by a system administrator
is read preceding
.B .fd2rc
and
.BR .fdshrc .
If this file exists,
the initial configurations prepared by a system administrator are valid
unless you intentionally delete them in
.B .fd2rc
and
.BR .fdshrc .
(On MS-DOS version,
these filenames are
.BR $HOME\efd2.rc , " $HOME\efdsh.rc"
and
.BR ~FD\efd2rc .)
.IP "\fBEnvironment variables\fP"
Any valid variable name as the internal variable
can be valid to be defined as the environment variable in advance.
But the internal variable is always prior to the environment variable in
.BR fd .
When the same named environment variable is used in another application,
you can also use the name which
.B FD_
is prefixed to each environment variable for
.B fd
only.
This environment variable with
.B FD_
is always prior to the environment variable without it,
then the definition of the environment variable with
.B FD_
is prior to the definition of the internal variable without
.BR FD_ .
.RE
.SS Customizer
.B EDIT_CONFIG
command invokes the customizer to set up configurations interactively.
You can select the category with the right/left cursor key,
and select the item with the up/down cursor key,
and change its content with
.RB [ Return ].
When you finish to change,
exit from the customizer with
.RB [ Esc ].
The following categories are prepared.
.PD 0
.PP
.RS 3
.IP "\fBVariables\fP" 10
Change the value of internal variables.
The input method is different with the variable,
then you should input following the guidance on screen.
.IP "\fBKey bind\fP"
Change the command bound to each key.
When you newly bind a command to the key with no binding,
you should select "NewEntry".
If you select "Delete bind",
the existent key binding is deleted.
.IP "\fBKey map\fP"
Change the key code mapping for each special key.
If you push
.RB [ Esc ]
when you are prompted to push the key,
the existent key mapping is deleted.
.B (U)
.IP "\fBLauncher\fP"
Change the launcher registration for each extension.
When you newly register a launcher for the extension with no registration,
you should select "NewEntry".
If you input a null line when you input a command for the launcher,
the existent launcher registration is deleted.
.IP "\fBArchiver\fP"
Change the archiver command registration for each extension.
When you newly register a archiver command
for the extension with no registration,
you should select "NewEntry".
If you input a null line both when you input a command for pack/unpack,
the existent archiver command registration is deleted.
.IP "\fBDOS drive\fP"
Change the floppy drive registration.
When you newly register a floppy drive
for the drive name with no registration,
you should select "NewEntry".
If you input a null line when you input a device name,
the existent floppy drive registration is deleted.
.B (U)
.IP "\fBSave\fP"
Save the configurations changed with the customizer into a file,
or cancel configurations to restore to the previous state.
.RS 10
.IP Cancel 10
Cancel the changed configurations within the specified categories,
and restore to the state before the customizer is invoked.
.IP Clear
Cancel all the configurations within the specified categories,
and restore to the default state.
.IP Load
Load configurations from the specified file.
.IP Save
Save all the configurations within the specified categories
to the specified file.
.IP Overwrite
Overwrite all the configurations within the specified categories
to the specified existent file.
The original configurations which has existed in the file are parsed,
and the configuration for the same target is overwritten at the same place
as possible.
The configurations which are not set up at present
and the configurations which are not supported by the customizer
are remains as it is.
.PD
.PP
When you specify the range of categories,
all categories are selected by default,
then you should turn on/off each selection with
.RB [ Space ]
and decide with
.RB [ Return ].
.RE
.RE
If you try to exit from the customizer without saving
after changing any configuration,
you will be confirmed whether if it is right to exit without saving.
While the changed configurations themselves are valid
even if you exit without saving,
when you want them to be valid in the next invoked
.BR fd ,
you must save them into the initial configuration file.
.SH ENVIRONMENT VARIABLES
The following environment variables are valid in
.BR fd .
These environment variables can be valid
if they are defined as the internal variables.
You can specify them as the command line options in
.RI ` \fB\-\fPNAME\fB=\fPvalue '
form.
But the variables followed by \(** cannot be use with the prefix
.B FD_
as the environment variables.
.IP "\fBCDPATH\fP\(**" 14
Specify the search path
when an argument of the builtin command
.B cd
does not start with
.BR / .
You can specify multiple paths separating with
.RB ' : '.
No search path is specified by default.
.IP "\fBCOMSPEC\fP\(**"
Specify the shell used to invoke a batch file.
If undefined,
the shell defined by the environment variable
.B SHELL
or \eCOMMAND.COM is used.
.B (D)
.IP "\fBCOPYCMD\fP\(**"
Specify the default options used by the builtin command
.BR copy .
.B (D)
.IP "\fBDIRCMD\fP\(**"
Specify the default options used by the builtin command
.BR dir .
.B (D)
.IP "\fBHOME\fP\(**"
Specify the default value
when no argument of the builtin command
.B cd
is specified.
When invoked as a login shell,
if this variable is specified
that directory becomes the current directory,
otherwise your home directory is automatically defined as this value.
.IP "\fBIFS\fP\(**"
Specify the internal field separators.
They are used in
.B EXECUTE_SH
to separate command and arguments.
Space, tab and newline are specified by default.
.IP "\fBPATH\fP\(**"
Specify the search path for executing external commands.
You can specify multiple paths separating with
.RB ' : '.
.IP "\fBSHELL\fP\(**"
When the filename part of this specified value is
.B rfd
or
.BR rfdsh ,
the shell becomes a restricted shell
as well as
.B \-r
option when invoked.
This variable also specify the shell which can be invoked from
.BR EXECUTE_SH .
.IP "\fBSORTTYPE\fP"
The file list in the browser screen is not sorted by default,
but placed in order registered in the directory.
This variable specify it to be sorted by default.
The following are specifiable values.
.RS 18
.ta 0.5i 1i 2i 2.5i
.nf
\fB0\fP not sort
\fB1\fP by filename \fB9\fP by filename(reverse)
\fB2\fP by extension \fB10\fP by extension(reverse)
\fB3\fP by size \fB11\fP by size(reverse)
\fB4\fP by timestamp \fB12\fP by timestamp(reverse)
\fB5\fP by length \fB13\fP by length(reverse)
\fB100-113\fP keep the last sorted type
.fi
.RE
.RS
If you specify the value of 100-113,
it is sorted according to the value indicated by lower 2 digits
just after invoked,
the last specified sorted type is kept when moving directory.
.RE
.IP "\fBDISPLAYMODE\fP"
Specify the filename display mode of the file list when
.B fd
is invoked.
Each of the symbolic link mode,
the file type symbol mode and the dot file display mode
can be selected individually.
The default value is
.BR 0 .
The following are specifiable values.
.RS 18
.ta 0.5i 1.75i 3i
.nf
\fB0\fP standard
\fB1\fP SYMLINK
\fB2\fP FILETYPE
\fB3\fP SYMLINK & FILETYPE
\fB4\fP DOTFILE
\fB5\fP SYMLINK & DOTFILE
\fB6\fP FILETYPE & DOTFILE
\fB7\fP SYMLINK & FILETYPE & DOTFILE
.fi
.RE
.RS
Moreover,
on the OS which supports the file flag,
if you specify the value adding
.B 8
to each value,
you can select the file flag display mode.
.RE
.IP "\fBSORTTREE\fP"
Sort directories in the tree screen.
The sorted type specified by
.B SORT_TYPE
is used,
but they can not be sorted when it is "by size" or "by timestamp".
The directory included in the current directory path
is always placed on the top of directory tree,
with no regard to the sorted type.
Any value except
.B 0
and null effects valid.
.IP "\fBWRITEFS\fP"
Forbid use of
.B WRITE_DIR
command.
If the value is
.BR 1 ,
the directory is written only when the command is executed intentionally,
and you are not confirmed after arranging the file order.
If the value is
.BR 2 ,
even writing by the command is invalid,
the directory writing is quite forbidden.
.IP "\fBIGNORECASE\fP"
Ignore uppercase/lowercase when filenames are compared.
Any value except
.B 0
and null effects valid.
.B (U)
.IP "\fBINHERITCOPY\fP"
Inherit the destination timestamp from the source timestamp
when
.B COPY_FILE
command is executed.
Any value except
.B 0
and null effects valid.
.B (U)
(On MS-DOS version,
the destination timestamp is always inherited,
if this variable is effective or not.)
.IP "\fBADJTTY\fP"
Reset the terminal mode forcedly to the normal state,
when
.B fd
is finished.
Invoking
.B fd
can adjust the terminal rightly from the state displaying broken characters.
Any value except
.B 0
and null effects valid.
.B (U)
.IP "\fBUSEGETCURSOR\fP"
Use the VT100 compatible escape sequence getting the cursor position
in order to get the terminal size.
When the screen size of
.B fd
doesn't correspond with the terminal size,
this variable can be sometimes valid.
On some terminals
which don't support the escape sequence getting the cursor position,
the operation may be stopped.
In this case,
it is continued by inputting 'R' from the keyboard.
Any value except
.B 0
and null effects valid.
.B (U)
And,
if this variable is ineffective,
a command line of
.B fdsh
always begins at the end of a screen.
(On MS-DOS version,
the cursor position is always gotten rightly,
if this variable is effective or not.)
.IP "\fBCOLUMNS\fP"
Specify the columns displayed in the screen when
.B fd
is invoked.
The default value is
.BR 2 .
If you specify the value except
.BR 1 ,
.BR 2 ,
.B 3
and
.BR 5 ,
it is ignored.
.IP "\fBMINFILENAME\fP"
Specify the minimum character length of filename display area
in the file list.
When the area enough to be specified here cannot be obtained,
the informations are reduced in the order of UID, GID, timestamp, size.
The default value is
.B 12
characters.
.IP "\fBHISTSIZE\fP"
Specify the maximum number of the command histories
which can be referred by
.B EXECUTE_FILE
and
.BR EXECUTE_SH .
The default value is
.BR 50 .
If this value is
.BR 0 ,
you can refer to no command history.
.IP "\fBDIRHIST\fP"
Specify the maximum number of the directory histories
which can be referred by the directory input line.
The default value is
.BR 50 .
If this value is
.BR 0 ,
you can refer to no directory history.
.IP "\fBSAVEHIST\fP"
Specify the maximum number saved to the command history file.
The default value is
.BR 50 .
If this value is
.BR 0 ,
no command history file is saved.
.IP "\fBDIRCOUNTLIMIT\fP"
Specify the maximum number of files read from the directory
in the tree screen.
When the directory trailed by
.RB ' > '
has no sub directory,
the expanded result is not changed.
If the number of files (including directories) in the directory
is within this value,
the directory with no sub directory is not trailed
.RB ' > '
from the first.
Moreover,
the file list in the directory displayed on the right of screen
is not displayed over this value.
If the value is
.BR 0 ,
you can realize a comfortable operation speed even in the slow machine.
The default value is
.B 50
files.
.IP "\fBDOSDRIVE\fP"
Validate the access function to the MS-DOS floppy.
If no floppy drive is registered,
this validation cannot make you access the floppy.
Any value except
.B 0
and null effects valid.
.RS
On MS-DOS version,
This definition can make you treat the LFN formed filename
in the old DOS before Ver. 6.xx.
In this case,
you don't have to register any floppy drive.
the access speed may be slow or some functions may be restricted
for the reason to operate the disk I/O not by way of OS.
.RE
.IP "\fBSECOND\fP"
Display the second in the clock of the title line.
But the clock is adjusted correctly every
.B 10
seconds,
and some gap from the real time will be occurred in this span.
Any value except
.B 0
and null effects valid.
.IP "\fBSIZEINFO\fP"
Display the file size information line at the top of screen.
The total size displayed here is not the sum of bytes
but the sum of disk block size occupied actually.
Any value except
.B 0
and null effects valid.
.IP "\fBANSICOLOR\fP"
Colorize the file display.
When the terminal which you use supports the color control escape sequence
of ANSI standard,
each file is displayed with color according to its file type.
If the value is
.BR 1 ,
it is colorized.
If the value is
.BR 2 ,
the background color is forced to be black,
for the case that the foreground color is the same as the background color
and indistinguishable.
If the value is
.BR 3 ,
the foreground color is forced to be black.
.IP "\fBEDITMODE\fP"
Specify the edit mode of key input as the string.
The default value is
.BR emacs .
The value except
.BR emacs ,
.B wordstar
and
.B vi
or null are specified,
any control character is not converted and will be sent as it is.
.IP "\fBTMPDIR\fP"
Specify the working directory
where the archiver command temporarily unpack files in the archive file.
The default value is
.BR /tmp .
.IP "\fBRRPATH\fP"
Display files under the directory mounted by CD-ROM,
with the pseudo ISO 9660 RockRidge Extension,
for the OS which cannot support RockRidge Extension.
You can specify multiple mount points separating with
.RB ' : '.
You are enough to specify only the top directory mounted by CD-ROM,
then the pseudo RockRidge Extension function is valid
in all of the directories under that directory.
This is no more than a pseudo extension,
which only replaces filenames according to TRANS.TBL,
and cannot handle some CD-ROM which has an inconsistent TRANS.TBL.
No mount point is specified by default.
.IP "\fBPRECEDEPATH\fP"
Specify the file preceding function,
which displays only filenames before obtaining their file informations,
for the directory which has a lot of files like as /dev.
You can specify multiple pathnames separating with
.RB ' : '.
You are enough to specify only the top directory
where you want to realize the file preceding function,
then the file preceding function is valid
in all of the directories under that directory.
When the file preceding function is effective,
any files are not sorted in that directory,
and file informations are obtained file by file while waiting the key input.
No pathname is specified by default.
.IP "\fBPS1\fP"
Specify the prompt string of input line in
.BR EXECUTE_SH .
The default value is "\fB$\fP\|\ \|".
The following escape sequences are available.
.RS 18
.ta 0.5i
.nf
\fB\eu\fP username \fB(U)\fP
\fB\eh\fP hostname \fB(U)\fP
\fB\eH\fP hostname (including domain name) \fB(U)\fP
\fB\ew\fP fullpath of current directory
\fB\e~\fP fullpath of current directory
(to simplify home directory with \fB~\fP)
\fB\eW\fP current directory name
\fB\e!\fP command history number
\fB\e$\fP if UID is 0, a \fB#\fP, otherwise a \fB$\fP \fB(U)\fP
\fB\e[\fP beginning of non-printing sequence
(terminal control character, etc.)
\fB\e]\fP ending of non-printing sequence
\fB\ee\fP ESC (\e033)
\fB\e\fP\fIooo\fR character indicated by the octal \fIooo\fR
\fB\e\e\fP \e itself
.fi
.RE
.IP "\fBPS2\fP"
Specify the prompt string when more continuous input is needed in
.BR EXECUTE_SH .
The default value is "\fB>\fP\|\ \|".
.IP "\fBLANGUAGE\fP"
Specify the language for display character.
It means not only each messages displayed by
.BR fd ,
but also a Kanji code of filename to be converted.
The following is the kind of languages,
it doesn't have to be the string itself and is enough to contain the string,
the value of the environment variable
.B LANG
also can be used.
.BR JIS8 ,
.BR JUNET,
etc. among them are the Kanji codes used in Samba.
.RS 18
.ta 1.5i
.nf
\fBSJIS\fP, \fBsjis\fP Shift JIS
\fBEUC\fP, \fBeuc\fP EUC-JP
\fBJIS\fP, \fBjis\fP 7bit JIS
\fBJIS8\fP, \fBjis8\fP 8bit JIS
\fBJUNET\fP, \fBjunet\fP ISO-2022-JP
\fBOJIS\fP, \fBojis\fP 7bit JIS (JIS C6226-1978 + roman)
\fBOJIS8\fP, \fBojis8\fP 8bit JIS (JIS C6226-1978 + roman)
\fBOJUNET\fP, \fBojunet\fP ISO-2022-JP (JIS C6226-1978 + roman)
\fBUTF8\fP, \fButf8\fP UTF-8
\fBENG\fP, \fBeng\fP, \fBC\fP English (message only)
default no convert
.fi
.RE
.RS
(On MS-DOS version,
only the English is valid.)
.RE
.IP "\fBINPUTKCODE\fP"
Specify the Kanji code for input from keyboard.
When the value except the following is specified,
the Kanji code specified in compile is valid.
.B (U)
.RS 18
.ta 1.5i
.nf
\fBSJIS\fP, \fBsjis\fP Shift JIS
\fBEUC\fP, \fBeuc\fP EUC-JP
.fi
.RE
.IP "\fBFNAMEKCODE\fP"
Specify the Kanji code for filename.
Any filename is converted into the specified Kanji code
at the point of accessing the file,
then you can refer to the file which has a Kanji filename
from another machine on network which use a different Kanji code.
.BR JIS8 ,
.BR JUNET ,
.BR HEX ,
.BR CAP ,
etc. among them are the Kanji codes used in Samba.
.B (U)
.RS 18
.ta 1.5i
.nf
\fBSJIS\fP, \fBsjis\fP Shift JIS
\fBEUC\fP, \fBeuc\fP EUC-JP
\fBJIS\fP, \fBjis\fP 7bit JIS
\fBJIS8\fP, \fBjis8\fP 8bit JIS
\fBJUNET\fP, \fBjunet\fP ISO-2022-JP
\fBOJIS\fP, \fBojis\fP 7bit JIS (JIS C6226-1978 + roman)
\fBOJIS8\fP, \fBojis8\fP 8bit JIS (JIS C6226-1978 + roman)
\fBOJUNET\fP, \fBojunet\fP ISO-2022-JP (JIS C6226-1978 + roman)
\fBHEX\fP, \fBhex\fP HEX
\fBCAP\fP, \fBcap\fP CAP
\fBUTF8\fP, \fButf8\fP UTF-8
default no convert
.fi
.RE
.IP "\fBSJISPATH\fP"
.PD 0
.IP "\fBEUCPATH\fP"
.IP "\fBJISPATH\fP"
.IP "\fBJIS8PATH\fP"
.IP "\fBJUNETPATH\fP"
.IP "\fBOJISPATH\fP"
.IP "\fBOJIS8PATH\fP"
.IP "\fBOJUNETPATH\fP"
.IP "\fBHEXPATH\fP"
.IP "\fBCAPPATH\fP"
.IP "\fBNOCONVPATH\fP"
.PD
Specify the Kanji code for filename per directory,
which is prior to
.BR FNAMEKCODE .
You can specify multiple pathnames separating with
.RB ' : '.
You are enough to specify only the top directory
where you want to use the Kanji code,
then you can use the Kanji code
in all of the directories under that directory.
In the directory which is described in
.BR NOCONVPATH ,
no Kanji code is converted ignoring the value of
.BR FNAMEKCODE .
No pathname is specified by default.
.B (U)
.SH MULTI LANGUAGE SUPPORT
.B fd
processes the Kanji character-set to input/output
as "EUC-JP" or "Shift JIS" according to setting in compile.
The the pathname including Kanji is displayed
in consideration for the 2nd byte character in Kanji.
You can dynamically select Kanji code to input/output
with the internal variable
.BR LANGUAGE ,
.B INPUTKCODE
and
.BR FNAMEKCODE .
You can input Kanji string with some Japanese input methods.
You can use Kanji in the command macro and the command string,
but cannot use Kanji as the value of the internal variables.
You cannot use the multibyte symbol character as the meta character,
such as
.RB ' % '
and '\fB"\fP' and so on,
Kanji character is not counted as 1 character in the wildcard search.
And when you give the non-standard Kanji code for the OS to the shell
with the parameter macro such as
.BR %JJ ,
some Kanji is converted into the code including the meta character
such as
.RB ' $ '
and
.RB ' \e '
and so on,
to cause unexpected behavior.
In that case,
you can probably avoid it by quoting the string to be converted with
.BR %' .
.SH AUTHOR
Takashi SHIRAI <shirai@nintendo.co.jp>
.br
The original "FD" for MS-DOS was created and released by
A.Idei <SDI00544@niftyserve.or.jp>
for the first time, in 1989.
.B fd
was created for UNIX from scratch following that implementation, in 1995.
.SH FILES
.PD 0
.TP 10
.B /etc/fd2rc
The systemwide initial configuration file for
.B fd
.TP
.B ~/.fd2rc
The individual initial configuration file for
.B fd
.TP
.B ~/.fdshrc
The individual initial configuration file for
.B fdsh
.TP
.B ~/.fd_history
The command history file
.TP
.B /bin/sh
The user shell when the environment variable
.B SHELL
is undefined
.TP
.B /bin/rm
The command to remove temporary files when abort
.TP
.BR /tmp/fd \(**
The temporary directory to unpack the archive file
.TP
.B fd\-unicd.tbl
The UNICODE translation table for the floppy drive,
which is installed in the same directory as the executable binary of
.B fd
.TP
.B fd2rc
The systemwide initial configuration file for
.B fd
on MS-DOS version,
which must be prepared in the same directory as the executable binary of
.B fd
.TP
.B $HOME\efd2.rc
The individual initial configuration file for
.B fd
on MS-DOS version
.TP
.B $HOME\efdsh.rc
The individual initial configuration file for
.B fdsh
on MS-DOS version
.TP
.B $HOME\efd.hst
The command history file on MS-DOS version
.PD
.SH LIMITATIONS
Words expanded from a command macro can be no longer than
.B 1023
characters.
You cannot input a string over
.B 255
characters, and it depends on also the screen size.
The maximum key bindings which you can register is
.BR 256 ,
and the maximum that with the user defined macro is
.BR 64 .
The maximum launchers which you can register is
.BR 32 ,
including archive browsers.
The maximum archive commands which you can register is
.B 16
pairs,
with pack and unpack in pairs.
These maximum values include default builtin definitions.
Some terminals cannot send the input of certain function keys and special keys.
The sequence compatible with
.B VT200
is assigned as the default sequence which is not registered in
.BR termcap (5),
and when the terminal cannot support this,
the key receipt or the screen control
due to be brought by this is not available.
.SH SEE ALSO
.BR sh (1),
.BR echo (1),
.BR test (1),
.BR ls (1),
.BR rm (1),
.BR tar (1),
.BR compress (1),
.BR zcat (1),
.BR gzip (1),
.BR gunzip (1),
.BR lha (1),
.BR umask (2),
.BR termcap (5)
.SH BUGS
When files in an archive file are packed with a pathname including ".\|.",
the archive browser cannot work normally.
The symbolic links in an archive file cannot be unpacked individually.
The user interface is cheap.
.SH COPYRIGHT
Copyright (C) 1995-2002 by Takashi SHIRAI
|