blob: 46e829a7a4b615b38227e46f84229db1cc1130bd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/usr/bin/env bash
# Description: Show diff of 2 directories or multiple files in vimdiff
#
# Shell: Bash
# Author: Arun Prakash Jana
arr=($(cat ~/.config/nnn/.selection | tr '\0' '\n'))
if [ -d "${arr[0]}" ] && [ -d "${arr[1]}" ]; then
vimdiff <(cd ${arr[0]} && find | sort) <(cd ${arr[1]} && find | sort)
else
vimdiff "${arr[@]}"
fi
|