bash: changed fzf to bemenu in pf()

also did a bugfix where if you don't select no nothing you would cd into
$root_dir
This commit is contained in:
Vitor Gonçalves 2023-12-05 01:47:53 -03:00
parent a0c6f7b7bf
commit 58a4050265
Signed by: vitorg
GPG Key ID: B90BF113DF56EB41
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@
pf() {
# project finder
root_dir="$HOME/docs/src"
selected_dir=$(find "$root_dir" -maxdepth 1 -type d | sed "s:$root_dir::;s:/::;/^$/ d" | fzf)
cd "$root_dir"/"$selected_dir" || return
selected_dir=$(find "$root_dir" -maxdepth 1 -type d | sed "s:$root_dir::;s:/::;/^$/ d" | BEMENU_BACKEND=curses bemenu -p "Choose directory") && cd "$root_dir"/"$selected_dir" || return
}
xb() {