I have this code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (2,2);
\draw[thick] (A) -- (B |- A);
\draw[thick] (B) -- (B |- A);
\draw ($(B |- A) - (.2,0)$) |- ($(B |- A) + (0,.2)$);
\end{tikzpicture}
\end{document}
which does that:
And simple question: can the last command be optimized? I am quite new to tikzpictures, maybe I don't know, how to get points like this ($(B |- A) - (.2,0)$) or right angle in a more compact way?