Feature: expand config variables embedded in cmdline #41

Merged
stefano merged 1 commit from Iam_Tj/BSSG:feature-expand_config_vars_on_cmdline into main 2025-11-18 09:49:54 +01:00
Contributor

When editing multiple sites using BSSG_LCONF it is easy to forget which
path one is currently working with and frustrating to need to type exact
paths when editing files. E.g:

 export BSSF_LCONF=/a/very/deep/path/to/site/a
 bssg.sh page
 ...
 bssg.sh edit '/a/very/deep/path/to/site/a/pages/page-1.md'

It is easier, more intutive, and friendlier to be able to do:

 bssg.sh edit '$PAGES_DIR/pages/page-1.md'

Note the single quotes to prevent the interactive shell from doing
parameter expansion.

Although I'm not deeply familiar with the codebase as yet I examined sub commands and tested and couldn't detect any change in behaviour - aside from the intended that is.

When editing multiple sites using `BSSG_LCONF` it is easy to forget which path one is currently working with and frustrating to need to type exact paths when editing files. E.g: ``` export BSSF_LCONF=/a/very/deep/path/to/site/a bssg.sh page ... bssg.sh edit '/a/very/deep/path/to/site/a/pages/page-1.md' ``` It is easier, more intutive, and friendlier to be able to do: ``` bssg.sh edit '$PAGES_DIR/pages/page-1.md' ``` Note the single quotes to prevent the interactive shell from doing parameter expansion. Although I'm not deeply familiar with the codebase as yet I examined sub commands and tested and couldn't detect any change in behaviour - aside from the intended that is.
Iam_Tj added 1 commit 2025-10-13 14:15:31 +02:00
When editing multiple sites using BSSG_LCONF it is easy to forget which
path one is currently working with and frustrating to need to type exact
paths when editing files. E.g:

 export BSSF_LCONF=/a/very/deep/path/to/site/a
 bssg.sh page
 ...
 bssg.sh edit '/a/very/deep/path/to/site/a/pages/page-1.md'

It is easier, more intutive, and friendlier to be able to do:

 bssg.sh edit '$PAGES_DIR/pages/page-1.md'

Note the single quotes to prevent the interactive shell from doing
parameter expansion.

Signed-off-by: Tj <tj.iam.tj@proton.me>
stefano merged commit 41debaae5c into main 2025-11-18 09:49:54 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stefano/BSSG#41
No description provided.