You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			15 lines
		
	
	
		
			577 B
		
	
	
	
		
			Plaintext
		
	
			
		
		
	
	
			15 lines
		
	
	
		
			577 B
		
	
	
	
		
			Plaintext
		
	
| (require-extension ansi-escape-sequences srfi-19)
 | |
| 
 | |
| (repl-prompt
 | |
|  (lambda ()
 | |
|    (let ((is-root? (lambda (user) (string=? user "root")))
 | |
|          (user (car (user-information (current-user-id)))))
 | |
|      (string-append "("
 | |
|                     (set-text (if (is-root? user) '(fg-red) '(fg-green))
 | |
|                                   (string-append user "@" (or (get-host-name) "")))
 | |
|                     ")-("
 | |
|                     (current-directory)
 | |
|                     ")-("
 | |
|                     (date->string (current-date) "~T")
 | |
|                     ")"
 | |
|                     "\n$ ")))) |