Convert bash function to fish's

Can someone help me convert this bash function to fish? It would also be nice if you could explain what these do like "${@%%.app}ā€, 's/ /.*/gā€™, "$@\ā€ etc. bid() { local shortname location #