Home

tmpl @main - refs - log -
-
https://git.jolheiser.com/tmpl.git
Template automation
tree log patch
chore: update nushell completions Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmXH8A8ACgkQuFOtpdp7 v3pwGg/+MpQjbfceSTjzZ3QVfOjEhxo6NdSBZScZyGUJRXCOrP/EHcSXSzCD4M6I iGgVvMPbtTRJaR1eKASjWXW64HbTrL/wa4Nh/Ls5UhDNWVZz9nycZ6O2GgW6Wpf7 0ebeIqRwtNnHBzxjuOv8FO1lcf4NLX/6X21W3dO1gfcLXvHqfS0amsqxkz+QGEoa 0Tp1v96FBC1BF1CJnCmrhfSnGFQoiT921M3iE+fHNkhWleSDrPrqp02jH2TbaHqb Ki4iYZXYlwteRfTmZXI01xxvST0J7JUqZsB/MNKy/UzhEv2J2js0XjzUnBwnI6Ms EMbtme6bvTt7ho6D0g8BwcbzbzSTFcpEoiDqJJ1C6Far0bHRlhorUVdsOqSLmLjE scWR84+QMgxsamIYmlkItewuWxa8JKZAStmK0lkA605x2RGo/2GmAu9NtsPhVcH9 r/iLQBUh8IH4/03WCFjL++3gFmd0ZH/jYvIivro3r8xqlHDgMaRuviAB636bghfp O6cCBbF2cKqEJ67IJ+CcXoDu9u1IvYHvvjIn6qB0c4v9Vwv4EFa0D47ecTWiOoUl XoU5wvhjG3l5Mvm1poxRC8L6d+kUD8hMfRkGI2F0SFVGcWsPoBETx5E8Yd0ZE+8c +HqqnhArK9NTyW3FB4Qmwiv5/XSs5MAD5x9X95KqHgAW56g+JzQ= =U3+m -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
7 months ago
1 changed files, 16 additions(+), 16 deletions(-)
M contrib/tmpl-completions.nu -> contrib/tmpl-completions.nu
diff --git a/contrib/tmpl-completions.nu b/contrib/tmpl-completions.nu
index ca99993f113296e9d27779213188b40cbb79513e..97927cd3b6a4ca01469da0af5aca7c8351bf42bb 100644
--- a/contrib/tmpl-completions.nu
+++ b/contrib/tmpl-completions.nu
@@ -15,8 +15,8 @@ # Template automation
 export extern "tmpl" [
   --registry(-r): string # Registry directory of tmpl (default: ~/.tmpl) [$TMPL_REGISTRY]
   --source(-s): string   # Short-name source to use [$TMPL_SOURCE]
-  --help(-h): bool       # Show help
+  --help(-h)             # Show help
-  --version(-v): bool    # Show version
+  --version(-v)          # Show version
 ]
 
 # Download a template
@@ -24,19 +24,19 @@ export extern "tmpl download" [
   repo_url: string     # Repository URL
   name: string         # Local name for template
   --branch(-b): string # Branch to clone (default: "main") [$TMPL_BRANCH]
-  --help(-h): bool     # Show help
+  --help(-h)           # Show help
 ]
 
 # Manage tmpl environment variables
 export extern "tmpl env" [
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # Set a tmpl environment variable
 export extern "tmpl env set" [
   key: string@"_tmpl_env_keys" # Env key
   value: string                # Env value
-  --help(-h): bool             # Show help
+  --help(-h)                   # Show help
 ]
 
 # Unset a tmpl environment variable
@@ -46,19 +46,19 @@ ]
 
 # Initialize a blank tmpl template
 export extern "tmpl init" [
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # List all templates in registry
 export extern "tmpl list" [
-  --json: bool     # Output in JSON
+  --json           # Output in JSON
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # Remove a template
 export extern "tmpl remove" [
   name: string     # Name of the template to remove
-  --help(-h): bool #Show help
+  --help(-h)       #Show help
 ]
 
 # Restore templates present in the registry, but missing archives
@@ -70,7 +70,7 @@ # Save a local template
 export extern "tmpl save" [
   path: string     # Path to the local template
   name: string     # Name of the template
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # Work with tmpl sources
@@ -82,20 +82,20 @@ # Add a tmpl source
 export extern "tmpl source add" [
   base_url: string # Base URL
   name: string     # Name
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # Remove a tmpl source
 export extern "tmpl source remove" [
   name: string@"_tmpl_source_list" # Source to remove
-def _tmpl_source_list [] {
 def _tmpl_template_list [] {
+# Template automation
 ]
 
 # Test whether a directory is a valid tmpl template
 export extern "tmpl test" [
   path?: string    # Path to test (default: ".")
-  --help(-h): bool # Show help
+  --help(-h)       # Show help
 ]
 
 # Update a template
@@ -108,8 +108,8 @@ # Use a template
 export extern "tmpl use" [
   name: string@"_tmpl_template_list" # The template to execute
   dest?: path                       # Destination for the template (default: ".")
-  --defaults: bool                  # Use template defaults
-def _tmpl_template_list [] {
+  ^tmpl list --json | from json | each { |it| { value: $it.Name, description: (if $it.Path != "" { $it.Path } else { $"($it.Repository)@($it.Branch)" }) } }
-def _tmpl_template_list [] {
+  ^tmpl list --json | from json | each { |it| { value: $it.Name, description: (if $it.Path != "" { $it.Path } else { $"($it.Repository)@($it.Branch)" }) } }
 def _tmpl_env_keys [] {
+  --help(-h)                        # Show help
 ]