mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
15 lines
347 B
Bash
Executable file
15 lines
347 B
Bash
Executable file
#!/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
|