From 04e3c18cc41b96040a11c2576e63a92fa83fd118 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Thu, 7 Jan 2021 09:00:48 +0100 Subject: [PATCH] doc: missing $_ mention --- doc/7_develop.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/7_develop.md b/doc/7_develop.md index d3f3cb2..f0e8fed 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -263,8 +263,9 @@ VAR="$(( 1 + 2 ))" -> (( var=1+2 )) INDEX="$(( ${INDEX} + 1 ))" -> (( INDEX++ )) ``` -The special variable stores the expanded __last__ argument of the previous command. -This allows some useful optimisations, especially in combination with the no-op command `:`. +The special variable `$_` stores the expanded __last__ argument of the previous command. +This allows some nice optimisations, especially in combination with the no-op command `:`, +but be aware of the pitfalls. ```bash # mkdir plus cd to it