A halogen-bonding bis-triazolium rotaxane for halide-selective anion recognition.