#!/usr/bin/env bash
# fshard prints the lowercased first character of the filename of the
# frontmost selected item in Finder.
#
# I use this when sharding files into directories based on filenames.

set -o errexit
set -o nounset

filename=$(basename "$(ffile)")
echo -n "${filename:0:1}" | tr '[:upper:]' '[:lower:]'
