소스 검색

Tweak fzopen to show parent dir and filename with fzf

master
Arun Prakash Jana 5 년 전
부모
커밋
a1b8631d96
No known key found for this signature in database GPG 키 ID: A75979F35C080412
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +4
    -4
      plugins/fzopen

+ 4
- 4
plugins/fzopen 파일 보기

@@ -10,15 +10,15 @@
# Author: Arun Prakash Jana

if which fzf >/dev/null 2>&1; then
fuzzy=fzf
entry=$(find . -type f 2>/dev/null | fzf --delimiter / --nth=-1 --tiebreak=begin --info=hidden)
# To show only the file name
# entry=$(find . -type f 2>/dev/null | fzf --delimiter / --with-nth=-1 --tiebreak=begin --info=hidden)
elif which fzy >/dev/null 2>&1; then
fuzzy=fzy
entry=$(find . -type f 2>/dev/null | fzy)
else
exit 1
fi

entry="$(find . -type f 2>/dev/null | "$fuzzy")"

case "$(file -biL "$entry")" in
*text*)
"${VISUAL:-$EDITOR}" "$entry" ;;


불러오는 중...
취소
저장