8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-31 23:12:40 +00:00

Merge branch 'chsh' into 'master'

chsh affiche le shell actuel

See merge request nounous/re2o!3
This commit is contained in:
Gabriel Detraz 2018-03-22 19:45:36 +01:00
commit 775c113591

View file

@ -54,7 +54,11 @@ class Command(BaseCommand):
raise CommandError(msg)
shells = ListShell.objects.all()
self.stdout.write("Choisissez un shell pour l'utilisateur %s :" % target_user.pseudo)
current_shell = "inconnu"
if target_user.shell:
current_shell = target_user.shell.get_pretty_name()
self.stdout.write("Choisissez un shell pour l'utilisateur %s (le shell actuel est %s) :" % (target_user.pseudo, current_shell))
for shell in shells:
self.stdout.write("%d - %s (%s)" % (shell.id, shell.get_pretty_name(), shell.shell))
shell_id = input("Entrez un nombre : ")