From f58f1f059278eb27e3a3f0a4cf1c08cf77710f39 Mon Sep 17 00:00:00 2001 From: Gardouille Date: Sat, 16 Sep 2023 07:33:24 +0200 Subject: [PATCH] Replace exa with eza --- zshrc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/zshrc b/zshrc index 9257534..7d93db6 100644 --- a/zshrc +++ b/zshrc @@ -24,7 +24,7 @@ alias mv='mv --interactive' alias rm='rm --interactive' # ls shortcut {{{ -if [ ! $(command -v exa) ]; then +if [ ! $(command -v eza) ]; then ## with ls {{{ alias ll='ls -l' ## Show hidden files @@ -41,9 +41,10 @@ if [ ! $(command -v exa) ]; then alias lld='ls -l --directory */ --human-readable' alias lr='ls --recursive | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\''' ## }}} - ## with exa {{{ + ## with eza (forked from exa) {{{ else - alias ll='exa --color=always --long --group --git' + alias exa=eza + alias ll='eza --color=always --long --group --git' ## Show hidden files alias la='ll --all --sort .name' ## Show hidden only @@ -2086,10 +2087,10 @@ ff() { ## Manage argument {{{ if [ "${#}" -eq "0" ]; then ## Default command without args - dir=$(find . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 {} | head --lines=20' --no-multi) && + dir=$(find . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) && else ## If at least one argument was given, add it to fzf query - dir=$(find . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && + dir=$(find . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && fi ## }}} @@ -2108,10 +2109,10 @@ ffh() { ## Manage argument {{{ if [ "${#}" -eq "0" ]; then ## Default command without args - dir=$(find . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 {} | head --lines=20' --no-multi) && + dir=$(find . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) && else ## If at least one argument was given, add it to fzf query - dir=$(find . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && + dir=$(find . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && fi ## }}} @@ -2130,10 +2131,10 @@ ffa() { ## Manage argument {{{ if [ "${#}" -eq "0" ]; then ## Default command without args - dir=$(fd -uu --search-path / --type d --type symlink | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 1 {} | head --lines=20' --no-multi) && + dir=$(fd -uu --search-path / --type d --type symlink | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 1 {} | head --lines=20' --no-multi) && else ## If at least one argument was given, add it to fzf query - dir=$(fd -uu --search-path / --type d --type symlink | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 1 {} | head --lines=20' --no-multi --query "${*} ") && + dir=$(fd -uu --search-path / --type d --type symlink | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 1 {} | head --lines=20' --no-multi --query "${*} ") && fi ## }}} @@ -2172,7 +2173,7 @@ ffu() { # Search with fd (after few tests, fdfind is fareway better than find… even on small tree) # Check for symlinked files too # Allow to give arguments to prefill fzf request -# Display a directory preview tree of the selected file with exa +# Display a directory preview tree of the selected file with eza # Move to the directory of the selected file fff() { local file @@ -2181,10 +2182,10 @@ fff() { ## Manage argument {{{ if [ "${#}" -eq "0" ]; then ## Default command without args - file=$(fd -uu --type file --type symlink | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 $(dirname {}) | head --lines=20' --no-multi) && + file=$(fd -uu --type file --type symlink | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 $(dirname {}) | head --lines=20' --no-multi) && else ## If at least one argument was given, add it to fzf query - file=$(fd -uu --type file --type symlink | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 2 $(dirname {}) | head --lines=20' --no-multi --query "${*} ") && + file=$(fd -uu --type file --type symlink | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 $(dirname {}) | head --lines=20' --no-multi --query "${*} ") && fi ## }}} @@ -2195,7 +2196,7 @@ fff() { # cf - fuzzy cd from anywhere {{{ # Search with fd (fdfind is perfect to search on /) # Allow to give arguments to prefill fzf request -# Display a directory preview tree of the selected file with exa +# Display a directory preview tree of the selected file with eza # Move to the directory of the selected file cf() { local file @@ -2203,10 +2204,10 @@ cf() { ## Manage argument {{{ if [ "${#}" -eq "0" ]; then ## Default command without args - file=$(fd -uu --search-path / | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 1 $(dirname {}) | head --lines=20' --no-multi) && + file=$(fd -uu --search-path / | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 1 $(dirname {}) | head --lines=20' --no-multi) && else ## If at least one argument was given, add it to fzf query - file=$(fd -uu --search-path / | fzf --prompt='cd> ' --height=50% --preview 'exa --tree --level 1 $(dirname {}) | head --lines=20' --no-multi --query "${*} ") && + file=$(fd -uu --search-path / | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 1 $(dirname {}) | head --lines=20' --no-multi --query "${*} ") && fi ## }}}