func getSettingsForUid(id int) (settings, error) {
	u, err := user.LookupUID(id)
	if err != nil {
		return settings{}, err
	}
	if u.Shell == "" {
		return settings{}, NoShellError(u.Name)
	}
	if u.Dir == "" {
		return settings{}, NoHomeError(u.Name)
	}

	shell := path.Base(u.Shell)

	_settings := settings{
		global: systemFile[_SHELL_SH],
		user:   path.Join(u.Dir, userFile[_SHELL_SH]),
		kde:    path.Join(u.Dir, kdeFile),
	}
	info, err := os.Stat(_settings.kde)
	if err == nil && info.IsDir() {
		_settings.useKDE = true
	}

	for _, v := range shFamily {
		if v == shell {
			return _settings, nil
		}
	}
	/*for _, v := range cshFamily {
		if v == shell {
			return _settings, nil
		}
	}*/

	return settings{}, fmt.Errorf("shell unsopported: %s", shell)
}
func getSettingsForUid(id int) (settings, error) {
	u, err := user.LookupUID(id)
	if err != nil {
		return settings{}, err
	}
	if u.Shell == "" {
		return settings{}, NoShellError(u.Name)
	}
	if u.Dir == "" {
		return settings{}, NoHomeError(u.Name)
	}

	shell := path.Base(u.Shell)

	_settings := settings{
		global: systemFile[_SHELL_SH],
		user:   path.Join(u.Dir, userFile[_SHELL_SH]),
		kde:    path.Join(u.Dir, kdeFile),
	}
	info, err := os.Stat(_settings.kde)
	if err == nil && info.IsDir() {
		_settings.useKDE = true
	}

	for _, v := range shFamily {
		if v == shell {
			return _settings, nil
		}
	}
	

	return settings{}, fmt.Errorf("shell unsopported: %s", shell)
}
func getSettingsForUid ( id int ) ( settings , error ) { u , err := user . LookupUID ( id ) if err != nil { return settings { } , err } if u . Shell == " " { return settings { } , NoShellError ( u . Name ) } if u . Dir == " " { return settings { } , NoHomeError ( u . Name ) } shell := path . Base ( u . Shell ) _settings := settings { global : systemFile [ _SHELL_SH ] , user : path . Join ( u . Dir , userFile [ _SHELL_SH ] ) , kde : path . Join ( u . Dir , kdeFile ) , } info , err := os . Stat ( _settings . kde ) if err == nil && info . IsDir ( ) { _settings . useKDE = true } for _ , v := range shFamily { if v == shell { return _settings , nil } } /*for _, v := range cshFamily {
		if v == shell {
			return _settings, nil
		}
	}*/ return settings { } , fmt . Errorf ( " " , shell ) }
// getSettingsForUid returns the settings files of the given user id.
getSettingsForUid returns the settings files of the given user id .