1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 03:21:30 +01:00

zsh: functions: add bak/unbak functions

This commit is contained in:
bretello 2024-08-12 17:39:42 +02:00
parent 5ad7209f8f
commit f9ed01397c

View File

@ -364,7 +364,17 @@ function watch_and_run() {
# use watch and force color with grc
function watchc() {
watch --differences --interval 1 --color grc --colour=on $@
watch --differences --interval 1 --color grc --colour=on $@
}
# make a backup copy of the argument adding the .bak suffix
function bak() {
cp $1{,.bak}
}
# restore a backup copy created using `bak`
function unbak() {
mv $1{.bak,}
}
# highlight functions with when calling which