Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe it takes into account if the user doesn't have write access to the folder? If the user didn't have access, the touch command would fail, whereas going directly to vim, it would only fail when trying to save (potentially losing the work done in the file)?



vim will make a swap file for you and will stop you from quitting on an unsaved file.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: