find : add find_types to find all filetypes.

This commit is contained in:
Dmitry Voronin 2023-11-25 21:47:52 +03:00
parent 0baff72656
commit 9a7c837395
3 changed files with 9 additions and 3 deletions

View file

@ -632,7 +632,7 @@ Command|Description
`ta [NAME]`|Attach to session by name. Default is `main`.
`td`|Detach from session.
`tl`|List all sessions.
`tr [NAME]`|Rename session. Uses current dir name by default.
`trn [NAME]`|Rename session. Uses current dir name by default.
`tn [NAME]`|Name window. Uses current dir name by default.
`tk [NAME]`|Kill session. Default is `main`.
`tka`|Kill all sessions.

View file

@ -0,0 +1,6 @@
# Find all file types recursively.
find_types()
{
local types=($(find -type f | sed "s/.*\.//"))
echo "${types[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '
}

View file

@ -19,8 +19,8 @@ alias td="tmux detach-client"
alias tl="tmux list-sessions"
# Rename current session. Uses current dir name by default.
# Usage: tr [NAME]
tr()
# Usage: trn [NAME]
trn()
{
local name="${1}"