From a84f6b1d5ad71d06d5cf0ae3a5690880dd052d61 Mon Sep 17 00:00:00 2001 From: riehm1u <clement@clementPortableArch.riehm> Date: Thu, 10 Feb 2022 09:19:07 +0100 Subject: [PATCH] Ajout de la premiere partie du rapport --- rendu.tex | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/rendu.tex b/rendu.tex index 1a1afd5..220eeee 100644 --- a/rendu.tex +++ b/rendu.tex @@ -26,6 +26,7 @@ showtabs=false, tabsize=2 } +\lstset{style=mystyle} % Info titre \title{Outils libre coté client} @@ -35,4 +36,79 @@ \maketitle \tableofcontents +\section{Efficacité de l'environnement de travail} +\subsection*{\#1} +\subsection*{\#2} +\subsection*{\#3} +vi en mode par défaut: + +\begin{lstlisting}[language=bash] +echo "set editing-mode vi" > ~/.inputrc +\end{lstlisting} + +Parametrer nvim en éditeur par défaut sur archlinux : + +\begin{lstlisting}[language=bash] +echo "export EDITOR='nvim'" >> ~/.bashrc +\end{lstlisting} +\subsection*{\#4} +Il y avait un mot de passe dans mon history. + +D'après son history l’employé a sans doute changer de shell. Il a installé zsh avant que l’history s’arrete. + +Les commandes listées dans la variable HISTIGNORE sont désactivées. + +\begin{lstlisting}[language=bash] +export HISTIGNORE="&:ls:exit:pwd:clear:history" +\end{lstlisting} +\subsection*{\#5} +\begin{lstlisting}[language=bash] +function mkcd() +{ + mkdir $1 + cd $1 +} + +function gitemergency() +{ + git add * + git commit -m "emergency commit" + git push origin main +} +\end{lstlisting} +\subsection*{\#6} +\begin{lstlisting}[language=bash] +_backup() +{ + local cur prev opts + + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + local files=("${cur}"*) + + case $COMP_CWORD in + 1) opts=`getent passwd | cut -d: -f1`;; + 2) opts="now tonight tomorrow";; + 3) opts="${files[@]}";; + *);; + esac + + COMPREPLY=() + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 +} + +complete -o nospace -F _backup backup +\end{lstlisting} +\subsection*{\#7} +Ajouter vagrant-prompt dans la liste de plugins de ~/.zshrc +plugins=(git vagrant-prompt) + +Ajouter \verb|$(vagrant_prompt_info)| au PROMPT dans le themes +\subsection*{\#8} +\subsection*{\#9} +\subsection*{\#10} +\section{Efficacité de l'environnement de travail} +\subsection*{\#1} \end{document} -- GitLab