introducing wcd
This commit is contained in:
@@ -399,6 +399,15 @@ function scd() {
|
|||||||
\cd "$cdto"
|
\cd "$cdto"
|
||||||
} # scd ends
|
} # scd ends
|
||||||
|
|
||||||
|
function wcd() {
|
||||||
|
# cd to folder that matches "which" dirname
|
||||||
|
if [[ "$1" = "-h" ]] || [[ -z "$1" ]]; then
|
||||||
|
echo which-cd. Give executable name to cd to the path of the executable
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
\cd $( dirname $( which "$1" ) )
|
||||||
|
}
|
||||||
|
|
||||||
## File processing functions
|
## File processing functions
|
||||||
|
|
||||||
function foldermenu_prompt {
|
function foldermenu_prompt {
|
||||||
|
|||||||
Reference in New Issue
Block a user