Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Access Environment Variables with non ASCII characters [a-zA-Z0-9_] #43

Open
LeonT-A opened this issue Sep 15, 2020 · 1 comment

Comments

@LeonT-A
Copy link

LeonT-A commented Sep 15, 2020

While trying to customize my .bashrc/.bash_profile, I was unable to retrieve the values from environment variables that included :, such as...

PAL:Drive=V:
PAL:DriveLetter=V

I tried various different quotes and {} methods, but none of them worked. These variables are incredibly useful for things like adding directories to the $PATH and for creating custom variables to be used in programs launched from the terminal.

Is there no way to access the value of these variables from within Git-Bash/.sh? At the moment, my best solution is to parse the variables that are ASCII compliant. So to get the portable drive litter, I would do...

PORTABLE_DRIVE=${HOME:1:1}
@jgonyea
Copy link
Contributor

jgonyea commented Jan 4, 2021

To do what you're looking for, you'll need to edit the GitPortable/App/Appinfo/Launcher/GitBashPortable.ini file

[Environment]
HOME=%PAL:DataDir%\home
PORTABLE_DRIVE=%PAL:Drive%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants