[racket] Username

From: José Lopes (jose.lopes at ist.utl.pt)
Date: Wed Dec 7 01:18:02 EST 2011

Hello everyone,

How do I get the username of the person who is logged in the system?

At the moment I am doing this, but it looks terrible...

(define (current-user)
   (path->string (file-name-from-path (find-system-path 'home-dir))))

Regards,
José

-- 
José António Branquinho de Oliveira Lopes
58612 - MEIC-A
jose.lopes at ist.utl.pt



Posted on the users mailing list.