My build of nnn with minor changes
25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/usr/bin/env bash
-
- # Description: Show diff of 2 directories or multiple files in vimdiff
- #
- # Shell: Bash
- # Author: Arun Prakash Jana
-
- selection=~/.config/nnn/.selection
-
- if [ -s $selection ]; then
- arr=$(cat $selection | tr '\0' '\n')
- { read -r f1; read -r f2; } <<< "$arr"
-
- if [ -z "$f2" ]; then
- exit
- fi
-
- if [ -d "$f1" ] && [ -d "$f2" ]; then
- vimdiff <(cd "$f1" && find | sort) <(cd "$f2" && find | sort)
- else
- cat $selection | xargs -0 -o vimdiff
-
- # For GNU xargs (note: ignoreme takes up $0)
- # cat $selection | xargs -0 bash -c '</dev/tty vimdiff "$@"' ignoreme
- fi
- fi
|