logoalt Hacker News

fsmvlast Tuesday at 2:25 PM1 replyview on HN

I made one of these too! I decided not to use // because I use gofmt auto formatting in my editor and it puts a space between the // and the usr. This one isn't changed by gofmt:

    /*?sr/bin/env go run "$0" "$@"; exit $? #*/

Replies

tandrlast Tuesday at 8:31 PM

It works, but the best in me I cannot explain fully first 3 symbols. /*?sr/bin/env finds /usr by expanding *? to a first matching directory. But why not just /*usr/ instead?