Skip to content

Add 'env' alias for 'environment' command#3219

Merged
knative-prow[bot] merged 2 commits into
knative:mainfrom
RayyanSeliya:add-env-alias
Nov 21, 2025
Merged

Add 'env' alias for 'environment' command#3219
knative-prow[bot] merged 2 commits into
knative:mainfrom
RayyanSeliya:add-env-alias

Conversation

@RayyanSeliya
Copy link
Copy Markdown
Contributor

Changes

  • 🎁 Add env alias for environment command to improve developer experience

/kind enhancement

Fixes #3218

Why: The environment command is the longest command in the CLI (11 characters) and lacks a short alias, making it inconsistent with other commands like repositoryrepo and listls. This PR adds the intuitive env alias to improve usability and maintain consistency across the CLI.

What Changed:

  • Added Aliases: []string{"env"} to the environment command definition
  • Updated help text to show both func environment and func env in SYNOPSIS
  • Updated documentation to reflect the new alias

Release Note

Added `env` as a short alias for the `environment` command. Users can now use `func env` as a convenient shorthand for `func environment`.

Docs

Documentation updated in `docs/reference/func_environment.md` to reflect the new alias.

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
@knative-prow knative-prow Bot added the kind/enhancement Feature additions or improvements to existing label Nov 21, 2025
@knative-prow knative-prow Bot added the size/S 🤖 PR changes 10-29 lines, ignoring generated files. label Nov 21, 2025
@RayyanSeliya
Copy link
Copy Markdown
Contributor Author

hey @gauron99 a small gift for u !

Copy link
Copy Markdown
Contributor

@gauron99 gauron99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey thanks, just remove the extra lines in the synopsis and keep the "standard" one please

Comment thread docs/reference/func_environment.md Outdated

SYNOPSIS
func environment [-f|--format] [-v|--verbose] [-p|--path]
func env [-f|--format] [-v|--verbose] [-p|--path]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func env [-f|--format] [-v|--verbose] [-p|--path]

Comment thread cmd/environment.go Outdated

SYNOPSIS
{{rootCmdUse}} environment [-f|--format] [-v|--verbose] [-p|--path]
{{rootCmdUse}} env [-f|--format] [-v|--verbose] [-p|--path]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{rootCmdUse}} env [-f|--format] [-v|--verbose] [-p|--path]

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.81%. Comparing base (b039190) to head (cd1bab8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3219   +/-   ##
=======================================
  Coverage   51.81%   51.81%           
=======================================
  Files         162      162           
  Lines       19131    19132    +1     
=======================================
+ Hits         9912     9913    +1     
  Misses       8241     8241           
  Partials      978      978           
Flag Coverage Δ
integration 17.88% <0.00%> (-0.01%) ⬇️
unit macos-14 44.38% <100.00%> (+<0.01%) ⬆️
unit macos-latest 44.38% <100.00%> (+<0.01%) ⬆️
unit ubuntu-24.04-arm 44.57% <100.00%> (+<0.01%) ⬆️
unit ubuntu-latest 45.32% <100.00%> (+<0.01%) ⬆️
unit windows-latest 44.40% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@RayyanSeliya
Copy link
Copy Markdown
Contributor Author

hey thanks, just remove the extra lines in the synopsis and keep the "standard" one please

okk thx for pointing out !! will do it

@knative-prow knative-prow Bot added size/XS 🤖 PR changes 0-9 lines, ignoring generated files. and removed size/S 🤖 PR changes 10-29 lines, ignoring generated files. labels Nov 21, 2025
Copy link
Copy Markdown
Contributor

@gauron99 gauron99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label Nov 21, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Nov 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauron99, RayyanSeliya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added the approved 🤖 PR has been approved by an approver from all required OWNERS files. label Nov 21, 2025
@knative-prow knative-prow Bot merged commit 0f5cc66 into knative:main Nov 21, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. kind/enhancement Feature additions or improvements to existing lgtm 🤖 PR is ready to be merged. size/XS 🤖 PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add env alias for environment command

2 participants