dotfiles/zsh/bin/swap

10 lines
122 B
Plaintext
Raw Normal View History

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