tmux-xpanes
tmux-xpanes copied to clipboard
Idea: Alias feature
Here is my rough idea. New feature called alias feature. Any feedbacks is welcome.
For now, xpanes
has following problems.
- Users cannot set pane's title provided by
-t
individualy. - Re-define
xpanes
with built-inalias
is lazy.- Many escaping
- i.e:
alias prod-servers="xpanes -c 'ssh {}' \"-i key1 user1@server1\" \"-i key2 user2@server2\" "
Alias feature would solve above problems.
Creating file. It would be TSV, YAML or JSON.
${HOME}/.config/tmux-xpanes/aliases/prod-servers.yaml
- cmd: ssh server1
title: server1
- cmd: ssh server2
title: server2
- cmd: ssh server3
title: server3
- cmd: ssh server4
title: server4
Execute with --alias
, -A
+ Alias name
xpanes -A prod-servers
Result
+-------------------------------+------------------------------+
│$ ssh server1 │$ ssh server2 │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
+-[server1]---------------------+-[server2]--------------------+
│$ ssh server3 │$ ssh server4 │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │
+-[server3]---------------------+-[server4]--------------------+
hi,
I will try it out. I tested it a while ago with bash alias ... with that kind of stuff .. but using a yaml file looks great, because we can push them into a Git repo.
did this ever get pushed out? it would totally solve my escape nightmare of aliases right now lol