From 0907a3a9b51ea8628c4970a26333fd7eee97f2c9 Mon Sep 17 00:00:00 2001 From: Michael Gebetsroither Date: Fri, 5 Oct 2007 02:47:35 +0200 Subject: [PATCH] /etc/zsh/zshrc: added bk() to backup a file with iso time tagged --- debian/changelog | 6 +++++- etc/zsh/zshrc | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e638bfc..b464765 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ grml-etc-core (0.3.31) unstable; urgency=low + [ Michael Prokop ] * /etc/skel/.zshrc: use same pattern in function wikien as in wikide. (Thanks, wuehlmaus) * Added /etc/apt/apt.conf.example + /etc/apt/hg-snapshot-script @@ -12,7 +13,10 @@ grml-etc-core (0.3.31) unstable; urgency=low - improve usage of yacpi, thanks to Alexander 'z3ttacht' Steinböck for the initial patch! [Closes: issue301] - -- Michael Prokop Wed, 26 Sep 2007 22:48:07 +0200 + [ Michael Gebetsroither ] + * /etc/zsh/zshrc: added bk() to backup a file with iso time tagged. + + -- Michael Gebetsroither Fri, 05 Oct 2007 02:47:14 +0200 grml-etc-core (0.3.30) unstable; urgency=low diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 0f43289..a13720a 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1502,6 +1502,11 @@ If you want to use xinit anyway please call \"/usr/bin/xinit\"." exec env -i ENV="/etc/minimal-shellrc" HOME="$HOME" TERM="$TERM" ksh } + # make a backup of a file + bk() { + cp -a "$1" "${1}_$(date --iso-8601=seconds)" + } + # Switching shell safely and efficiently? http://www.zsh.org/mla/workers/2001/msg02410.html # bash() { # NO_SWITCH="yes" command bash "$@" -- 2.1.4