Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Alias feature #106

Open
greymd opened this issue Nov 20, 2018 · 2 comments
Open

Idea: Alias feature #106

greymd opened this issue Nov 20, 2018 · 2 comments
Labels
idea Idea for new feature or improvement

Comments

@greymd
Copy link
Owner

greymd commented Nov 20, 2018

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-in alias 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]--------------------+
@greymd greymd added the idea Idea for new feature or improvement label Nov 20, 2018
@linuxmail
Copy link

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.

@kurktchiev
Copy link

did this ever get pushed out? it would totally solve my escape nightmare of aliases right now lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Idea for new feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants