Skip to content

Commit

Permalink
feat: support -Ns as alias for -Namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Dec 14, 2018
1 parent d0302a6 commit e81f7c5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Cmdlets/GetKubeDeploymentCmdlet.cs
Expand Up @@ -14,6 +14,7 @@ namespace Kubectl.Cmdlets {
[OutputType(new[] { typeof(DeploymentV1) })]
public sealed class GetKubeDeploymentCmdlet : KubeApiCmdlet {
[Parameter(ValueFromPipelineByPropertyName = true)]
[Alias("Ns")]
public string Namespace { get; set; }

[Parameter()]
Expand Down
1 change: 1 addition & 0 deletions src/Cmdlets/GetKubeLogCmdlet.cs
Expand Up @@ -15,6 +15,7 @@ namespace Kubectl.Cmdlets {
[OutputType(new[] { typeof(string) })]
public class GetKubeLogCmdlet : KubeApiCmdlet {
[Parameter(ValueFromPipelineByPropertyName = true)]
[Alias("Ns")]
public string Namespace { get; set; }

[Parameter(Position = 0, Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
Expand Down
1 change: 1 addition & 0 deletions src/Cmdlets/GetKubePodCmdlet.cs
Expand Up @@ -14,6 +14,7 @@ namespace Kubectl.Cmdlets {
[OutputType(new[] { typeof(PodV1) })]
public sealed class GetKubePodCmdlet : KubeApiCmdlet {
[Parameter(ValueFromPipelineByPropertyName = true)]
[Alias("Ns")]
public string Namespace { get; set; }

[Parameter()]
Expand Down
3 changes: 2 additions & 1 deletion src/Cmdlets/GetKubeResourceCmdlet.cs
Expand Up @@ -14,7 +14,8 @@ namespace Kubectl.Cmdlets {
[OutputType(new[] { typeof(KubeResourceV1) })]
public sealed class GetKubeResourceCmdlet : KubeApiCmdlet {
[Parameter(ValueFromPipelineByPropertyName = true)]
public string Namespace { get; set; } = "default";
[Alias("Ns")]
public string Namespace { get; set; }

[Parameter(Mandatory = true, Position = 0, ValueFromPipelineByPropertyName = true)]
public string Kind { get; set; }
Expand Down

0 comments on commit e81f7c5

Please sign in to comment.