Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache file created on TAB for completion... #2263

Closed
ljramalho opened this issue Aug 6, 2022 · 2 comments
Closed

cache file created on TAB for completion... #2263

ljramalho opened this issue Aug 6, 2022 · 2 comments
Labels
question Further information is requested

Comments

@ljramalho
Copy link

ljramalho commented Aug 6, 2022

I notice that when I type:
bat
and then, I press the TAB key for completion, and there are lots of files to choose, the shell provides me with all available files, invariable including a file called "cache".

I don't know if this "cache" file is something hidden in the file system or if it is something "bat" command temporarily create for... something... or if it is a product of the bash completion scripts for bat...

I only know that either, after execute the bat command or cancel it, I cannot find the "cache" file anywhere.

In no other circumstance where I press TAB for completion for other commands, the bash shell show me a file called "cache".

So...

A) If this "cache" file is a byproduct of "bat" command functionality or bash completion script for bat... What happen if in that same folder I have a real and important file called "cache"?

B) So if indeed that file is created, don't you think it is a kind of overkill to create and delete dozens of "cache" files in a file system mounted over an SD card as it is the case of my raspberry Pi, where I'm using the "bat" command?

C) If cache is part of bat features, what is the solution to prevent the creation or, if that file is really necessary, to force the creation of that file in a temporary system folder? (I really don't want to mess with the scripts and neither I have the knowledge to follow developer's train of thought).

Thank you

@ljramalho ljramalho added the question Further information is requested label Aug 6, 2022
@keith-hall
Copy link
Collaborator

I'm pretty sure that cache is a not file being temporarily created and instead is just a bat subcommand being offered as a completion/suggestion - see https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions :)

@keith-hall
Copy link
Collaborator

Note there is a potential idea to remove (the need for) the cache subcommand: #2085

@Enselic Enselic closed this as completed Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants