projects
/
grml-etc-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
zshrc: Add function cdt() to create a temporary directory and change current working...
[grml-etc-core.git]
/
etc
/
zsh
/
zshrc
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
3271ee8
..
3e20e5b
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-2656,6
+2656,13
@@
fir() {
mcd() {
mkdir -p "$@" && cd "$@"
}
mcd() {
mkdir -p "$@" && cd "$@"
}
+#f5# Create temporary directory and \kbd{cd} to it
+cdt() {
+ local t
+ t=$(mktemp -d)
+ echo "$t"
+ builtin cd "$t"
+}
#f5# Unified diff to timestamped outputfile
mdiff() {
diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1"
#f5# Unified diff to timestamped outputfile
mdiff() {
diff -udrP "$1" "$2" > diff.`date "+%Y-%m-%d"`."$1"