Discussion:
[iterm2-discuss] Dynamic Profiles: Add "hidden search options"
Steve G
2018-07-30 11:56:04 UTC
Permalink
Recently discovered the handiness of dynamic profiles and I wrote a tool
that renders my ssh config files into a set of dynamic profiles with
support for tags and so on.

However I have 1 thing I can't solve in a clean way:
In my ssh config I have more than one pattern for a host, usually the
actual server name and a friendly name:
eg Host projectname-www sl012345v

My code adds profiles with a custom command using the first pattern, so the
above example would have "ssh projectname-www" as command and thus looking
for projectname-www in the profiles list would work.
I can't however, look for the actual hostname (I often get a query to find
data on server X, but unless I'm actually connecting to a specific
projects' server, I don't know the associations by head).

Is there a clean way to let me search based on something else as well that
is not a tag (having a submenu item per server in the profiles menu is not
something I'm looking forward too, I have a lot of servers for a lot of
projects).
I was looking in the direction of a "hidden tag" or a hidden search field
something, but can't seem to find anything that matches or is usable for
the purpose.

So basically I want to be able to search for the profile via both "
projectname-www" and "sl12345v" for that single profile without those being
tags.
I use tags like "production" "client name" etc and those would be rendered
useless otherwise.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
George Nachman
2018-07-31 04:58:21 UTC
Permalink
Only the profile name and tags are searched, but perhaps a nested tag would
solve your problem. You said the reason you don't want to use a tag is
because it would create a proliferation of submenus within the Profiles
menu, making it hard to find the submenus you care about. If you use tags
like "hostname/sl12345v" then you'll get a top level "hostnames" menu. You
could search for sl12345v and get profiles with tag hostname/sl12345v as
search results.
Post by Steve G
Recently discovered the handiness of dynamic profiles and I wrote a tool
that renders my ssh config files into a set of dynamic profiles with
support for tags and so on.
In my ssh config I have more than one pattern for a host, usually the
eg Host projectname-www sl012345v
My code adds profiles with a custom command using the first pattern, so
the above example would have "ssh projectname-www" as command and thus
looking for projectname-www in the profiles list would work.
I can't however, look for the actual hostname (I often get a query to find
data on server X, but unless I'm actually connecting to a specific
projects' server, I don't know the associations by head).
Is there a clean way to let me search based on something else as well that
is not a tag (having a submenu item per server in the profiles menu is not
something I'm looking forward too, I have a lot of servers for a lot of
projects).
I was looking in the direction of a "hidden tag" or a hidden search field
something, but can't seem to find anything that matches or is usable for
the purpose.
So basically I want to be able to search for the profile via both "
projectname-www" and "sl12345v" for that single profile without those
being tags.
I use tags like "production" "client name" etc and those would be rendered
useless otherwise.
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Steve G
2018-07-31 05:26:33 UTC
Permalink
Never thought about using nested tags like that, but those sound like an
quasi ideal situation. I'll modify my tool accordingly.
Thank you!

In case anyone ending up here is is looking for the same functionality,
it's open source: https://github.com/bedezign/ssh-to-iterm2/
Post by George Nachman
Only the profile name and tags are searched, but perhaps a nested tag
would solve your problem. You said the reason you don't want to use a tag
is because it would create a proliferation of submenus within the Profiles
menu, making it hard to find the submenus you care about. If you use tags
like "hostname/sl12345v" then you'll get a top level "hostnames" menu. You
could search for sl12345v and get profiles with tag hostname/sl12345v as
search results.
Post by Steve G
Recently discovered the handiness of dynamic profiles and I wrote a tool
that renders my ssh config files into a set of dynamic profiles with
support for tags and so on.
In my ssh config I have more than one pattern for a host, usually the
eg Host projectname-www sl012345v
My code adds profiles with a custom command using the first pattern, so
the above example would have "ssh projectname-www" as command and thus
looking for projectname-www in the profiles list would work.
I can't however, look for the actual hostname (I often get a query to
find data on server X, but unless I'm actually connecting to a specific
projects' server, I don't know the associations by head).
Is there a clean way to let me search based on something else as well
that is not a tag (having a submenu item per server in the profiles menu is
not something I'm looking forward too, I have a lot of servers for a lot of
projects).
I was looking in the direction of a "hidden tag" or a hidden search field
something, but can't seem to find anything that matches or is usable for
the purpose.
So basically I want to be able to search for the profile via both "
projectname-www" and "sl12345v" for that single profile without those
being tags.
I use tags like "production" "client name" etc and those would be
rendered useless otherwise.
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
KellyC
2018-08-01 13:37:42 UTC
Permalink
I have a play that creates my iTerm2 dynamic profile file from ansible
inventory groups. For each system, it adds tags for each of the members of
the hierarchy of groups in which that system resides.

So I can search for parts of the system name or parts of any of the names
of the groups.
eg: <type>_<local> or <type>_prod vs <type>_test
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...