GitPortable
GitPortable copied to clipboard
Can't Access Environment Variables with non ASCII characters [a-zA-Z0-9_]
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}
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%