Fix follow symlink option for find…

This commit is contained in:
Jeremy Gardais 2023-11-02 11:47:39 +01:00
parent 0efcde9399
commit 5b82144876
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 4 additions and 4 deletions

8
zshrc
View File

@ -2091,10 +2091,10 @@ function ff() {
## Manage argument {{{ ## Manage argument {{{
if [ "${#}" -eq "0" ]; then if [ "${#}" -eq "0" ]; then
## Default command without args ## Default command without args
dir=$(find . -xtype d --follow -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) && dir=$(find -L . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) &&
else else
## If at least one argument was given, add it to fzf query ## If at least one argument was given, add it to fzf query
dir=$(find . -xtype d --follow -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && dir=$(find -L . -xtype d -not -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") &&
fi fi
## }}} ## }}}
@ -2113,10 +2113,10 @@ function ffh() {
## Manage argument {{{ ## Manage argument {{{
if [ "${#}" -eq "0" ]; then if [ "${#}" -eq "0" ]; then
## Default command without args ## Default command without args
dir=$(find . -xtype d --follow -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) && dir=$(find -L . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi) &&
else else
## If at least one argument was given, add it to fzf query ## If at least one argument was given, add it to fzf query
dir=$(find . -xtype d --follow -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") && dir=$(find -L . -xtype d -path "*/.*" | fzf --prompt='cd> ' --height=50% --preview 'eza --tree --level 2 {} | head --lines=20' --no-multi --query "${*} ") &&
fi fi
## }}} ## }}}