- Aug
- 2,816
- 147
I would like to suggest adding support for a
The purpose of
directory-specific file-exclusion patterns for commands such as
TCC already supports file-exclusion ranges.
The documentation states that most internal commands that accept wildcards also accept file-exclusion ranges,
using syntax such as:
For example:
This works well,
but the exclusion patterns must be included in each command line.
The relevant documentation is:
jpsoft.com
For a project directory,
I might want to exclude the following files from routine file operations:
At present,
I can store those patterns in an environment variable and use that variable in a file-exclusion range.
For example:
This still requires
TCC already provides directory-specific environment configuration through
When enabled, TCC looks for
jpsoft.com
Because
it provides a workable method for configuring exclusion patterns on a per-directory basis.
However, the user must still explicitly include the corresponding file-exclusion range in each command.
A dedicated
When executing a command that selects files by wildcard,
TCC would search for
Patterns found in those files would automatically be applied as file exclusions.
For example, a
Then commands such as these would automatically exclude matching files:
The exact list of commands would be determined by which TCC commands support file selection and file-exclusion ranges.
It would be useful for the feature to include a way to:
The idea is conceptually similar to Git’s
which contains patterns for files that Git should ignore.
Git documents
git-scm.com
The proposed
It would provide persistent file-selection exclusions for TCC commands.
TCC already has the necessary exclusion mechanism through file-exclusion ranges,
and
A
This would be particularly useful for project directories containing backup files, generated files, editor files, transcripts, and other files that should normally be left untouched by routine
Joe
.tccignore file in TCC.The purpose of
.tccignore would be to provide persistent,directory-specific file-exclusion patterns for commands such as
COPY, MOVE, and RENAME, without requiring the exclusion range to be specified every time.TCC already supports file-exclusion ranges.
The documentation states that most internal commands that accept wildcards also accept file-exclusion ranges,
using syntax such as:
Code:
/[!pattern1 pattern2]
For example:
Code:
COPY /s /[!*.bak *.bmark *.org transcript.md] *.* r:\test
This works well,
but the exclusion patterns must be included in each command line.
The relevant documentation is:
TCC File Exclusion Ranges
If you specify a file exclusion, TCC examines each file name and excludes files that match the names specified in the exclusion range.
For a project directory,
I might want to exclude the following files from routine file operations:
Code:
*.bak
*.bmark
*.org
transcript.md
At present,
I can store those patterns in an environment variable and use that variable in a file-exclusion range.
For example:
Code:
SET tccignore=*.bak *.bmark *.org transcript.md
COPY /S /[!%tccignore] *.* R:\test
This still requires
/[!%tccignore] to be added to every applicable command.TCC already provides directory-specific environment configuration through
DIRENV.When enabled, TCC looks for
.envtc files while changing directories and processes the files from the root of the new directory down to the current directory.DIRENV - Configures the environment on a per-directory basis
DIRENV is a TCC internal command that configures environment variables on a per-directory basis
Because
.envtc can define the tccignore variable,it provides a workable method for configuring exclusion patterns on a per-directory basis.
However, the user must still explicitly include the corresponding file-exclusion range in each command.
A dedicated
.tccignore file would make this behavior automatic and more discoverable.When executing a command that selects files by wildcard,
TCC would search for
.tccignore files according to a defined directory-search rule.Patterns found in those files would automatically be applied as file exclusions.
For example, a
.tccignore file could contain:
Code:
*.bak
*.bmark
*.org
transcript.md
Then commands such as these would automatically exclude matching files:
Code:
COPY * destination
MOVE * destination
RENAME *.txt *.old
The exact list of commands would be determined by which TCC commands support file selection and file-exclusion ranges.
It would be useful for the feature to include a way to:
- Disable automatic
.tccignoreprocessing globally or temporarily. - Override or bypass
.tccignorefor a particular command. - Display the active exclusions, perhaps through an existing diagnostic option or a new command.
- Distinguish an absent
.tccignorefile from an empty one. - Define how negated patterns or pattern precedence would work, if supported.
The idea is conceptually similar to Git’s
.gitignore file,which contains patterns for files that Git should ignore.
Git documents
.gitignore patterns here:Git - gitignore Documentation
The proposed
.tccignore would serve a different purpose: it would not affect version control.It would provide persistent file-selection exclusions for TCC commands.
TCC already has the necessary exclusion mechanism through file-exclusion ranges,
and
DIRENV already provides directory-specific configuration.A
.tccignore file would combine these capabilities into a more convenient feature:- Define exclusions once.
- Apply them automatically to applicable TCC commands.
- Avoid repeating
/[!...]on every command line. - Allow exclusions to follow a directory tree.
- Keep the behavior separate from Git and other external tools.
This would be particularly useful for project directories containing backup files, generated files, editor files, transcripts, and other files that should normally be left untouched by routine
COPY, MOVE, RENAME, and similar operations.Joe