Add support for hashes in the prefix function

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>