9 path
="$FZF_PREVIEW_DIRECTORY/$filename"
11 # note, possibly this `find` does not yield the same file which given to us,
12 # due to hardlinks, but generally it does not alter previewing much.
13 path
=`find "$FZF_PREVIEW_DIRECTORY" -maxdepth 1 -inum "$inode" -print -quit`
15 # filename contains the "-> target" part if it's a symlink to "target"
16 #filename=${filename%% -> *}
19 mime
=`file -bL --mime-type "$path"`
25 local ansi_reset
=`tput sgr0`
29 echo -n "$ansi_codes$line$ansi_reset"
36 sed -e 's/\[\x00-\x1F\x7F\]//g'
41 # concat char- and block-special file's major and minor device numbers
42 # to unite their respective columns.
43 # note, we keep all the spaces before the major and minor numbers,
44 # although this is one space more than needed to pad off the previous column,
45 # but other files (not char- or block-special ones) in the directory are
46 # also padded to account the one extra space after the comma between the major
47 # and the minor numbers.
48 sed -e 's/^\([cb]\S\+\s\+\S\+\s\+\)\([0-9]\+\),\(\s\+\)\([0-9]\+\)/\1\3\2:\4/'
53 # remove permissions and n_links columns and
54 # put date and time before size.
55 sed -e "s/\(\S\+\s\+\S\+\)\(\s\+\S\+\)\s\+\(\S\+\s\+\S\+\)/\3\2/"
59 xattrs
=`getfattr --physical --dump --encoding=text "$path" 2>/dev/null`
62 ansi_codes
=`tput bold; tput setaf 5`
63 echo "$xattrs" | ornate_per_line
"$ansi_codes"
66 acls
=`getfacl --physical --omit-header --skip-base --absolute-names "$path" 2>/dev/null`
69 ansi_codes
=`tput bold; tput setaf 3`
70 echo "$acls" | ornate_per_line
"$ansi_codes"
76 pdftotext
-layout "$path" -
89 emlv
"$path" |
fold -w "$FZF_PREVIEW_COLUMNS" -s
94 ls -lAhgo ${LS_SORT_FLAGS[$LS_SORT_ORDER]} --time-style=long-iso
--indicator-style=slash
--color=always
"$path/" |\
98 elif [ -c "$path" -o -p "$path" ]
102 head -n ${FZF_PREVIEW_LINES:--0} "$path" | strip_ctrl_chars