Closed DanielRosenwasser closed 3 months ago
@jakebailey mentions this may not be desirable since users should be able to declare an environment variable before running the program. On the other hand, I wonder how many people do that with a different key?
My shell is configured (I think a default in zsh, or maybe just oh-my-zsh?) to not store any command that starts with a space into history, so I can run command with secrets in my terminal without putting them anywhere and that's pretty useful.
PowerShell can do it to with this in profile.ps1
:
Set-PSReadLineOption -AddToHistoryHandler {
param($command)
if ($command -like ' *') {
return $false
}
return $true
}
Of course, these are just examples. Not really sure how we are expecting them to be run.
Looks like I needed this because of https://github.com/microsoft/vscode-python/issues/23078
Fixes issues if (for some reason) environment variables are already specified.