ndmitchell / cmdargs

Haskell library for command line argument processing
Other
91 stars 12 forks source link

expandArgsAt doesn't understand ~ #48

Open simonmichael opened 7 years ago

simonmichael commented 7 years ago

expandArgsAt and @ARGSFILE seems a great feature, which I've enabled in hledger 1.4.

I notice that @~/some/file doesn't work though, you have to write @$HOME/some/file instead. Perhaps there is some extra level of file path expansion that would be appropriate for it to do.

ndmitchell commented 7 years ago

I think this is all controlled by your shell, and not cmdargs. If I try:

Neil@Neil MINGW64 /c/Neil
$ echo @$HOME
@/c/Users/ndmit_000

Neil@Neil MINGW64 /c/Neil
$ echo @~
@~

I don't expand $HOME at all, so not sure how I could reasonably expand ~. Note that x~ and ~x both don't expand ~ for me, but ~/ does.