Skip to content

refactor and tidy home / tilde expansion #441

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

Closed
wants to merge 3 commits into from

Conversation

tjex
Copy link
Member

@tjex tjex commented Aug 7, 2024

We added tilde expansion for note.template so users can share template files between notebooks in #431.

We however overlooked that tilde / home dir expansion was already being implemented in isolation for the global notebook directory in container.go.

I've refactored that code into the function @hugo created, and also made a few optimisations to it (and renamed it as it now expands more than just tildes).

I made a decision to not pass up the err from ResolveHomeDir() and wrap it instead, as there is only one error that would be passed up, so it makes each call to it unnecessarily verbose? Very open and interested to know if that's not the best idea.

Otherwise, am I overlooking anything, have I overdone / underdone anything, or is it looking alright?

@tjex tjex marked this pull request as draft August 7, 2024 19:17
@tjex tjex marked this pull request as ready for review August 7, 2024 19:40
@tjex tjex force-pushed the refactor-tilde-expansion branch from 05da552 to 774a604 Compare August 7, 2024 19:44
@tjex tjex closed this Aug 7, 2024
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 this pull request may close these issues.

1 participant