Configs to load cmdlets from filesystem #4116
Replies: 3 comments
-
Neat! Some things to consider:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for your hints! |
Beta Was this translation helpful? Give feedback.
-
Changes are made in this gadget. Events are not defined in separate files anymore. I put every thing into a snippet_vault.json file and use New code is here. 9d54aca3-160a-47a0-bf20-33e5a3e53752.mp4 |
Beta Was this translation helpful? Give feedback.
-
Initially, I was trying to do something like launching a predefined layout and runs
ssh ...
like tmux or zellij does. However, I think it is not safe to expose these information, such as IP addresses and passwords, in dotfiles. It seems that loadingssh ...
andscp ...
cmdlets from local filesystem would be safer and this requires a programmatic configuration system, so I decide to do it in wezterm which uses lua instead of (such as) kdl in zellij.As I'm working on this, I found that I could turn it into a general cmdlet loading gadget. Basically, I bind
Ctrl+Shift+e
to bring up a prompt input for inserting the file name and split counts of the new pane.Here is an example of spawning a new tab with one or more panes, and
ssh
into remote machines, and launch nushel, and load a nushell module. This chain is defined in a local file named ssh127.event.a99e32f4-874d-43fd-b2c8-3b06d30304c7.mp4
The configuration is here. It's quite naive but it some how saves me some time when connecting to remote machines.
Any advices are welcome!
Beta Was this translation helpful? Give feedback.
All reactions