Skip to content

Implement gitspaces [setup] - default action when no ~/.gitspaces folder #11

@davfive

Description

@davfive

Background

After a user runs go install https://github.com/davfive/gitspaces/v2@latest for the initial install and run gitspaces for the first time, they are missing two key configurations:

  1. The ProjectPaths list in ~/.gitspaces/config.yml
    This list is used to search for projects when switching spaces

  2. The shell wrapper
    gitspaces often needs to cd into the requested space after an action (e.g., create, sleep, rename, switch). Since the go/bin/gitspaces runs as a subprocess, it can't change directories in the calling (parent) shell. To address this, I use a shell function wrapper of the same name which looks for a file after go/bin/gitspaces exits successfully and cd's to it if found.

Requirements

  1. Until setup is complete and go/bin/gitspaces is being called by the shell function, provide instructions to run the . ~/.gitspaces/<shell>rc to their shell's rc file (~/.bashrc or ~/.zshrc) file.
  2. Until ProjectPaths has paths in it, report an error and provide information on how to fix it.

Metadata

Metadata

Assignees

Labels

completedIssue is completed and can be closedenhancementNew feature or request

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions