Git Product home page Git Product logo

Comments (2)

donnemartin avatar donnemartin commented on May 15, 2024

This would tidy things up, thanks for the suggestion!

from gitsome.

 avatar commented on May 15, 2024

Unfortunately, #90 solves this issue incorrectly. Among other things, if the user doesn't have XDG_CONFIG_HOME set in their shell environment, the path expands to /<config_file_name>, which should bomb with an error because gh won't be able to write to that location (and it shouldn't write anything there).

The correct approach would define a configuration search path for each configuration <file>. The path for *nix users would be:

  • $XDG_CONFIG_HOME/gitsome/<file>
  • ~/.config/gitsome/<file>, assuming ~/.config exists and $XDG_CONFIG_HOME is unset
  • fall back to ~/.gitsome/<file>

The technically appropriate places on Windows and OS X are, respectively, %APPDATA%\gitsome\<file> and ~/Library/Application Support/gitsome/<file> but given the nature of this app I think you can get away with just calling it ~/.gitsome/<file> (i.e. user's home directory).

One thing I do believe (and is reflected in the above pathing suggestions) is that, rather than having multiple dotfiles in the user's home directory, they should be grouped in a dotdir, i.e. .gitsome/. This lets you store whatever you need to in that directory without cluttering $HOME.

Also, I am of the opinion that if gitsome is installed in a virtual environment (i.e., $VIRTUAL_ENV or %VIRTUAL_ENV% is set), its configuration data should live in that environment. Or at least, the user should have the option to specify that configuration files outside the virtual environment can be overridden by config files the virtual environment. I may be the only one who cares about this last bit, though ¯_(ツ)_/¯.

I'd be happy to implement all of this if ya'll are interested.

from gitsome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.