dotfiles/zsh/bin/swap

10 lines
122 B
Bash
Executable File

#!/usr/bin/env zsh
# Swap files
swap() {
local tmp=`mktemp`
mv "$1" "$tmp"
mv "$2" "$1"
mv "$tmp" "$2"
}