tipsshell: améliorer exemple history expansion

This commit is contained in:
Alexis Ben Miloud--Josselin 2022-11-16 11:53:05 +01:00
parent ea28a50c66
commit df5c384f38

View file

@ -162,20 +162,29 @@ Les éléments suivants permettent de rappeler des bouts des commandes précéde
Exemple:
> TODO faire un meilleur exemple.
~~~
$ echo a b c
a b c
$ echo !! d
echo echo a b c d
$ !! d
echo a b c d
$ ^d^D^
echo echo a b c D
echo a b c D
$ echo !:2 !$
echo a D
a D
a b c d
$ echo !$
echo d
d
$ !-3
echo a b c
a b c
$ # copier un fichier puis léditer
$ cp -p file file.old
$ vi !:2
vi file
$ # lister puis extraire le contenu dune archive
$ tar --list --file mon-archive.tar
[…]
$ ^list^extract^
tar --extract --file mon-archive.tar
~~~
# Fichiers et FS