spaceship-prompt icon indicating copy to clipboard operation
spaceship-prompt copied to clipboard

Sections: look in a Spaceship config directory for section defs

Open olets opened this issue 4 years ago • 0 comments

Description

Adds support for storing all custom sections in a single directory known to Spaceship. Two primary motivations:

  • ergonomics: rather than manually importing section definitions into .zshrc, users can just save files to the directory Spaceship checks and be done with it
  • section installation: this change makes it possible for section developers to write installation scripts which add section definitions without messing with the user's .zshrc. This could help cut down on the "add a section for X" PRs, as well as opening the door for more complex or bespoke sections that might not be appropriate for core

Default location follows the ~/.config convention. Puts sections in a sections subdirectory to leave room for anything else someone might want to put in the config directory in the future.

Added README documentation, following the same reasoning as in #762 that talking up the customizability can only make Spaceship sound even better, and that having more documentation will help users who aren't experienced with shell scripting.

olets avatar Dec 14 '19 22:12 olets