--- _fdrc.orig 2010-09-25 00:00:00.000000000 +0900 +++ _fdrc 2011-05-16 18:40:53.987863891 +0900 @@ -17,6 +17,7 @@ # 200-213: preserve previous sort type also in the archive browser # (the least 2 digits are effective just after initialize) #SORTTYPE=0 +FD_SORTTYPE=101 # default display mode # 0: normal (Default) @@ -33,12 +34,14 @@ # 0: not sort (Default) # >= 1: sort according to SORTTYPE #SORTTREE=0 +FD_SORTTREE=1 # behavior about writing over directory on file system # 0: confirm to write or not, after directory arranged (Default) # 1: write directory only if commanded # 2: never write over directory even if commanded #WRITEFS=0 +FD_WRITEFS=1 # whether if ignore uppercase or lowercase in filename comparison # 0: not ignore (Default) @@ -49,6 +52,7 @@ # 0: not inherit (Default) # >= 1: inherit #INHERITCOPY=0 +FD_INHERITCOPY=1 # whether if display progress bar on copying/moving files # 0: not dislpay (Default) @@ -76,6 +80,7 @@ # 3: 3 columns # 5: 5 columns #DEFCOLUMNS=2 +FD_DEFCOLUMNS=1 # minimum columns of filename field # Default: 12 @@ -156,6 +161,7 @@ # 2: color & force background to blacken # 3: color & force foreground to blacken #ANSICOLOR=0 +FD_ANSICOLOR=1 # color palette in the ANSI color mode # Default: none @@ -270,6 +276,7 @@ # 0: evaluate arguments (Default) # >= 1: pass through #THRUARGS=0 +FD_THRUARGS=1 # whether if make URL drive effective # 0: not use (Default) @@ -365,6 +372,7 @@ # utf8-iconv, UTF8-ICONV: UTF-8 for iconv # en, EN, C: English #LANGUAGE="" +FD_LANGUAGE=$LANG # system default Kanji code # Default: No convert @@ -507,13 +515,58 @@ #NOCONVPATH="" #PAGER=more%K +FD_PAGER=${PAGER:-/usr/bin/more}%K #EDITOR=vi #SHELL=/bin/sh # for Mischievous Japanese OS (see `man fd') #export LANG=C -# launcher definition +# launcher definitions +tar="tar" +tar_format="%a %u/%g %s %m %d %t %y %f" + +for ext in /.tar .gem; do + launch "$ext" "$tar tvf" "$tar_format" +done + +for ext in .tar.Z .taZ .TAZ; do + launch "$ext" "$tar Ztvf %C" "$tar_format" +done + +for ext in .tar.gz .tar.z /.tgz .taz; do + launch "$ext" "$tar ztvf %C" "$tar_format" +done + +for ext in .tar.bz2 .tbz2 /.tbz; do + launch "$ext" "$tar jtvf %C" "$tar_format" +done + +for ext in .tar.xz /.txz; do +# launch "$ext" "$tar Jtvf %C" "$tar_format" + launch "$ext" "xz -cd %C | $tar tvf -" "$tar_format" +done + +launch "/.lzh" "lha -lq" "%a %u/%g %s %x %m %d %{yt} %f" + +for ext in /.zip /.jar; do + launch "$ext" "unzip -lqq" " %s %m-%d-%y %t %f" +done + +for ext in .Z /.gz; do + launch "$ext" "zcat %C | $PAGER" +done + +launch "/.bz2" "bzip2 -cd %C | $PAGER" +launch "/.xz" "xz -cd %C | $PAGER" + +# RCS/CVS files +launch ",v" "rlog %C | $PAGER" + +# distribution files +launch "/.aa" "cat %X.?? | $tar tvfz -" "$tar_format" +arch "/.aa" "echo ERROR" "cat %X.?? | $tar zxf - %TA" + #(Default) #launch ".lzh" "lha l" \ # -f "%a %u/%g %s %x %m %d %{yt} %*f" \ @@ -634,6 +687,49 @@ #launch ".zip" "pkunzip -vb %S" " %s %x %x %x %y-%m-%d %t %*f" 14 2 # archiver definition + +for ext in /.tar; do + arch "$ext" "$tar cf %C %T" "$tar xf %C %TA" +done + +for ext in .tar.Z .taZ .TAZ; do + arch "$ext" "$tar Zcf %C %T" "$tar Zxf %C %TA" +done + +for ext in .tar.gz .tar.z /.tgz .taz; do + arch "$ext" "$tar cf - %T | gzip -9c > %C" "$tar zxf %C %TA" +done + +for ext in .tar.bz2 .tbz2 /.tbz; do + arch "$ext" "$tar cf - %T | bzip2 -9c > %C" "$tar jxf %C %TA" +done + +for ext in .tar.xz /.txz; do +# arch "$ext" "$tar cf - %T | xz -9c > %C" "$tar Jxf %C %TA" + arch "$ext" "$tar cf - %T | xz -9c > %C" "xz -cd %C | $tar xf - %TA" +done + +arch ".Z" "compress %M" "uncompress %C" +arch "/.gz" "gzip -9 %M" "gzip -d %C" +arch "/.bz2" "bzip2 -9 %M" "bzip2 -d %C" +arch "/.xz" "xz -9 %M" "xz -d %C" + +arch "/.lzh" "lha aq %C %TA" "lha xq %C %TA" + +for ext in /.zip /.jar; do + arch "$ext" "zip -qr %C %TA" "unzip -q %C %TA" +done + +_uuencode() { + uu=$1 + shift + for file; do + uuencode $file $file >> $uu + done +} + +arch ".uu" "_uuencode %C %TA" "uudecode -ic < %C" + #(Default) #arch ".lzh" "lha aq %C %TA" "lha xq %C %TA" #arch ".tar" "tar cf %C %T" "tar xf %C %TA" @@ -727,3 +823,7 @@ # keymap definition #(Example) #keymap DEL "\033[3~" + +if [ -f /etc/fd2rc.local ]; then + source /etc/fd2rc.local +fi