-
Notifications
You must be signed in to change notification settings - Fork 212
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
I would like to discuss exclude and clipboad. #31
Comments
Same! |
How the Glob Pattern Tool WorksThe tool uses glob patterns to include or exclude files and directories, and works similarly to tools like Key Concepts
When you specify an
Here’s a visual representation of the last case: Question 1In your case, the command is indeed correct Question 2Code2prompt use the |
Read
This option may solve your problem! |
If |
am trying to exclude a couple of files matching by extension and i don't get it to work with none of the available parameters. lastly, tried code2prompt --filter html,log,json,scss,handlebars . and a couple of more combinations just to find the excluded/filterered files included in any case 😞 |
using glob patterns🥳 How about asking ChatGPT the following?
You can apply this method to do many things! |
talking to me like i am stupid while not posting the answer you seem to know? |
@gretel To exclude specific file extensions, you can use the code2prompt . --exclude="kts,xml,json,bat,properties,pro" --exclude-files="gradlew" This command will exclude files with the extensions .kts, .xml, .json, .bat, .properties, and .pro, as well as any file named "gradlew". This approach provides a clear and straightforward way to specify exclusions without relying on glob patterns. |
I am Japanese and my English is not good. Please understand that I write all my comments using DeepL translation. Also, asking ChatGPT is very effective and I really encourage you to try it. |
Nice tool. FYI I too am also seeing the auto copy to the clipboard not working. I have tried both the cargo release and building from the source. (I've tried under $USER and sudo to no avail). I'm running stock Ubuntu 22.04. |
Thank you for this tool! But I also have a problem with the I have the following Filetree and I can't get the app git:main
❯ tree
.
├── README.md
├── context.md
└── src
├── backend
│ ├── deno.json
│ ├── deno.lock
│ ├── http
│ │ ├── add story.bru
│ │ ├── bruno.json
│ │ ├── environments
│ │ │ └── localhost.bru
│ │ ├── status.bru
│ │ ├── stories.bru
│ │ └── story.bru
│ ├── main.ts
│ ├── routes
│ │ ├── status.ts
│ │ └── stories.ts
│ ├── server.ts
│ └── stores
│ └── stories.ts
├── frontend
│ ├── README.md
│ ├── deno.lock
│ ├── eslint.config.js
│ ├── index.html
│ ├── node_modules
│ │ ├── @eslint
│ │ │ └── js -> ../.deno/@[email protected]/node_modules/@eslint/js
│ │ ├── @types
│ │ │ ├── react -> ../.deno/@[email protected]/node_modules/@types/react
│ │ │ └── react-dom -> ../.deno/@[email protected]/node_modules/@types/react-dom
│ │ ├── @vitejs
│ │ │ └── plugin-react -> ../.deno/@[email protected]/node_modules/@vitejs/plugin-react
│ │ ├── eslint -> .deno/[email protected]/node_modules/eslint
│ │ ├── eslint-plugin-react-hooks -> .deno/[email protected]/node_modules/eslint-plugin-react-hooks
│ │ ├── eslint-plugin-react-refresh -> .deno/[email protected]/node_modules/eslint-plugin-react-refresh
│ │ ├── globals -> .deno/[email protected]/node_modules/globals
│ │ ├── react -> .deno/[email protected]/node_modules/react
│ │ ├── react-dom -> .deno/[email protected]/node_modules/react-dom
│ │ ├── typescript -> .deno/[email protected]/node_modules/typescript
│ │ ├── typescript-eslint -> .deno/[email protected]/node_modules/typescript-eslint
│ │ └── vite -> .deno/[email protected]/node_modules/vite
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ │ └── vite.svg
│ ├── src
│ │ ├── App.css
│ │ ├── App.tsx
│ │ ├── assets
│ │ │ └── react.svg
│ │ ├── index.css
│ │ ├── main.tsx
│ │ └── vite-env.d.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.json
│ ├── tsconfig.node.json
│ └── vite.config.ts
└── shared
└── types
└── story.ts
30 directories, 33 files This is the command that I am using: code2prompt . --exclude="**/deno.lock,**/package-lock.json" --output="context.md" |
Hello @nikbrunner, Thank you to raise this issue. I wasn't able to reproduce your issue. Maybe you omitted the I understand this feature is confusing because you don't expect your excluded file to remain in the directory tree. However, it's sometimes practical to keep them in the tree in order to feed extra context... Can you confirm the files content is properly excluded from Here's the script I used to reproduce your situation:
|
Basically, I am a Mac developer. However, I sometimes develop on Ubuntu with Windows WSL2 due to circumstances.
I can use Mac without any problem, but in WSL2 environment, the following commands do not work as expected.
1.
code2prompt /home/USER/PJ --exclude="**/package-lock.json"
The purpose is to exclude package-lock.json existing in PJ/server, PJ/client, etc.
However, the output result includes the contents of package-lock.json.
Is there a way to properly use
--exclude
?code2prompt /home/USER/PJ
I am expecting the output results to be saved to the clipboard as a result of running this command, but sometimes they are not.
So, I use the following command every time.
code2prompt /home/USER/PJ --ouput /home/USER/PJ/output.txt
.It accomplishes the purpose, but it is better to be saved to the clipboard.
Can you give me some advice on how to solve this problem?
P.S.
Very nice app, can't develop anymore without it! I look forward to more in the future.
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered: