projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bk(): Remove the separators between the units of time
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
68b38cc
..
35a6446
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-3268,7
+3268,7
@@
fi
#f5# Backup \kbd{file_or_folder {\rm to} file_or_folder\_timestamp}
function bk () {
emulate -L zsh
#f5# Backup \kbd{file_or_folder {\rm to} file_or_folder\_timestamp}
function bk () {
emulate -L zsh
- local current_date=$(date -u "+%Y
-%m-%dT%H:%M:
%SZ")
+ local current_date=$(date -u "+%Y
%m%dT%H%M
%SZ")
local clean keep move verbose result all to_bk
setopt extended_glob
keep=1
local clean keep move verbose result all to_bk
setopt extended_glob
keep=1
@@
-3325,14
+3325,14
@@
return 0;;
elif (( clean > 0 )); then
if (( $# > 0 )); then
for to_bk in "$@"; do
elif (( clean > 0 )); then
if (( $# > 0 )); then
for to_bk in "$@"; do
- rm $verbose -rf "${to_bk%/}"_[0-9](#c
4,)-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1])T([0-1][0-9]|2[0-3])(:
[0-5][0-9])(#c2)Z
+ rm $verbose -rf "${to_bk%/}"_[0-9](#c
8)T([0-1][0-9]|2[0-3])(
[0-5][0-9])(#c2)Z
(( result += $? ))
done
else
if (( all > 0 )); then
(( result += $? ))
done
else
if (( all > 0 )); then
- rm $verbose -rf *_[0-9](#c
4,)-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1])T([0-1][0-9]|2[0-3])(:
[0-5][0-9])(#c2)Z(D)
+ rm $verbose -rf *_[0-9](#c
8)T([0-1][0-9]|2[0-3])(
[0-5][0-9])(#c2)Z(D)
else
else
- rm $verbose -rf *_[0-9](#c
4,)-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1])T([0-1][0-9]|2[0-3])(:
[0-5][0-9])(#c2)Z
+ rm $verbose -rf *_[0-9](#c
8)T([0-1][0-9]|2[0-3])(
[0-5][0-9])(#c2)Z
fi
(( result += $? ))
fi
fi
(( result += $? ))
fi