Browse Source
this commit introduces this feature for Bash, let's see how to support other shellsremotes/origin/clean-multishell-on-shell-exit
Gal Schlezinger
2 years ago
9 changed files with 126 additions and 7 deletions
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
import { define } from "./types.js" |
||||
|
||||
export type HasGetEnvVar = { |
||||
getEnvVar(name: string): string |
||||
} |
||||
|
||||
export const getEnvVar = { |
||||
posix: define<HasGetEnvVar>({ |
||||
getEnvVar: (name) => `$${name}`, |
||||
}), |
||||
powershell: define<HasGetEnvVar>({ |
||||
getEnvVar: (name) => `$env:${name}`, |
||||
}), |
||||
winCmd: define<HasGetEnvVar>({ |
||||
getEnvVar: (name) => `%${name}%`, |
||||
}), |
||||
} |
Loading…
Reference in new issue