Commit 775c1135 authored by Gabriel Detraz's avatar Gabriel Detraz

Merge branch 'chsh' into 'master'

chsh affiche le shell actuel

See merge request nounous/re2o!3
parents f77c3692 06ecd44d
...@@ -54,7 +54,11 @@ class Command(BaseCommand): ...@@ -54,7 +54,11 @@ class Command(BaseCommand):
raise CommandError(msg) raise CommandError(msg)
shells = ListShell.objects.all() 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: for shell in shells:
self.stdout.write("%d - %s (%s)" % (shell.id, shell.get_pretty_name(), shell.shell)) self.stdout.write("%d - %s (%s)" % (shell.id, shell.get_pretty_name(), shell.shell))
shell_id = input("Entrez un nombre : ") shell_id = input("Entrez un nombre : ")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment