diff --git a/.README.md b/.README.md index 0e94bb7..7eb1eb5 100644 --- a/.README.md +++ b/.README.md @@ -486,12 +486,18 @@ Command|Description ---|--- `ffmpeg_mux_audio `|Mux external audio into one container with video (replaces original audio). Run inside dir with original video. names should be the same for each video. -## Files. +## File. Command|Description ---|--- `o `|Open file with the default GUI app. +## Find. + +Command|Description +---|--- +`find_ext`|Find all file extensions recursively. + ## Fix. Contains simple fixes for various issues. diff --git a/.config/bash/module/find.sh b/.config/bash/module/find.sh index a4fd6cb..6f30ba3 100644 --- a/.config/bash/module/find.sh +++ b/.config/bash/module/find.sh @@ -1,7 +1,7 @@ -# Find all file types recursively. -find_types() +# Find all file extensions. +find_ext() { - local types=($(find -type f | sed "s/.*\.//")) + local types=($(find -type f | sed -e "s/.*\///" -e "s/^\.//" -e "/\./!d" -e "s/.*\.//")) echo "${types[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ' echo }