posit-dev / posit-dev/positron
Gesture to set working directory to parent of current file
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
RStudio has a neat feature wherein you can right-click on a tab and set the working directory to the parent of the associated script.
It's a command, too.
This is pretty handy if your code uses file paths relative to the script itself, e.g.
# script.R
read.csv("./data.csv")
Positron doesn't have this gesture; the closest thing we have is a context menu on directories in the Explorer pane.
Another way to do this would be to give each script its own session, which would (like notebooks and notebook sessions) use the script's parent as its default working directory.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Explorer directory context menu and the notebook/session behavior described in the issue, then determine how a script tab could expose the requested working-directory action. Done means a user can invoke a gesture or command for the active script and set the working directory to that script's parent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100