# sample config file for Yafc -*- sh -*-
# If you plan to save passwords in this file,
# make sure permissions is no more than 0600 (chmod 0600 yafcrc)

# blank lines and text between #'s and EOL are skipped
# boolean values can be specified as true/false, yes/no, on/off
# strings must be enclosed in quotes ("" or '') if it contains spaces


# You can include any other file using the 'include' function
#include('~/.yafc/other_preferences')

# set password used for anonymous logins
#anon-password = "anonymous@"

# attempt to login automagically, using login info in bookmarks
autologin = on

# attempt to reconnect automatically on timed out connection
autoreconnect = on

# quit program if received EOF (C-d)
quit-on-eof = yes

# read bookmark entries from ~/.netrc
read-netrc = yes

# use passive mode connections
# if false, use sendport mode
# if you get the message "Host doesn't support passive mode", set to false
use-passive-mode = yes

# do reverse DNS lookups?
reverse-dns = yes

# show some more information (all replies)
verbose = off
# print ftp commands sent to server + all replies
debug = off
# create trace files
trace = off

# path to the SSH program
#ssh-program = "/usr/bin/ssh"

# path to the remote sftp-server program
# leave commented to use sftp subsystem (requires ssh > 2.3.0)
#sftp-server-program = "/usr/libexec/sftp-server"

# set to true to skip query of remote system on connect
inhibit-startup-syst = no

# use environment string to show information
# can be seen in the process list with 'ps'
use-env-string = yes

# use tab to complete remote files
remote-completion = on

# auto-create a bookmark when connection closed?
auto-bookmark = yes # no/yes/ask

# by default, if auto-bookmark is true, non-anonymous passwords are not saved
# anonymous passwords are always saved though
# if auto-bookmark is 'ask', you will be asked whehter to save password or not
# remember: passwords are stored in clear text!!! (well, base64-encoded...)
auto-bookmark-save-passwd = NO

# don't print "created bookmark 'foo', bookmarks saved"
auto-bookmark-silent = no

# default type for file transfers
# ascii mode not recommended since it can mess up binary files
# see also 'ascii-transfer-mask' below
default-type = binary # ...or ascii

# default security machanisms to use, separated with colon
# valid arguments are krb4, krb5 and none
#default-mechanism = {krb4, krb5, none}
#default-mechanism = {krb4}

# filenames matching any of these masks are transferred in ascii mode,
# ignoring the value of 'default-type'
# can be overridden with the --type option to get/put
# case sensitive
ascii-transfer-mask = { "README", "*.html", "*.htm", "*.txt" }
ascii-transfer-mask += {"*.dsc", "*.lsm", "*.md5"}

# beep after a 'long' command is finished
beep-after-long-command = yes

# number of seconds for command to become 'long'
long-command-time = 30

# how long (in seconds) before aborting a command without response
command-timeout = 42
# how long (in seconds) before aborting a connection without response
connection-timeout = 30

# number of times to try to re-connect if login failed (due to busy server)
#  -1 for unlimited number of tries, 0 to disable
connect-attempts = 10
# number of seconds to wait between connection attempts
connect-wait-time = 30

# save and load history lines in ~/.yafc/history
# (this is a no-op if not compiled with readline)
use-history = yes

# max number of history lines to save
# (this is a no-op if not compiled with readline)
history-max = 256

# Yafc will cd to this (local) directory upon startup
#startup-local-directory = ~/download

# if set, Yafc sends mail to this address when nohup transfers are finished
#nohup-mailaddress = someusername@somedomain

# complete path to sendmail used by nohup-mailaddress above
#sendmail-path = "/usr/sbin/sendmail"

# load saved taglist on connect to same site?
# if no, taglist will never be saved
load-taglist = yes # yes/no/ask

# display ~ instead of full home directory path for various commands
tilde = yes

# aliases (on the form alias(name, value))
# can't make an alias of another alias

alias(dir, "ls -lF")
alias(ls, "ls -F")
alias(rels, "cache --touch %*; ls -F %*")
alias(pls, "ls -F %* |$PAGER")
alias(bye, quit)
alias(exit, quit)
alias(?, "help")
alias(binary, "set type binary")
alias(ascii, "set type ascii")
alias(get, "get --verbose --preserve")

include("bookmarks")

alias(put, "put --verbose")
alias(rm, "rm --verbose")
alias(lrm, "shell rm")
alias(lls, "shell ls -F")
alias(lmkdir, "shell mkdir")
alias(lrmdir, "shell rmdir")
alias(lcat, "!cat")
alias(zcat, "cat --type=binary %* | zcat")
alias(bzcat, "cat --type=binary %* | bzcat")
alias(page, "cat --type=ascii %* | $PAGER")
alias(zpage, "cat --type=binary %* | zcat | $PAGER")
alias(bzpage, "cat --type=binary %* | bzcat | $PAGER")
alias(show-trace, "!$PAGER $HOME/.yafc/trace/trace.$PPID")

