4 ms·
This is great, thank you! Just a couple of minor changes to handle softlinks to folders... function fcd() { local dir; while true; do # exit
by msravi 4y ago
This is great, thank you! Just a couple of minor changes to handle softlinks to folders...
function fcd() {
local dir;
while true; do
# exit with ^D
dir="$(ls -a1F | grep '[/@]$' | grep -v '^./$' | sed 's/@$//' | fzf --height 40% --reverse --no-multi --preview 'pwd' --preview-window=up,1,border-none --no-info)"
if [[ -z "${dir}" ]]; then
break
elif [[ -d "${dir}" ]]; then
cd "${dir}"
fi
done
}