exa: add --sort=type

This commit is contained in:
FollieHiyuki 2021-04-03 21:28:33 +03:00
parent 6b30584767
commit 2fdcb6f680
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
9 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@ export FZF_DEFAULT_OPTS="--multi --layout=reverse --inline-info
export FZF_DEFAULT_COMMAND="fd --type f --follow --hidden --exclude .git"
export FZF_CTRL_T_OPTS="--no-height --preview-window 'left:60%' --preview '$HOME/.local/bin/garbage/preview {} 2>/dev/null'"
export FZF_CTRL_T_COMMAND="fd --follow --hidden --exclude .git"
export FZF_ALT_C_OPTS="--preview 'exa -1a --color always --icons {} 2>/dev/null'"
export FZF_ALT_C_OPTS="--preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null'"
export FZF_ALT_C_COMMAND="fd --type d --follow --hidden --exclude .git"
export FZF_TMUX=1
# ibus

View File

@ -66,7 +66,7 @@ set -gx FZF_DEFAULT_OPTS "--multi --layout=reverse --inline-info
set -gx FZF_DEFAULT_COMMAND "fd --type f --follow --hidden --exclude .git"
set -gx FZF_CTRL_T_OPTS "--no-height --preview-window 'left:60%' --preview '$HOME/.local/bin/garbage/preview {} 2>/dev/null'"
set -gx FZF_CTRL_T_COMMAND "fd . \$dir --follow --hidden --exclude .git"
set -gx FZF_ALT_C_OPTS "--preview 'exa -1a --color always --icons {} 2>/dev/null'"
set -gx FZF_ALT_C_OPTS "--preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null'"
set -gx FZF_ALT_C_COMMAND "fd --type d --follow --hidden --exclude .git"
set -gx FZF_TMUX 1
# ibus

View File

@ -8,7 +8,7 @@
. "$(dirname "$0")"/.nnn-plugin-helper
if [ "$(cmd_exists fzf)" -eq "0" ]; then
sel=$(fd --type d --follow --hidden --exclude .git | fzf --preview 'exa -1a --color always --icons {} 2>/dev/null')
sel=$(fd --type d --follow --hidden --exclude .git | fzf --preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null')
else
exit 1
fi

View File

@ -35,7 +35,7 @@ case "$1" in
echo ""
else
echo "\0"
exa -1a --color always --icons "$1"
exa -1a --sort=type --color always --icons "$1"
fi ;;
application/zip | application/x-tar | application/x-rar | application/x-7z-compressed | application/x-xz | application/x-bzip2 | application/x-gzip)
atool -l -q "$1" | tail -n +3 | awk -F' ' '{print $NF}' ;;

View File

@ -151,7 +151,7 @@ command! fzf : let $FZF_RES = term('fzf --preview-window left --preview "$HOME/.
\| endif
" fzf dir
command! fzd : let $FZF_RES = term('fd --type d --follow --hidden --exclude .git | fzf --preview "exa -1a --color always --icons {} 2>/dev/null" 2> /dev/tty')
command! fzd : let $FZF_RES = term('fd --type d --follow --hidden --exclude .git | fzf --preview "exa -1a --sort=type --color always --icons {} 2>/dev/null" 2> /dev/tty')
\| if $FZF_RES != ''
\| cd $FZF_RES
\| endif

View File

@ -56,7 +56,7 @@ export FZF_DEFAULT_OPTS="--multi --layout=reverse --inline-info
export FZF_DEFAULT_COMMAND="fd --type f --follow --hidden --exclude .git"
export FZF_CTRL_T_OPTS="--no-height --preview-window 'left:60%' --preview '$HOME/.local/bin/garbage/preview {} 2>/dev/null'"
export FZF_CTRL_T_COMMAND="fd --follow --hidden --exclude .git"
export FZF_ALT_C_OPTS="--preview 'exa -1a --color always --icons {} 2>/dev/null'"
export FZF_ALT_C_OPTS="--preview 'exa -1a --sort=type --color always --icons {} 2>/dev/null'"
export FZF_ALT_C_COMMAND="fd --type d --follow --hidden --exclude .git"
export FZF_TMUX=1
# ibus

View File

@ -34,7 +34,7 @@ zstyle ':fzf-tab:complete:_zlua:*' query-string input
zstyle ':fzf-tab:complete:kill:argument-rest' fzf-preview 'ps --pid=$word -o cmd --no-headers -w -w'
zstyle ':fzf-tab:complete:kill:argument-rest' fzf-flags '--preview-window=down:3:wrap'
zstyle ':fzf-tab:complete:kill:*' popup-pad 0 3
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1a --sort=type --color=always --icons $realpath'
zstyle ':fzf-tab:complete:cd:*' popup-pad 30 0
zstyle ":completion:*:git-checkout:*" sort false
# zstyle ":fzf-tab:*" fzf-flags '--color=bg+:23'

View File

@ -74,7 +74,7 @@ case "$1" in
mimetype=$(file --dereference --brief --mime-type -- "$1")
case "$mimetype" in
inode/directory)
exa -1a --color always --icons "$1" ;;
exa -1a --sort=type --color always --icons "$1" ;;
application/zip|application/x-tar|application/x-gzip)
atool -l -q "$1" | tail -n +3 | awk -F' ' '{print $NF}' ;;
image/vnd.djvu)

View File

@ -29,7 +29,7 @@ case "$1" in
mimetype=$(file --dereference --brief --mime-type -- "$1")
case "$mimetype" in
inode/directory)
exa -1a --color always --icons "$1" ;;
exa -1a --sort=type --color always --icons "$1" ;;
application/zip|application/x-tar|application/x-gzip)
atool -l -q "$1" | tail -n +3 | awk -F' ' '{print $NF}' ;;
image/vnd.djvu)