getShellConfig static method

String getShellConfig()

Get the path to the shell configuration file.

Implementation

static String getShellConfig() {
  final home =
      Platform.environment['HOME'] ??
      Platform.environment['USERPROFILE'] ??
      '';
  final shell = detectShell();
  return switch (shell) {
    'zsh' => '$home/.zshrc',
    'bash' => '$home/.bashrc',
    'fish' => '$home/.config/fish/config.fish',
    _ => '$home/.profile',
  };
}