dotfiles/zsh/bin/swap

10 lines
122 B
Plaintext
Raw Normal View History

2019-02-11 17:40:33 +01:00
#!/usr/bin/env zsh
# Swap files
swap() {
local tmp=`mktemp`
mv "$1" "$tmp"
mv "$2" "$1"
mv "$tmp" "$2"
}