()
| 193 | } |
| 194 | |
| 195 | private getRcFile(): string | undefined { |
| 196 | const homeDir = process.env['HOME'] ?? ''; |
| 197 | const shell = process.env['SHELL'] ?? ''; |
| 198 | if (shell.endsWith('/zsh')) { |
| 199 | return path.join(homeDir, '.zshrc'); |
| 200 | } else if (shell.endsWith('/bash')) { |
| 201 | return path.join(homeDir, '.bashrc'); |
| 202 | } else if (shell.endsWith('/ksh')) { |
| 203 | return path.join(homeDir, '.kshrc'); |
| 204 | } else if (shell.endsWith('/tcsh')) { |
| 205 | return path.join(homeDir, '.tcshrc'); |
| 206 | } else { |
| 207 | return undefined; |
| 208 | } |
| 209 | } |
| 210 | } |
no test coverage detected