freebsd-ports/shells/fd/files/patch-_fdrc
2006-04-07 04:25:11 +00:00

123 lines
2.4 KiB
Text

--- _fdrc.orig Thu Mar 30 00:00:00 2006
+++ _fdrc Fri Apr 7 13:20:15 2006
@@ -13,2 +13,3 @@
#SORTTYPE=0
+FD_SORTTYPE=101
@@ -29,2 +30,3 @@
#SORTTREE=0
+FD_SORTTREE=1
@@ -35,2 +37,3 @@
#WRITEFS=0
+FD_WRITEFS=1
@@ -45,2 +48,3 @@
#INHERITCOPY=0
+FD_INHERITCOPY=1
@@ -62,2 +66,3 @@
#DEFCOLUMNS=2
+FD_DEFCOLUMNS=1
@@ -113,2 +118,3 @@
#ANSICOLOR=0
+FD_ANSICOLOR=1
@@ -226,2 +232,3 @@
#THRUARGS=0
+FD_THRUARGS=1
@@ -246,2 +253,3 @@
#LANGUAGE=""
+FD_LANGUAGE=$LANG
@@ -356,2 +364,3 @@
#PAGER=more%K
+FD_PAGER=${PAGER:-/usr/bin/more}%K
#EDITOR=vi
@@ -363,2 +372,38 @@
# launcher definition
+tar="tar"
+tar_format="%a %u/%g %s %m %d %t %y %f"
+
+launch "/.tar" "$tar tvf" "$tar_format"
+
+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
+
+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"
+
+# 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)
@@ -476,2 +521,39 @@
# 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
+
+arch ".Z" "compress %M" "uncompress %C"
+arch "/.gz" "gzip -9 %M" "gzip -d %C"
+arch "/.bz2" "bzip2 -9 %M" "bzip2 -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)
@@ -569 +651,5 @@
#keymap DEL "\033[3~"
+
+if [ -f /etc/fd2rc.local ]; then
+ source /etc/fd2rc.local
+fi