19 Commits

Author SHA1 Message Date
Dominik Schulz
7281ca8ab4
[chore] Migrate to golangci-lint v2 (#3104)
* [chore] Migrate to golangci-lint v2

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issue

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix more lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Add more package comments.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [chore] Fix golangci-lint config and the remaining checks

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Use Go 1.24

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix container builds

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix more failing tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix test failure

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Fix another len assertion

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Move location tests

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Fix most remaining lint issues

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Only run XDG specific tests on linux

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* [fix] Attempt to address on source of flaky failures

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2025-04-17 08:05:43 +02:00
GLoby
5d989aa19f
[ENHANCEMENT] Add support for autocompletion with flags in REPL mode (#3057)
* [ENHANCEMENT] Add support for autocompletion with flags in REPL mode

Signed-off-by: Ilya Eryomenko <ilya@eryomenko.com>

* [CLEANUP] Fix lint issue

Signed-off-by: Ilya Eryomenko <ilya@eryomenko.com>

---------

Signed-off-by: Ilya Eryomenko <ilya@eryomenko.com>
2025-02-26 22:01:49 +01:00
Shivaram Lingamneni
056952f87b
upgrade to ergochat/readline@v0.1.0 (#2765)
Signed-off-by: Shivaram Lingamneni <slingamn@cs.stanford.edu>
2024-01-16 09:45:07 +01:00
Yolan Romailler
5f18942781
[BUGFIX] Try to always honor local config for mounts (#2724)
* [BUGFIX] Try to always honor local config for mounts

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [BUGFIX] Better propagate mount to config

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

* [n/a] CR nit fix

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>

---------

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-11-25 17:48:37 +01:00
Dominik Schulz
39ecb38372
Replace chzyer/readline with ergochat/readline (#2684)
* Replace chzyer/readline with ergochat/readline

The former seemed unmaintained and was lacking patches required for
OpenBSD.

See GH-2683

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* Add an error message when using clear on windows.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

* use readline 0.0.6's ClearScreen method

---------

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Shivaram Lingamneni <slingamn@cs.stanford.edu>
2023-11-11 10:40:17 +01:00
Dominik Schulz
18ffee354f
Add .gitconfig parser (#2395)
This commit adds yet another config handler for gopass. It is based on
the format used by git itself. This has the potential to address a lot
of long standing issues, but it also causes a lot of changes to how we
handle configuration, so bugs are inevitable.

Fixes #1567
Fixes #1764
Fixes #1819
Fixes #1878
Fixes #2387
Fixes #2418

RELEASE_NOTES=[BREAKING] New config format based on git config.

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Co-authored-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>

address comments

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-11-25 10:50:34 +01:00
Dominik Schulz
16c071a780
Enable golangci-lint on push and pr (#2158)
Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2022-03-24 21:58:53 +01:00
Yolan Romailler
3d3c7d5b77
GCI-ing imports (#2072)
Running gci in order to make sure we have properly deterministic imports

RELEASE_NOTES=n/a

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2021-12-28 13:59:31 +01:00
Dominik Schulz
08b7d56d65
Add suffix f to formating out methods (#1794)
This commit renames the existing out methods that expect
a format string to include the common f suffix and introduces
new out methods without this suffix that don't accept a
format string or variadic arguments.

Fixes #1793

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-02-15 19:38:58 +01:00
Dominik Schulz
16a6b0c730
Add REPL command lock (#1744)
This allows flushing credential caches, mostly age.
This is useful when using gopass in REPL mode to keep
gopass running but lock the age key material.

RELEASE_NOTES=[ENHANCEMENT] Add REPL cmd lock

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-21 23:22:52 +01:00
Dominik Schulz
74ea14c323
Remove colored output (#1743)
This confuses some terminals.

Also: fix setup.go condition and validate git setup.

Fixes #1464
Fixes #1467

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-21 10:32:25 +01:00
Dominik Schulz
2d1b87514c
UX update (#1715)
Streamline command output, add unicode icons and ask for passphrase
during onboarding.

Fixes #1698

RELEASE_NOTES=[ENHANCEMENT] UTF-8 emojis
RELEASE_NOTES=[BUGFIX] Ask passphrase upon key generation


Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-18 13:54:49 +01:00
Dominik Schulz
ff349772ac
Reduce dependencies on internal packages (#1707)
This PR moves some packages from internal to pkg to increase the
independence of binaries in cmd/ from internal packages further.

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2021-01-13 18:21:09 +01:00
Yolan Romailler
10f89fe39e
Correcting newlines handling (#1579)
Fixes #788
Fixes #1575
Fixes #1574
Fixes #1573
Fixes #1570
Fixes #1592

RELEASE_NOTES=[BUGFIX] Correcting newlines handling
RELEASE_NOTES=[BUGFIX] Show now correctly handles -C and -u together
RELEASE_NOTES=[BUGFIX] Insert is now parsing its stdin input

This is trying to correct the way we display and write newlines.
Newlines are appended by the MIME type after the header but won't be
displayed by show now unless the MIME body is non-empty.

Notice the `mime` setting is significantly changing the way secrets are
handled, written and displayed, also how the newlines are treated.
I've tried to add tests to take this into account.

I've also added unit tests and integration tests accordingly to try and
detect such regressions in the future.

This is changing the behaviour of insert to make it compatible with the new MIME format

This is also refactoring the code a bit, removing dead code such as the
YAML special handling.

Signed-off-by: Yolan Romailler <yolan@romailler.ch>
2020-09-23 19:43:41 +02:00
Yolan Romailler
ef72769301
Refactoring List (#1559)
Fixes #1558

RELEASE_NOTES=[BUGFIX] Apply limit in list correctly
RELEASE_NOTES=[ENHANCEMENT] Adding a trailing separator to the listed folders

This is also including a refactoring of the action/list.go in
order to avoid code duplication.

It is important to notice that now one must set MaxDepth to -1 in order
to list all the items in a subtree instead of 0. The 0 is now only
listing the direct parents of the subtree, 1 is listing the subitems,
and so on as explained in docs/commands/list.md

Signed-off-by: Yolan Romailler <yolan@romailler.ch>
2020-08-27 12:28:27 +02:00
Dominik Schulz
f3a3f3882e
Add new binaries to Makefile (#1483)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-08-09 22:20:21 +02:00
Dominik Schulz
e7c31ae540
Add REPL completions and helps (#1429)
RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-06-20 22:58:43 +02:00
Dominik Schulz
b4e72f1be3
Update documentation (#1428)
This commit updates the documentation and fixes some small glitches.

RELEASE_NOTES=n/a

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-06-20 08:53:22 +02:00
Dominik Schulz
de194f214f
Add REPL (#1425)
This commit adds an interactive REPL as the default action when inoking
gopass without any arguments. The short form of gopass secret is still
retained but might eventually also be removed.

RELEASE_NOTES=[FEATURE] REPL

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
2020-06-18 23:29:47 +02:00