# Initialize file for FD
#

# to set default sort type
#	0: not sort
#	1: alphabetical	9: alphabetical (reversal)
#	2: extention	10: extension (reversal)
#	3: size		11: size (reversal)
#	4: date		12: date (reversal)
#	100-112: preserve previous sort type
#		(the least 2 digits are effective just after initialize)
SORTTYPE	=	1

# to set default display mode
#	0: normal
#	1: sym-link status
#	2: 			file type symbol
#	3: sym-link status &	file type symbol
#	4: 						invisible dot file
#	5: sym-link status &				invisible dot file
#	6: 			file type symbol &	invisible dot file
#	7: sym-link status &	file type symbol &	invisible dot file
DISPLAYMODE	=	6

# whether if sort or not in tree mode
#	0 or ""(null): not sort
#	>= 1: sort according to SORTTYPE
SORTTREE	=	1

# behavior about writing over direcotory on file system
#	0 or ""(null): confirm to write or not, after directory arranged
#	1: write directory only if commanded
#	2: never write over directory even if commanded
WRITEFS		=	1

# whether if adjust tty or not when exiting
#	0 or ""(null): not adjust
#	>= 1: adjust
ADJTTY		=	1

# to set default columns of file in 1 line
#	1, 2, 3, 5: 1, 2, 3, 5 columns
#	default: 2
COLUMNS		=	2

# minimum columns of filename field
#	default: 12
MINFILENAME	=	12

# history size of sh mode or path input
#	default: 50
HISTSIZE	=	100

# size of saved history
#	default: 50
SAVEHIST	=	0

# limit of counting file in directory, on tree mode
#	default: 50
DIRCOUNTLIMIT	=	0

# whether if display the second hand of clock
#	0 or ""(null): not display
#	>= 1: display
SECOND		=	1

# whether if make MS-DOS drive effective
#	0 or ""(null): not use
#	>= 1: effective
DOSDRIVE	=	1

# whether if show the info. of filesize
#	0 or ""(null): not show
#	>= 1: show
SIZEINFO	=	1

# select edit mode with your favorite editor type
#	emacs: ^P, ^N, ^F, ^B, ...
#	wordstar ^E, ^X, ^D, ^S, ...
#	vi: k, j, l, h, ...
EDITMODE	=	emacs

# temporary directory where archive file is unpacked
#	default: /tmp
TMPDIR		=	/usr/tmp

# mount point of CD-ROM with iso-9660 rock ridge format
#	default: none
RRPATH		=	/cdrom;~/cdrom

# language code type to display
#	default: No convert
#	jis, JIS: 7bit JIS
#	euc, EUC: EUC
#	sjis, SJIS: Shift JIS
#	eng, ENG, C: English
LANGUAGE	=	$LANG

PAGER	=	/usr/local/bin/less
EDITOR	=	/usr/ucb/vi

# for Mischievous Japanese OS (see `man fd')
#export	LANG=C

# launcher definition
#".lzh"		"lha lq"		0,0:1,2-'/',2'/',3,7,5,6,7,8
#".tar"		"tar tvf"		0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
#".tar.Z"	"zcat %C | tar tvf -"	0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
#".tar.gz"	"gunzip -c %C | tar tvf -"\
#					0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
".taZ"		"zcat %C | tar tvf -"	0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
".taz"		"zcat %C | tar tvf -"	0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
".tgz"		"gunzip -c %C | tar tvf -"\
					0,0:1-9,2-'/',2'/',3,7,4,5,6,8:10
".zip"		"unzip -lqq"		0,0:0,0,0,1,4,2,3,5,6:13,16
".zoo"		"zoo lq"		0,0:0,0,0,1,0,5,4,7-'+',8
".Z"		"zcat %C | $PAGER"
".gz"		"gunzip -c %C | $PAGER"

# example for SVR4 (or GNU tar)
#".tar"		"tar tvf"		0,0:1,2-'/',2'/',3,7,4,5,6,8
#".tar.Z"	"zcat %C | tar tvf -"	0,0:1,2-'/',2'/',3,7,4,5,6,8
#".tar.gz"	"gunzip -c %C | tar tvf -"\
#					0,0:1,2-'/',2'/',3,7,4,5,6,8

# archiver definition
#".lzh"		A "lha aq %C %TA"		"lha xq %C %TA"
#".tar"		A "tar cf %C %T"		"tar xf %C %TA"
#".tar.Z"	A "tar cf %X %T; compress %X"	"zcat %C | tar xf - %TA"
#".tar.gz"	A "tar cf %X %T; gzip %X"	"gunzip -c %C | tar xf - %TA"
".taZ"		A "maketaz compress Z taZ"	"zcat %C | tar xf - %TA"
".taz"		A "maketaz compress Z taz"	"zcat %C | tar xf - %TA"
".tgz"		A "maketaz gzip gz tgz"		"gunzip -c %C | tar xf - %TA"
".zip"		A "zip -q %C %TA"		"unzip -q %C %TA"
".zoo"		A "zoo aq %C %TA"		"zoo xq %C %TA"

# key bind definition
'I'	"dir -d %C"
'g'	"gzip %C%K"	WARNING_BELL
'G'	"gunzip %C%K"	WARNING_BELL
'R'	"grep %R %C"
'~'	"!cd ~%N%K"
'F1'	"man fd%N%K"	;Manual

# alias definition
alias	dir "ls -laF"

# function definition
function rename() {\
	!MARK_ALL 0;\
	!MARK_FIND $1;\
#	!RENAME_FILE $2;\
	mv %M $2%K;\
}

function maketaz() {\
	tar cf %X.tar %T;\
	$1 %X.tar;\
	mv %X.tar.$2 %X.$3;\
}
