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:
parent
5ad7209f8f
commit
f9ed01397c
|
@ -367,6 +367,16 @@ function watchc() {
|
|||
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
|
||||
function which(){
|
||||
if ! (($+commands[bat])); then
|
||||
|
|
Loading…
Reference in New Issue
Block a user