Outils pour utilisateurs

Outils du site


informatique:hstr

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

informatique:hstr [2020/08/09 13:03] – modification externe 127.0.0.1informatique:hstr [2020/12/02 09:33] (Version actuelle) simon
Ligne 2: Ligne 2:
 ===== Installation ===== ===== Installation =====
 [[https://github.com/dvorka/hstr/blob/master/INSTALLATION.md#ubuntu|Installation sur Ubuntu (doc officielle)]] [[https://github.com/dvorka/hstr/blob/master/INSTALLATION.md#ubuntu|Installation sur Ubuntu (doc officielle)]]
 +
 +<code bash>
 +$ sudo add-apt-repository ppa:ultradvorka/ppa && sudo apt-get update && sudo apt-get install hstr
 +</code>
 +
 +===== Configuration =====
 +On peut fouiller la [[https://github.com/dvorka/hstr/blob/master/CONFIGURATION.md|documentation officielle]] ou simplement utiliser la génération de la configuration par défaut.
 +<code bash>
 +hstr --show-configuration >> ~/.bashrc
 +</code>
 +
 +J'ai changé deux-trois trucs, voici ma configuration finale :
 +<code bash>
 +#hstr
 +# HSTR configuration - add this to ~/.bashrc
 +alias hh=hstr                    # hh to be alias for hstr
 +#export HSTR_CONFIG=hicolor       # get more colors
 +export HSTR_CONFIG=hicolor,raw-history-view       # get more colors
 +shopt -s histappend              # append new history items to .bash_history
 +#export HISTCONTROL=ignorespace   # leading space hides commands from history
 +export HISTCONTROL=ignoreboth    # don't put duplicate lines or lines starting with space in the history.
 +export HISTFILESIZE=10000        # increase history file size (default is 500)
 +export HISTSIZE=${HISTFILESIZE}  # increase history size (default is 500)
 +# ensure synchronization between bash memory and history file
 +export PROMPT_COMMAND="history -a; history -n; ${PROMPT_COMMAND}"
 +# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
 +if [[ $- =~ .*i.* ]]; then bind '"\C-r": "\C-a hstr -- \C-j"'; fi
 +# if this is interactive shell, then bind 'kill last command' to Ctrl-x k
 +if [[ $- =~ .*i.* ]]; then bind '"\C-xk": "\C-a hstr -k \C-j"'; fi
 +</code>
informatique/hstr.1596978214.txt.gz · Dernière modification : 2020/08/09 13:03 de 127.0.0.1