toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Fix read configuration

Open chiarorosa opened this issue 2 months ago • 0 comments

Description

This PR simplifies read_configuration() in shared-functions.sh by replacing a complex sed regex with a clearer two-step parsing: • Old: sed -r "s/^$name=(["']?)(.+)\1$/\2/" • New: cut -d '=' -f2- | sed -r "s/^(["']?)(.+)\1$/\2/"

Why:

The new approach is easier to read and reason about while preserving behavior: • Extracts the value after the first = • Strips optional matching quotes around the value

Impact & Testing:

•	Functionality unchanged; continues to read values from overleaf.rc and remove surrounding quotes
•	Verified locally: function works as expected across typical configs
•	No breaking changes observed

Related issues / Pull Requests

•	Related to bin/up command (uses configuration parsing)

chiarorosa avatar Oct 21 '25 22:10 chiarorosa