fix(tmux): use the offset parameter when extracting the first letter

This commit is contained in:
张天泽 2024-03-02 11:14:49 +08:00 committed by GitHub
commit fc59cbbde0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -49,7 +49,7 @@ fi
# ALIASES
function _build_tmux_alias {
eval "function $1 {
if [[ -z \$1 ]] || [[ \${1::1} == '-' ]]; then
if [[ -z \$1 ]] || [[ \${1:0:1} == '-' ]]; then
tmux $2 \"\$@\"
else
tmux $2 $3 \"\$@\"