# check shell sh_test=sh"${BASH_VERSION}${ZSH_NAME}${ZSH_VERSION}" case "${sh_test}" in sh) if test "$SECONDS" -gt 0 then sh_test=ksh"${.sh.version}" fi ;; *zsh4*) sh_test="zsh${ZSH_VERSION}" ;; esac # set options set_opt() { for o in "$@" do #echo "$o" set -o $o done } # set options _at_least_ implemented in bourne shell # ---- # sh(1) on freebsd indicates that 'noclobber' & 'notify' optios # aren't implemented; setting these doesn't generate errors though. # ---- set_opt ignoreeof monitor noclobber notify # set shell specific options case "$sh_test" in ksh*1993*) set_opt vi trackall pipefail markdirs ;; bash2.*) set_opt vi hashall ;; zsh4*) # to get default behaviour like bash 3 (w/ bash options). set +o nomatch set +o prompt_cr set +o null_glob # Note that HASH_LIST_ALL is not what i/one would think how it # actually works. HASH_LIST_ALL causes the hashing only the # FIRST time a command is completed. set_opt \ auto_pushd \ c_bases \ interactive_comments \ auto_continue \ print_exit_value \ check_jobs \ monitor \ notify \ hist_find_no_dups \ hist_save_no_dups \ hist_ignore_dups \ hist_ignore_all_dups \ hist_expire_dups_first \ hist_reduce_blanks \ no_hist_ignore_space \ hist_verify \ hist_no_store \ inc_append_history \ share_history \ always_to_end \ auto_param_slash \ hash_cmds \ hash_dirs \ hash_list_all \ auto_list \ list_types \ list_beep \ list_rows_first \ complete_aliases \ complete_in_word \ glob_complete \ menu_complete ;; esac # Set earse to Ctrl-H, erase2 to Ctrl-A #stty erase  #stty erase2  #stty quit  stty gfmt1:cflag=4b00:iflag=2b02:lflag=200005cb:oflag=3:discard=f:dsusp=19:eof=4:eol=ff:eol2=ff:erase=8:erase2=1:intr=3:kill=15:lnext=16:min=1:quit=1c:reprint=12:start=11:status=14:stop=13:susp=1a:time=0:werase=17:ispeed=115200:ospeed=115200 # Aliases, functions, etc. for f in alias.cf #function.cf do if test -f "${HOME}/cf/sh/${f}" then . ${HOME}/cf/sh/${f} fi done