lib/utilities: fix `_bash-it-get-component-type-from-path()`
Account for plugins with names that contain periods.pull/1933/head
parent
44ddd3936d
commit
fe102ff505
|
|
@ -16,13 +16,14 @@ _bash-it-get-component-name-from-path() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_bash-it-get-component-type-from-path() {
|
_bash-it-get-component-type-from-path() {
|
||||||
|
local filename
|
||||||
# filename without path
|
# filename without path
|
||||||
filename="${1##*/}"
|
filename="${1##*/}"
|
||||||
# filename without extension
|
# filename without extension
|
||||||
filename="${filename%.bash}"
|
filename="${filename%.bash}"
|
||||||
# extension without priority or name
|
# extension without priority or name
|
||||||
#filename="${filename#*.}"
|
filename="${filename##*.}"
|
||||||
echo "${filename#*.}" #| cut -d '.' -f 2
|
echo "${filename}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function searches an array for an exact match against the term passed
|
# This function searches an array for an exact match against the term passed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue