Commit graph

1074 commits

Author SHA1 Message Date
Alexandru-Claudius Virtopeanu
bd4d1655f6
feat: add getters for flag completions (#1943) 2023-09-25 20:04:25 -04:00
Souma
0c72800b8d
Customizable error message prefix (#2023) 2023-09-08 13:29:06 -04:00
Nuno Adrego
c5dacb3ea4
ci: test golang 1.21 (#2024) 2023-09-07 20:30:51 -04:00
Unai Martinez-Corral
285460dca6
command: temporarily disable G602 due to securego/gosec#1005 (#2022) 2023-08-29 10:04:59 -04:00
dependabot[bot]
4955da7c11
build(deps): bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 (#2021) 2023-08-28 18:53:34 +00:00
Jun Nishimura
fd865a44e3
minor corrections to unit tests (#2003) 2023-07-23 07:31:55 -04:00
gocurr
60d056d157
doc: fix typo, Deperecated -> Deprecated (#2000) 2023-07-20 11:27:44 -04:00
Unai Martinez-Corral
66b215ba18
golangci: enable 'unused' and disable deprecated replaced by it (#1983) 2023-07-18 09:51:36 -04:00
Martijn Evers
c81c46a015
Add 'one required flag' group (#1952) 2023-07-16 12:38:22 -04:00
Unai Martinez-Corral
dcb405a939
Move documentation sources to site/content (#1428) 2023-06-20 17:15:36 -04:00
dependabot[bot]
cbe4865373
build(deps): bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 (#1976) 2023-06-20 20:46:35 +00:00
Paul Holzinger
fdee73b4a0
powershell: escape variable with curly brackets (#1960)
This fixes an issue with program names that include a dot, in our case
`podman.exe`. This was caused by the change in commit 6ba7ebbc.

Fixes #1853

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-19 12:16:18 -04:00
Branch Vincent
988bd76139
test: make fish_completions_test more robust (#1980)
Use temporary files instead of assuming the current directory is
writable. Also, if creating a temporary file still returns an error,
prevent the test from failing silently by replacing `log.Fatal` with
`t.Fatal`.
2023-06-16 10:25:30 -04:00
Taavi Väänänen
2246fa82e9
Fix grammar: 'allows to' (#1978)
The use in generated bash completion files is getting flagged by
Lintian (the Debian package linting tool).

Signed-off-by: Taavi Väänänen <hi@taavi.wtf>
2023-06-13 11:12:49 -04:00
dependabot[bot]
0e3a0bfe91
build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#1971) 2023-06-12 02:39:30 +00:00
Tom Payne
284f410104
Fix typo in fish completions (#1945) 2023-04-08 00:47:33 -04:00
Marc Khouzam
4dd4b25de3
Update main image to better handle dark background (#1883)
Fixes #1880

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
Co-authored-by: Deleplace <deleplace2015@gmail.com>
2023-03-22 18:41:51 -04:00
Marc Khouzam
45360a55cc
Allow sourcing zsh completion script (#1917)
Although it is not the recommended approach, sourcing a completion
script is the simplest way to get people to try using shell completion.
Not allowing it for zsh has turned out to complicate shell completion
adoption.  Further, many tools modify the zsh script to allow sourcing.

This commit allows sourcing of the zsh completion script.

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
2023-03-22 18:41:05 -04:00
Luiz Carvalho
c8a20a16ba
Document suggested layout for subcommands (#1930)
Signed-off-by: Luiz Carvalho <lucarval@redhat.com>
2023-03-16 21:03:29 -04:00
Florent Poinsard
b197a24504
Update projects_using_cobra.md (#1932)
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
2023-03-14 08:28:50 -04:00
Unai Martinez-Corral
9e6b58afc7
update copyright year (#1927) 2023-03-05 21:28:31 -05:00
Unai Martinez-Corral
fb3652402b
ci: test Golang 1.20 (#1925) 2023-03-05 21:11:33 -05:00
Unai Martinez-Corral
c7300f0bdd
ci: deprecate go 1.16 (#1926) 2023-03-05 21:07:19 -05:00
Oldřich Jedlička
567ea8ebc9
Add support for PowerShell 7.2+ (#1916)
PowerShell 7.2 has changed the way arguments are passed to executables.
This was originally an experimental feature in 7.2, but as of 7.3 it is
built-in. A simple "" is now sufficient for passing empty arguments, no
back-tick escaping is required.

Fixes #1849

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Co-authored-by: Oldřich Jedlička <oldrich.jedlicka@rohlik.cz>
2023-02-25 16:30:37 -05:00
Gyanendra Mishra
3daa4b9c36
Add keeporder to shell completion (#1903)
This allows programs to request the shell to maintain the order of completions that was returned by the program
2023-02-25 15:57:12 -05:00
John McBride
a516d4132c
Removes stale bot from GitHub action (#1908)
Signed-off-by: John McBride <jpmmcbride@gmail.com>
2023-02-13 20:49:03 -07:00
dependabot[bot]
e839bb342f
build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#1902) 2023-02-12 01:27:13 +00:00
Ggg6542
87ebcd8f98
Update shell_completions.md (#1907)
align documentation with the code : completions.go:452
2023-02-08 21:11:53 -05:00
janhn
8b8ee8754c
Improve MarkFlagsMutuallyExclusive example in User Guide (#1904) 2023-02-06 06:15:40 -05:00
Shihta Kuan
d022c0fe2b
Add documentation about disabling completion descriptions (#1901) 2023-01-30 12:58:20 -05:00
dependabot[bot]
4fa4fdf5cd
build(deps): bump github.com/inconshreveable/mousetrap (#1872) 2023-01-03 02:43:06 +00:00
Dominik Roos
b4f979ae35
completions: do not detect arguments with dash as 2nd char as flag (#1817)
Fixes #1816

Previously, arguments with a dash as the second character (e.g., 1-ff00:0:1)
were detected as a flag by mistake. This resulted in auto completion misbehaving
if such an argument was last in the argument list during invocation.
2023-01-02 19:58:36 -05:00
Jack Wright
3c8715a6d7 "fixed whitespace" 2022-12-27 12:17:42 -08:00
Yash Ladha
bf11ab6321
fix: func name in doc strings (#1885)
Corrected the function name at the start of doc strings, as per the convention
outlined in official go documentation: https://go.dev/blog/godoc
2022-12-25 15:08:39 -05:00
Jack Wright
303dd2517f "Reverted to old version without formatting changes and readded nushell" 2022-12-23 20:40:17 -08:00
Jack Wright
cb60acd3ab "Added nushell to list of shell autompletes" 2022-12-23 20:39:54 -08:00
Jack Wright
107986cb5e
Update completions.go
Co-authored-by: Marc Khouzam <marc.khouzam@gmail.com>
2022-12-23 20:31:48 -08:00
Jack Wright
49d58810e6
Update completions.go
Co-authored-by: Marc Khouzam <marc.khouzam@gmail.com>
2022-12-23 20:31:38 -08:00
Jack Wright
6e3abc68be
Update completions.go
Co-authored-by: Marc Khouzam <marc.khouzam@gmail.com>
2022-12-23 20:31:30 -08:00
Jack Wright
cfee99c892 "removing extra lines/whitespace" 2022-12-23 20:30:18 -08:00
Seonghyeon Cho
fdffa5a4c7
Update badge route (#1884)
Based on
https://github.com/badges/shields/issues/8671
2022-12-23 15:54:16 -05:00
Jack Wright
b3a1d72b8b "fixing completions that contain a /" 2022-12-16 09:50:05 -08:00
Jack Wright
fe8bf5e1bd "ignoring return value when directive is ShellComp#directiveFilterFileExt" 2022-12-16 09:32:22 -08:00
Jack Wright
f366bb2799 "fixing oddities with fuzzy searching and bug with active help" 2022-12-15 13:23:38 -08:00
Yash Ladha
f25a3c6e0b
fix: conflict import name with variable (#1879)
`template` is an import in `cobra.go` file and also used as a variable
name, which masks the library in the scope of that function.
2022-12-15 05:39:50 -05:00
Unai Martinez-Corral
923592041e
ci: deprecate go 1.15 (#1866)
Remove testing for go 1.15 to allow CI to pass, but don't force projects to upgrade.
2022-12-09 16:57:19 -05:00
David Wertenteil
a6f198b635
Update kubescape org (#1874)
Signed-off-by: David Wertenteil <dwertent@armosec.io>
2022-12-06 08:20:58 -05:00
Jack Wright
4ad4930a12 Incorporating pull request feedback
- Fixing completion on full paths
- Fixing completion with equals in flags
- Fixing fuzzy search
- Typos
2022-11-28 13:39:12 -08:00
Jack Wright
95f2d8e38a Added a whitelist to add cobra apps to to prevent non-cobra apps from
being excuted
2022-11-27 15:06:59 -08:00
Jack Wright
1c908e13f5 Added nushell to the Use: line 2022-11-27 13:55:50 -08:00