I like this gem, but I find the path management (such as configured via GISTY_DIR) extremely counter-intuitive. Using environment variables is a good idea, except that users might expect certain behaviors as a result, such as expansion of the ~ symbol to the value of $HOME or recognition of absolute vs. relative paths… Though it is technically the user's responsibility to provide valid input, the lack of documentation about the underlying process leaves one unclear as to what is going on when commands are run.
That brings up the larger issue I have with this—silent file operations are not good. It should be default behavior to inform the user when the file system is accessed or modified. At bare minimum, the location of newly-created files/directories should be output to the terminal.
A mere few lines of code would make this gem much more robust. For instance, expanding the path with Pathname.expand or the like.
I will probably submit a patch with the code to accomplish this, but right now I don’t have the time so I will just leave this as a note to myself or anyone interested.
I like this gem, but I find the path management (such as configured via
GISTY_DIR
) extremely counter-intuitive. Using environment variables is a good idea, except that users might expect certain behaviors as a result, such as expansion of the~
symbol to the value of$HOME
or recognition of absolute vs. relative paths… Though it is technically the user's responsibility to provide valid input, the lack of documentation about the underlying process leaves one unclear as to what is going on when commands are run.That brings up the larger issue I have with this—silent file operations are not good. It should be default behavior to inform the user when the file system is accessed or modified. At bare minimum, the location of newly-created files/directories should be output to the terminal.
A mere few lines of code would make this gem much more robust. For instance, expanding the path with
Pathname.expand
or the like.I will probably submit a patch with the code to accomplish this, but right now I don’t have the time so I will just leave this as a note to myself or anyone interested.