code: def read(domain, key, user=None):
      '''
      Write a default to the system
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' macdefaults.read com.apple.CrashReporter DialogType
  
          salt '*' macdefaults.read NSGlobalDomain ApplePersistence
  
      domain
          The name of the domain to read from
  
      key
          The key of the given domain to read from
  
      user
          The user to write the defaults to
  
      '''
      cmd = 'defaults read "{0}" "{1}"'.format(domain, key)
      return __salt__['cmd.run'](cmd, runas=userf read(domain, key, user=None):
      '''
      Write a default to the system
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' macdefaults.read com.apple.CrashReporter DialogType
  
          salt '*' macdefaults.read NSGlobalDomain ApplePersistence
  
      domain
          The name of the domain to read from
  
      key
          The key of the given domain to read from
  
      user
          The user to write the defaults to
  
      '''
      cmd = 'defaults read "{0}" "{1}"'.format(domain, key)
      return __salt__['cmd.run'](cmd, runas=user)
docs: Write a default to the system
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' macdefaults.read com.apple.CrashReporter DialogType
  
          salt '*' macdefaults.read NSGlobalDomain ApplePersistence
  
      domain
          The name of the domain to read from
  
      key
          The key of the given domain to read from
  
      user
          The user to write the defaults to