Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path handling is very crude and could use improvement #18

Open
SteveBenner opened this issue Jan 3, 2015 · 1 comment
Open

Path handling is very crude and could use improvement #18

SteveBenner opened this issue Jan 3, 2015 · 1 comment

Comments

@SteveBenner
Copy link

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.

@swdyh
Copy link
Owner

swdyh commented Jan 25, 2015

I added File.expand_path to GISTY_DIR.
2927208

I'm thinking how to improve operation output. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants