class Pry::History

def self.default_file

def self.default_file
  history_file =
    if (xdg_home = Pry::Env['XDG_DATA_HOME'])
      # See XDG Base Directory Specification at
      # https://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html
      xdg_home + '/pry/pry_history'
    elsif File.exist?(File.expand_path('~/.pry_history'))
      '~/.pry_history'
    else
      '~/.local/share/pry/pry_history'
    end
  File.expand_path(history_file)
end