mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
Add a clear cache action
This commit is contained in:
@@ -748,6 +748,15 @@ var default_cwd string
|
||||
var use_light_colors bool
|
||||
|
||||
func main(_ *cli.Command, opts *Options, args []string) (rc int, err error) {
|
||||
if opts.ClearCache {
|
||||
c, err := preview_cache()
|
||||
if err != nil {
|
||||
return 1, err
|
||||
}
|
||||
if err = c.Clear(); err != nil {
|
||||
return 1, err
|
||||
}
|
||||
}
|
||||
write_output := func(selections []string, interrupted bool, current_filter string) {
|
||||
payload := make(map[string]any)
|
||||
if err != nil {
|
||||
|
||||
@@ -217,6 +217,11 @@ The format in which to write the output.
|
||||
|
||||
--write-pid-to
|
||||
Path to a file to which to write the process ID (PID) of this process to.
|
||||
|
||||
|
||||
--clear-cache
|
||||
type=bool-set
|
||||
Clear the caches used by this kitten.
|
||||
'''.format(config_help=CONFIG_HELP.format(conf_name='choose-files', appname=appname)).format
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user