add support for fd-find for faster searching
This commit is contained in:
parent
a34cbeca73
commit
e02e6c2620
1 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,12 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
HOMEDIR=~
|
HOMEDIR=~
|
||||||
SEL_DIR=$(find ~ -not -path "*/.*" -type d -print 2>/dev/null | fzf)
|
which fd > /dev/null
|
||||||
|
if [ 0 = $? ]; then
|
||||||
|
SEL_DIR=$(fd --type directory | fzf) # if fd-find is installed
|
||||||
|
else
|
||||||
|
SEL_DIR=$(find ~ -not -path "*/.*" -type d -print 2>/dev/null | fzf)
|
||||||
|
fi
|
||||||
SEL_NAME=$(basename "$SEL_DIR")
|
SEL_NAME=$(basename "$SEL_DIR")
|
||||||
|
|
||||||
new_session_name(){
|
new_session_name(){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue