class TildeExpander {

    public String abbreviate(final String name) {
        if(StringUtils.startsWith(name, preferences.getProperty("local.user.home"))) {
            return Local.HOME + StringUtils.removeStart(name, preferences.getProperty("local.user.home"));
        }
        return name;
    }

}