This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/find.sh

11 lines
335 B
Bash
Raw Normal View History

2023-11-25 23:24:09 +03:00
# Find all file extensions.
2023-12-07 01:44:42 +03:00
function find_ext() {
2023-12-05 21:50:45 +03:00
local types=($(find -type f | sed -e "s/.*\///" -e "s/^\.//" -e "/\./!d" -e "s/.*\.//"))
echo "${types[@]}" | tr ' ' '\n' | sort -u
}
2023-12-07 01:44:42 +03:00
# Find all module functions.
function find_functions() {
cat "${DOTFILES_PATH}"/* | grep "^function.*()" | sed -e "s/^function //" -e "s/().*//"
}