rcFileFor function

String rcFileFor(
  1. String shell
)

Best-effort rc file path shown to the user for shell (display only).

Implementation

String rcFileFor(String shell) {
  final name = shell.split(Platform.pathSeparator).last.toLowerCase();
  if (name.contains('zsh')) return '~/.zshrc';
  if (name.contains('bash')) return '~/.bashrc';
  if (name.contains('fish')) return '~/.config/fish/config.fish';
  return '~/.profile';
}