cloudhead / rx

👾 Modern and minimalist pixel editor
https://discord.gg/xHggPjfsS9
GNU General Public License v3.0
3.1k stars 109 forks source link

Convert ~ character into the user's home directory path #30

Closed rbisewski closed 4 years ago

rbisewski commented 4 years ago

On various Unix-like operating systems, the ~ character is a abbreviation for home directory path; typically something like: /home/jsmith/

Since Vim auto-expands the path in such as way, and the goal of this project is to be Vim-like, I figure adding this piece of functionality would be helpful for those of us using such operating systems.

I implement this through the creation of an OsString function that will expand the path and combines it using the join() function. This function is then called to expand the path in the save, load, source and write routines; which I believe are all the logic that needs to open or write files (but feel free to correct me if I am mistaken).

Hope this changeset is in the spirit of your project, and let me know what you think :)

rbisewski commented 4 years ago

I have since made the changes you requested, let me know if my total changeset is what you had in mind.

rbisewski commented 4 years ago

Fair enough, that makes more sense :)

I have since made the changes you requested, so I think this is now complete.

cloudhead commented 4 years ago

Great - thanks!