mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 11:31:30 +01:00
zsh: functions: add bak/unbak functions
This commit is contained in:
parent
5ad7209f8f
commit
f9ed01397c
|
@ -364,7 +364,17 @@ function watch_and_run() {
|
||||||
|
|
||||||
# use watch and force color with grc
|
# use watch and force color with grc
|
||||||
function watchc() {
|
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
|
# highlight functions with when calling which
|
||||||
|
|
Loading…
Reference in New Issue
Block a user