diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ffb38..3afa1d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ ## Unreleased ### New features -- Add `FS_NOTIFY_ERRORS` flag to display notifications for FS errors (#282) +- Added `FS_NOTIFY_ERRORS` flag to display notifications for FS errors (#282) +- Added a `${workingDirectory}` variable that gets replaced during terminal creation (#323) + - This applies to both the `Terminal Command` setting and `ssh-shell` task type + - See the issue (#323) for why this got added and how you can use it ### Changes - Small improvements to Dropdown(WithInput) UI components diff --git a/src/pseudoTerminal.ts b/src/pseudoTerminal.ts index 6ea9d43..077949f 100644 --- a/src/pseudoTerminal.ts +++ b/src/pseudoTerminal.ts @@ -205,7 +205,8 @@ export async function createTerminal(options: TerminalOptions): Promise(cb => client.exec(cmd, { pty: pseudoTtyOptions }, cb)); if (!channel) throw new Error('Could not create remote terminal'); diff --git a/src/utils.ts b/src/utils.ts index 0fd2f1a..c6b9597 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -80,7 +80,7 @@ export function validatePort(port: string | number): number { const CLEAN_BASH_VALUE_REGEX = /^[\w-/\\]+$/; /** Based on way 1 in https://stackoverflow.com/a/20053121 */ -function escapeBashValue(value: string) { +export function escapeBashValue(value: string) { if (CLEAN_BASH_VALUE_REGEX.test(value)) return value; return `'${value.replace(/'/g, `'\\''`)}'`; }