−ifs
This commit is contained in:
parent
76cd248697
commit
15689cb0fe
1 changed files with 4 additions and 6 deletions
10
sh/tmux.sh
10
sh/tmux.sh
|
@ -25,13 +25,10 @@ rwx_tmux_server() {
|
||||||
}
|
}
|
||||||
rwx_tmux_servers() {
|
rwx_tmux_servers() {
|
||||||
local active=\"\$(rwx_tmux_server)\"
|
local active=\"\$(rwx_tmux_server)\"
|
||||||
local ifs=\"\${IFS}\"
|
|
||||||
local name path text
|
local name path text
|
||||||
local paths=\"\$(lsof -U |
|
local paths=\"\$(lsof -U |
|
||||||
awk \"/^tmux:.*\\(LISTEN\\)\$/ {print \\\$9}\")\"
|
awk \"/^tmux:.*\\(LISTEN\\)\$/ {print \\\$9}\")\"
|
||||||
IFS=\"
|
while IFS= read -r path; do
|
||||||
\"
|
|
||||||
for path in \${paths}; do
|
|
||||||
name=\"\$(basename \"\${path}\")\"
|
name=\"\$(basename \"\${path}\")\"
|
||||||
text=\"\${text}\\
|
text=\"\${text}\\
|
||||||
#[fg=default]\\
|
#[fg=default]\\
|
||||||
|
@ -47,8 +44,9 @@ rwx_tmux_servers() {
|
||||||
#[bg=##282828]\${name}\\
|
#[bg=##282828]\${name}\\
|
||||||
#[bg=##181818] \\
|
#[bg=##181818] \\
|
||||||
\"
|
\"
|
||||||
done
|
done <<EOF
|
||||||
IFS=\"\${ifs}\"
|
\${paths}
|
||||||
|
EOF
|
||||||
echo \"\${text}\"
|
echo \"\${text}\"
|
||||||
}
|
}
|
||||||
rwx_tmux_status() {
|
rwx_tmux_status() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue