Expand ~ to the current user's home directory for cli options.
See original GitHub issueSo something like eslint --config="~/.eslintrc" --ignore-dir="~/eslintignore" --rulesdir="~/.config/eslint/rules" --output="~/output"
works as expected and uses files in the user’s home directory.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to get $HOME directory when switching to a different user ...
Very good idea to let bash do it! Another alternative for current user home is: eval echo "~$(who -m | awk '{ print...
Read more >How can I retrospectively create a default home directory for ...
If you want to create the user's home directory if it does not exist, then run the useradd command with the -m flag....
Read more >Why tilde (~) doesn't expand when used with CLI argument ...
If you want to ensure that the home directory path of the current user is properly expanded as part of an argument to...
Read more >OperatingSystem - Robot Framework
Paths beginning with ~ or ~username are expanded to the current or specified user's home directory, respectively. The resulting path is ...
Read more >Get home directory by username - linux - Super User
If the user's home folder is different the second time, this command gives the original home folder rather than the current one. glenn...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tupton I don’t know of a single GNU util (or any other program) that will expand a literal
~
for you. They all let you work with a directory named~
. Expanding it would be a surprising feature.Fair enough. I think it can be expected that users who have paths beginning with “~” have to perform this expansion before giving the directory to eslint, whether by their shell or otherwise. Thanks for taking the time to look at this.