From 1644e66b0b126206f4c43c409713f9f6dbfbaafc Mon Sep 17 00:00:00 2001 From: Mickael Asseline Date: Fri, 10 Sep 2021 08:59:36 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20update=20Linux/D=C3=A9butant/Terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Linux/Débutant/Terminal.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Linux/Débutant/Terminal.md b/Linux/Débutant/Terminal.md index 8ee0195..ffcc40b 100644 --- a/Linux/Débutant/Terminal.md +++ b/Linux/Débutant/Terminal.md @@ -2,7 +2,7 @@ title: Linux - Terminal description: Toutes les astuces pour votre terminal ! published: true -date: 2021-08-26T08:25:00.604Z +date: 2021-09-10T08:59:32.063Z tags: editor: markdown dateCreated: 2021-05-24T10:35:34.861Z @@ -236,6 +236,26 @@ Ajoute une personnalisation bien plus poussée du terminal. Compatible avec Oh-M Lien officiel : [Github](https://github.com/romkatv/powerlevel10k) +### Ajout des informations OpenStack +![p10k-openstack.png](/images/linux/terminal/p10k-openstack.png) +Ajoutez dans le fichiers `~/.p10k.zsh ` la fonction suivante : +```bash + function prompt_openstack() { + if [[ -n $OS_PASSWORD ]]; then + p10k segment -b blue -f '#ffffff' -i '' -t "$OS_CLOUD |  $OS_PROJECT_NAME |  $OS_USERNAME" + fi + } +``` +Et modifiez cette ligne `typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS` en ajoutant `openstack` : +```bash + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + os_icon # os identifier + dir # current directory + vcs # git status + openstack # display current openstack config + ) +``` + ## Bash-completion Comme son nom l'indique, améliore l'autocompletion de bash