# /etc/bashrc: This file contains system-wide defaults used by
# all Bourne (and related) shells. (sourced by ~/.bashrc)

function ls() {
  local args=""
  local arg
  local isopt=1
  local sep=$'\t'
  if [ "$LANG" == "ja_JP.eucJP" ] ; then
    TIME_STYLE=$'+%b %e\xc6\xfc %Y\xc7\xaf\n'
    export TIME_STYLE=$TIME_STYLE$'%b %e\xc6\xfc  %H:%M'
  elif [ "$LANG" == "ja_JP.UTF-8" ] ; then
    TIME_STYLE=$'+%b %e\xe6\x97\xa5 %Y\xe5\xb9\xb4\n'
    TIME_STYLE=$TIME_STYLE$'%b %e\xe6\x97\xa5  %H:%M'
    export TIME_STYLE
  else
    unset TIME_STYLE
  fi
  for arg in "$@" ; do
    if [ "$arg" == "--" ] ; then
      isopt=0
    fi
    if [ $isopt == 1 -a "${arg:0:4}" == "--fu" ] ; then
      if [ "$LANG" == "ja_JP.eucJP" ] ; then
        TIME_STYLE=$'+%8EY%m\xb7\xee%d\xc6\xfc(%a) '
        TIME_STYLE=$TIME_STYLE$'%H\xbb\xfe%M\xca\xac%S\xc9\xc3'
        export TIME_STYLE
      elif [ "$LANG" == "ja_JP.UTF-8" ] ; then
        TIME_STYLE=$'+%8EY%m\xe6\x9c\x88%d\xe6\x97\xa5(%a) '
        TIME_STYLE=$TIME_STYLE$'%H\xe6\x99\x82%M\xe5\x88\x86%S\xe7\xa7\x92'
        export TIME_STYLE
      else
        export TIME_STYLE='+%a %b %e %H:%M:%S %Y'
      fi
      args="$args$sep-l"
    else
      args="$args$sep$arg"
    fi
  done
  local IFS=$sep
  command ls $args
}

export LS_BLOCK_SIZE="'1"
