searchCD, fastdu upgrade, whatismyip.. try out!
This commit is contained in:
18
qcd_function
18
qcd_function
@@ -209,6 +209,24 @@ function ncd() {
|
||||
fi
|
||||
}
|
||||
|
||||
function scd() {
|
||||
# search cd, find first recursively match in a folder
|
||||
[[ "$1" = "-h" ]] && {
|
||||
echo Search cd. First argument path to search, optionally second argument where to search from.
|
||||
return
|
||||
}
|
||||
local cdto cdfrom
|
||||
[[ -z "$2" ]] && {
|
||||
cdfrom="."
|
||||
} || {
|
||||
cdfrom="$2"
|
||||
}
|
||||
cdto=$( find "$cdfrom" -mindepth 1 -type d -iname "*$1*" | sort -V | head -n 1 )
|
||||
echo $cdto
|
||||
[[ -z "$cdto" ]] && return
|
||||
\cd "$cdto"
|
||||
} # scd ends
|
||||
|
||||
## File processing functions
|
||||
|
||||
function foldermenu_prompt {
|
||||
|
||||
Reference in New Issue
Block a user