Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
smartcd: options -i & -F used in fd are unnecessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodesOfRishi committed Dec 17, 2021
1 parent 7b87b53 commit 3025e1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions smartcd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __smartcd__() {

# no. of unique recently visited directories smartcd to remember
export SMARTCD_HIST_SIZE=${SMARTCD_HIST_SIZE:-"50"}
export SMARTCD_VERSION="v1.3.0"
export SMARTCD_VERSION="v1.3.1"

# options customizations
export SMARTCD_CLEANUP_OPT=${SMARTCD_CLEANUP_OPT:-"--cleanup"} # option for cleanup of log file
Expand Down Expand Up @@ -57,9 +57,9 @@ __smartcd__() {
local selected_entry=""
validate_rec_listing_cmd
if [[ ${SMARTCD_REC_LISTING_CMD} == "" ]]; then
selected_entry=($(fd --hidden --exclude .git/ --type d -i -F | fzf --exit-0 --query="${path_argument}"))
selected_entry=($(fd --hidden --exclude .git/ --type d | fzf --exit-0 --query="${path_argument}"))
else
selected_entry=($(fd --hidden --exclude .git/ --type d -i -F | fzf --exit-0 --query="${path_argument}" --preview "${SMARTCD_REC_LISTING_CMD} {}"))
selected_entry=($(fd --hidden --exclude .git/ --type d | fzf --exit-0 --query="${path_argument}" --preview "${SMARTCD_REC_LISTING_CMD} {}"))
fi

if [[ ${selected_entry} = "" ]]; then
Expand Down Expand Up @@ -104,7 +104,7 @@ __smartcd__() {
find_parent_dir_paths() {
_path=${PWD%/*}
while [[ ${_path} != "" ]]; do
fd --exclude .git/ --search-path ${_path} -t d --max-depth=1 -i -H -F
fd --exclude .git/ --search-path ${_path} -t d --max-depth=1 -H
_path=${_path%/*}
done
}
Expand Down

0 comments on commit 3025e1b

Please sign in to comment.