[PR #376] [MERGED] Add some shorthand aliases for commands+subcommands #1412

Closed
opened 2025-12-29 02:29:58 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/376
Author: @e-zk
Created: 3/2/2022
Status: Merged
Merged: 3/2/2022
Merged by: @kradalby

Base: mainHead: feat/command-aliases


📝 Commits (8)

  • dbb2af0 feat(aliases): add aliases for route command
  • 21eee91 feat(aliases): add aliases for nodes command
  • aff6b84 feat(aliases): add 'gen' alias for 'generate' command
  • 5310f86 feat(aliases): add aliases for namespaces command
  • 052dbfe feat(aliases): add aliases for apikeys command
  • 12b3b5f feat(aliases): add aliases for preauthkeys command
  • a614f15 docs: update changelog
  • 7c99d96 Merge branch 'main' into feat/command-aliases

📊 Changes

7 files changed (+55 additions, -36 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 cmd/headscale/cli/api_key.go (+8 -5)
📝 cmd/headscale/cli/generate.go (+3 -2)
📝 cmd/headscale/cli/namespaces.go (+15 -10)
📝 cmd/headscale/cli/nodes.go (+10 -7)
📝 cmd/headscale/cli/preauthkeys.go (+12 -8)
📝 cmd/headscale/cli/routes.go (+6 -4)

📄 Description

This adds a few shorthand aliases for commands+subcommands.

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Ref: #361.

New command aliases summary:

  • apikeys: apikey, api
  • generate: gen
  • namespaces: namespace, ns, user, users
  • nodes: node, machines, machine
  • preauthkeys: preauthkey, authkey, pre
  • routes: route, r

Subcommand aliases summary:

  • list: ls, show
  • create: c, new
  • rename: mv
  • delete: del, rm
  • expire: logout, exp, e

Suggestions for additions+changes welcome.

Also, a question: am I meant to run make gen and push the changed files in gen/?


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/376 **Author:** [@e-zk](https://github.com/e-zk) **Created:** 3/2/2022 **Status:** ✅ Merged **Merged:** 3/2/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `feat/command-aliases` --- ### 📝 Commits (8) - [`dbb2af0`](https://github.com/juanfont/headscale/commit/dbb2af0238161ed4cbdf3096fc893910bb1bbfbe) feat(aliases): add aliases for `route` command - [`21eee91`](https://github.com/juanfont/headscale/commit/21eee912a39ad4a9898fba5de340a5df0db16ca4) feat(aliases): add aliases for `nodes` command - [`aff6b84`](https://github.com/juanfont/headscale/commit/aff6b84250868beee6a8df2aa764b8f19b0ad156) feat(aliases): add 'gen' alias for 'generate' command - [`5310f86`](https://github.com/juanfont/headscale/commit/5310f8692bf071a20dcda81e96c9321b5ecdb53b) feat(aliases): add aliases for `namespaces` command - [`052dbfe`](https://github.com/juanfont/headscale/commit/052dbfe4403028b6a7356a3b5daf78392b4e14f7) feat(aliases): add aliases for `apikeys` command - [`12b3b5f`](https://github.com/juanfont/headscale/commit/12b3b5f8f10ae9d4ff2044e0552a493c16d4739b) feat(aliases): add aliases for `preauthkeys` command - [`a614f15`](https://github.com/juanfont/headscale/commit/a614f158be3c3bea3193a572a7ddf220142718e5) docs: update changelog - [`7c99d96`](https://github.com/juanfont/headscale/commit/7c99d963e24c796cbc10efebdf9a1211cb32c5de) Merge branch 'main' into feat/command-aliases ### 📊 Changes **7 files changed** (+55 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `cmd/headscale/cli/api_key.go` (+8 -5) 📝 `cmd/headscale/cli/generate.go` (+3 -2) 📝 `cmd/headscale/cli/namespaces.go` (+15 -10) 📝 `cmd/headscale/cli/nodes.go` (+10 -7) 📝 `cmd/headscale/cli/preauthkeys.go` (+12 -8) 📝 `cmd/headscale/cli/routes.go` (+6 -4) </details> ### 📄 Description This adds a few shorthand aliases for commands+subcommands. <!-- Please tick if the following things apply. You… --> - [x] read the [CONTRIBUTING guidelines](README.md#user-content-contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [x] updated CHANGELOG.md <!-- If applicable, please reference the issue using `Fixes #XXX` and add tests to cover your new code. --> Ref: #361. New command aliases summary: - `apikeys`: `apikey`, `api` - `generate`: `gen` - `namespaces`: `namespace`, `ns`, `user`, `users` - `nodes`: `node`, `machines`, `machine` - `preauthkeys`: `preauthkey`, `authkey`, `pre` - `routes`: `route`, `r` Subcommand aliases summary: - `list`: `ls`, `show` - `create`: `c`, `new` - `rename`: `mv` - `delete`: `del`, `rm` - `expire`: `logout`, `exp`, `e` Suggestions for additions+changes welcome. Also, a question: am I meant to run `make gen` and push the changed files in `gen/`? --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:29:58 +01:00
adam closed this issue 2025-12-29 02:29:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1412