# ftp prompts
#
# special codes:
# %u      username
# %h      remote host name (as passed to open)
# %H      %h up to the first '.'
# %m      remote machine name (as returned by gethostbyname)
# %M      %m up to the first '.'
# %n      remote ip number
# %[#]w   current remote working directory
# %W      basename of %w
# %[#]~   as %w but home directory is replaced with ~
# %[#]l   current local working directory
# %%      percent sign
# %#      a '#' if (local) user is root, else '$'
# %c      number of open connections
# %C      current connection number
# %{      begin sequence of non-printing chars, ie escape codes
# %}      end      -"-
# \e      escape (0x1B)
# \n      newline
# \t      tab
# \r      carriage return
# \b      backspace
# \x##    character 0x## (hex)
#
# [#] means an optional width specifier can be specified
#  example: %32w
#
# you can put escape codes here, for example if you want a colored prompt
#  "%{\e[01;31m%}ftp%{\e[0m%}" will be "ftp" in red, if your terminal supports
#  ISO 6429 (ANSI) color codes.
#
# note: the %{ and %} codes are needed for readline to correctly wrap
#  lines with embedded escape codes
#
# (ANSI) Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white

prompt1 = "yafc> "                    # not connected
prompt2 = "yafc %h> "                 # connected but not logged in
prompt3 = "yafc %u@%h:%42~> "         # connected and logged in

# Xterm window titles
# same codes as for the prompts above
# see the Xterm-title mini-HOWTO for more information
xterm-title1 = "\e]0;yafc\x07"            # not connected
xterm-title2 = "\e]0;yafc %h\x07"         # connected but not logged in
xterm-title3 = "\e]0;yafc %u@%h:%~\x07"   # connected and logged in

# $TERM's which can handle xterm escape sequences
xterm-title-terms = {"xterm" , "xterm-debian"," rxvt"}

# transfer status string codes
# these strings are printed with the --verbose option to get/put
# 
# %r   - remote filename         (actually -source- filename)
# %R   - remote filename w/path  (actually -source- filename)
# %l   - local filename          (actually -target- filename)
# %L   - local filename w/path   (actually -target- filename)
# %s   - size transferred so far
# %S   - total size (if available)
# %e   - ETA (time left)
# %p   - percent transferred
# %%   - percent sign
# %b   - transfer rate (Bps)
# %B   - transfer rate (Bps) or "stalled" if stalled
# %t   - time elapsed
# %v   - visual progress bar
# %{   - begin sequence of non-printing chars, ie escape codes
# %}   - end sequence of non-printing chars
#
# you can specify an (optional) max width between the '%' and
# the character code
# escape codes are recognized (enclose in %{ and %} pairs)

# this string is printed before the actual transfer begins
#transfer-begin-string = "%{\e[32m%}%-70R%{\e[0m%}\n"
transfer-begin-string = "%-70R\n"

# this string is printed (approx.) every second or so during the transfer
# with a trailing carriage return
#transfer-string = "%-38R   [%25v] %B"
#transfer-string = "%-35R   %s of %S ETA %e %B"
#transfer-string = "%5p%% [%{\e[32m%}%25v%{\e[0m%}] %s/%S ETA %{\e[32m%}%e%{\e[0m%} %B"
transfer-string = "%5p%% [%25v] %s/%S ETA %e %B"

# this string is printed when the transfer is finished
#transfer-end-string "%-35R   %p%% of %S in %t (%b)\n"
transfer-end-string = ""

# this string is printed at the same time as transfer-string if current
# $TERM is defined in xterm-title-terms
# Use to show dynamic info in the xterm title bar
transfer-xterm-string = "\e]0;%p%% - %R - yafc\x07"


#
# Proxy settings
#

# proxy-type is the type of proxy, valid arguments:
#
# 0 - no proxy (default)
# 1 - connect to proxy, USER real-user@real-host, PASS real-password
# 2 - login to proxy, USER real-user@real-host, PASS real-password
# 3 - login to proxy, SITE real-host, USER real-user, PASS real-password
# 4 - login to proxy, OPEN real-host, USER real-user, PASS real-password
# 5 - connect to proxy, USER real-user@proxy-user@real-host, PASS real-password@proxy-password
# 6 - connect to proxy, USER proxy-user@real-host, PASS proxy-password, USER realuser, PASS real-password

proxy-type = 0

# the proxy host to connect to including
# username, password and port (all optional)
# if username or password not given, you will
# be prompted for it
#proxy-host = "user:pass@host:port"
# examples:
# connect to proxy host at port 21, prompt for username and password:
#proxy-host = host
# connect to proxy host at port 4711, use username nisse and prompt for password:
#proxy-host = "nisse@host:4711"

# list of hosts to exclude from proxying (separated with colon)
# 'localnet' specifies unqualified hosts (within your domain)
proxy-exclude ={ localhost, .localnet}

# end of configuration file
