-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Environment variables inside cwd #2288
Comments
shahamran
added a commit
to shahamran/zellij
that referenced
this issue
Mar 15, 2023
* add `shellexpand` as dependency * expand environment variable in kdl parser's `parse_cwd()`
I created a PR that adds support for this. Also, I take back what I said about this being a bug. It's clearly marked as an error in the log file. I guess it can be more clear where the log file is located. |
imsnif
pushed a commit
that referenced
this issue
Apr 28, 2023
* feat(layout): Support environment variables in cwd (#2288) * add `shellexpand` as dependency * expand environment variable in kdl parser's `parse_cwd()` * Fix and enhance environment variable expansion. * Return a proper `ConfigError` on failures. * Replace raw cwd parsing with `parse_cwd()`. * Add tests that verify correct expansions. * Perform env var expansion in more contexts. * feat(layout): Rewrite env var tests as snapshots. * Update layout env var expansion test snapshot.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, and thank you for this amazing project!
I'm trying to define a layout which I'll share with my teammates, and it includes paths that contain env variables that may be different between users. For example, I want to do something like:
where
$USER
is such environment variable.When I open zellij with such layout, it silently falls back to current dir.
I actually consider the current behavior a bug. IMO it should either fail with an error, or do the right thing. (I realize that "the right thing" here is complicated because of
cwd
composition.)Adding a section on "what happens if a path is invalid", and "what paths are valid" to the creating-a-layout doc page will also be helpful.
Thanks again!
The text was updated successfully, but these errors were encountered: