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

[shell-history] Move to lifecycle scripts? #12

Open
eitsupi opened this issue Sep 2, 2023 · 3 comments · May be fixed by #16
Open

[shell-history] Move to lifecycle scripts? #12

eitsupi opened this issue Sep 2, 2023 · 3 comments · May be fixed by #16

Comments

@eitsupi
Copy link
Contributor

eitsupi commented Sep 2, 2023

I suspect that what is currently done in install.sh could be transferred to scripts that is executed by postCreateCommand etc.

@joshuanianji
Copy link

joshuanianji commented Jan 9, 2024

chowning mount folders in lifecycle scripts do work better, I recently tested this on some of my features (e.g. aws-cli-persistence). There are two main benefits:

  • Slightly cleaner code (don't need to worry about .bashrc, .zshrc and .config/fish separately) and supports different shells out of the box
  • Better support for dotfiles that overwrite/replace .zshrc or other config files

The lifecycle script change will also affect azure-cli-persistence. @stuartleeks what do you think about these changes? I might make a PR when i have some free time

@eitsupi
Copy link
Contributor Author

eitsupi commented Jan 10, 2024

FYI, I have created a Feature using lifecycle scripts to save R Terminal history https://github.com/rocker-org/devcontainer-features/tree/main/src/r-history
I've been using this for a while now and it seems to be working well, so I think we can do the same here.

@joshuanianji
Copy link

Oh great! I really like your method copying the lifecycle script, it's a lot cleaner than the one I found from devcontainer/features. I'll probably adopt this style in my features as well 😄

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

Successfully merging a pull request may close this issue.

2 participants