From d501eb1ba24d6c155933911657db5dadc30ce44a Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 30 Dec 2023 16:03:13 +0200 Subject: [PATCH] `bak` shell function. Create local backups of files. --- .bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bashrc b/.bashrc index 246f517..6191c08 100644 --- a/.bashrc +++ b/.bashrc @@ -203,6 +203,13 @@ ansible_all () { popd } +bak () { + for x in "$@" + do + cp --preserve=all --reflink=auto "$x" "${x}~" + done +} + black8() { black "$@" && flake8 "$@" } -- GitLab