FR: Allow using environment variables (`${SHPOOL_SESSION_NAME}`) in `default_dir` config option

Open
#398 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
cli

Research direction

Read HACKING.md first and trace how the default_dir configuration is parsed and used when creating a session. Verify the behavior with the provided USER and SHPOOL_SESSION_NAME examples; done means newly created sessions start in the expanded directory while existing behavior remains intact.

Written by the indexing model from the issue text.

Description

AI Policy Ack
Please read the AI policy in HACKING.md and ack that you've done so here.
Ack.
What new feature do you want?

I want to be able to use environment variables inside the default_dir setting, e.g.

default_dir = "/home/${USER}/scripts"

The main use case is to use the $SHPOOL_SESSION_NAME variable.

Why this is useful?
On my remote machine, I have a few different repositories that live under a common root (Think /home/$USER/coding/$repo). Using the local shell function approach, I can use work $repo to shpool into a re-usable session for that project. However, if that session does not exist, it currently starts at ~. I want to be able to set

default_dir = "/home/${USER}/coding/${SHPOOL_SESSION_NAME}"

in my settings so that newly-created sessions already start in the right directory.

Dominant language
Rust
Stars
2k
Forks
70
Avg merge
2d 3h
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from shell-pool/shpool

All issues in shell-pool/shpool

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.