summaryrefslogtreecommitdiffstats
path: root/.zsh/rc/30functions
diff options
context:
space:
mode:
Diffstat (limited to '.zsh/rc/30functions')
-rw-r--r--.zsh/rc/30functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/.zsh/rc/30functions b/.zsh/rc/30functions
index b272d3f..3250bf9 100644
--- a/.zsh/rc/30functions
+++ b/.zsh/rc/30functions
@@ -22,12 +22,12 @@ update_zshrc() {
# add current time to a file
mbk() {
- mv -b ${1} ${1}_`date +%Y-%m-%d_%T`
+ mv -b "${1}" "$(echo $1 | sed "s/\./_`date +%Y-%m-%d_%T`./")"
}
# easily make backups
bk() {
- cp -b ${1} ${1}_`date +%Y-%m-%d_%T`
+ cp -b "${1}" "$(echo $1 | sed "s/\./_`date +%Y-%m-%d_%T`./")"
}
# chpwd () => a function which is executed whenever the directory is changed