Tmux & Container : Use parse_alnum instead of parse_simplify.

This commit is contained in:
Dmitry Voronin 2024-01-31 18:40:02 +03:00
parent e6327c3c43
commit 2836c4c0ab
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@ function ca() {
# Set default name.
# [[ "${name}" = "" ]] && name="main"
[[ "${name}" = "" ]] && name=$(parse_simplify "${PWD##*/}")
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
# Append box prefix.
name="box-${name}"
@ -39,7 +39,7 @@ function ck() {
local name="${1}"
# Set default name.
[[ "${name}" = "" ]] && name=$(parse_simplify "${PWD##*/}")
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
# Append box prefix.
name="box-${name}"

View file

@ -6,7 +6,7 @@ function ta() {
# Set default name.
# [[ "${name}" = "" ]] && name="main"
[[ "${name}" = "" ]] && name=$(parse_simplify "${PWD##*/}")
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
# Create session.
tmux new-session -s "${name}" -d &> /dev/null
@ -39,7 +39,7 @@ function tl() {
function tns() {
local name="${1}"
[[ "${name}" = "" ]] && name="${PWD##*/}"
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
tmux rename-session "${name}"
}
@ -49,7 +49,7 @@ function tns() {
function tnw() {
local name="${1}"
[[ "${name}" = "" ]] && name="${PWD##*/}"
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
tmux rename-window "${name}"
}
@ -60,7 +60,7 @@ function tnw() {
function tk() {
local name="${1}"
[[ "${name}" = "" ]] && name=$(parse_simplify "${PWD##*/}")
[[ "${name}" = "" ]] && name=$(parse_alnum "${PWD##*/}")
tmux kill-session -t "${name}"
}