diff --git a/.README.md b/.README.md index d26bee5..0e94bb7 100644 --- a/.README.md +++ b/.README.md @@ -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. diff --git a/.config/bash/module/find.sh b/.config/bash/module/find.sh new file mode 100644 index 0000000..35fe775 --- /dev/null +++ b/.config/bash/module/find.sh @@ -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' ' ' +} diff --git a/.config/bash/module/tmux.sh b/.config/bash/module/tmux.sh index 0d22bc2..2c9f5bb 100644 --- a/.config/bash/module/tmux.sh +++ b/.config/bash/module/tmux.sh @@ -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}"