# Agent Instructions
General coding guidelines, commit conventions, and agent workflows for this repository.
## Project Overview
Oh My Posh is a cross-shell prompt theme engine written in Go. It renders prompt segments by
querying an `Environment` abstraction that wraps all OS/shell interactions.
## Tech Stack
| Layer | Technology |
| ------------------------- | ----------------------------- |
| Core engine | Go (module root: `src/`) |
| Documentation site | Docusaurus (MDX) - `website/` |
| Themes | JSON - `themes/` |
| Config format | TOML / JSON / YAML |
| Package/installer scripts | `packages/` |
| Build scripts | `build/` |
## Key Commands
```bash
# Go - run from src/
go test ./...
go test ./segments/... -run TestFoo # single test
golangci-lint run
# Docs - run from website/
npm run start # local dev server
npm run build # validate before opening a docs PR
```
## Codebase Exploration
**Always explore the actual codebase before planning or writing code.** Do not rely on memory
or assumptions. Use the file system tools to read relevant files first - the codebase evolves
and the feature you're asked to add may already exist.
## Repository Layout
```text
src/
segments/ # One Go file + one _test.go per segment
prompt/ # Core rendering engine
runtime/ # OS/shell abstraction layer
themes/ # Bundled JSON theme files
website/ # Docusaurus docs site (MDX pages, sidebar config, JSON schema)
packages/ # Installer/package manifests
build/ # CI build helpers
```
Key paths inside `src/`:
| Path | Purpose |
| ------------------------------ | ----------------------------------------------------- |
| `src/segments/` | One `.go` + one `_test.go` per segment |
| `src/config/segment_types.go` | Segment type registry (gob + string constants) |
| `src/cli/` | CLI commands (cmdtree); `root.go` is the entry point |
| `src/prompt/engine.go` | Segment rendering loop |
| `src/cache/` | Existing TTL/file/command-path cache infrastructure |
| `src/runtime/` | `Environment` abstraction + mock |
## Segment Development
Every segment lives in `src/segments/` and implements the `SegmentWriter` interface. Use the
`Environment` abstraction (`env`) for **all** OS/shell calls - never call OS APIs directly.
Adding a segment requires **five** artifacts - use the `segment-create` skill to scaffold all
of them automatically:
1. `src/segments/<name>.go` - segment source
2. `src/segments/<name>_test.go` - unit tests
3. `website/docs/segments/<name>.mdx` - user-facing docs
4. Update `website/sidebars.js` and `website/static/schema.json`
5. Register the type in `src/config/segment_types.go` via `gob.Register(&segments.MySegment{})`
Missing step 5 causes the segment to fail silently at runtime.
See the `segment-docs` skill for the canonical mapping between Go source constructs and MDX
documentation fields (template properties, type representations, option tables).
## Shell Integration
`oh-my-posh init <shell>` is how users wire oh-my-posh into their shell. It:
1. Writes a shell-specific init script to the cache (source: `src/shell/scripts/omp.<ext>`)
2. Returns a one-liner for the shell to `eval` - this sources the cached script, which hooks
into prompt rendering
The `src/shell/` package contains per-shell logic (`pwsh.go`, `bash.go`, `zsh.go`, etc.) that
generates the hook commands. The scripts in `src/shell/scripts/` are embedded and templated at
init time. When modifying shell behaviour, changes typically span both the `.go` file and the
corresponding script.
Supported shells: `bash`, `zsh`, `fish`, `powershell`/`pwsh`, `cmd`, `nu`, `elvish`, `xonsh`.
## CLI Commands
CLI commands use the internal `src/cmdtree` command tree and live in `src/cli/`. To add a new
command:
1. Create `src/cli/<name>.go` with a `var <name>Cmd = &cmdtree.Command{...}`
2. Register it in `src/cli/root.go` via `RootCmd.AddCommand(<name>Cmd)`
## Caching
`src/cache/` provides the existing caching infrastructure - use it instead of building new
cache logic. It supports TTL-based key/value storage, file-based persistence, and command-path
caching. Do not introduce new cache packages unless `src/cache/` genuinely cannot meet the
requirement.
## Comments
Applies to every language in this repository (Go, shell scripts, PowerShell, JavaScript/TypeScript,
Lua, etc.) - not just the primary language of whatever file you're touching.
- Default to no comment. Add one only when the code cannot say it on its own.
- Never restate what a function/type/variable already makes obvious from its name, signature,
and body. A comment that just paraphrases the name is noise - delete it.
- Only comment the WHY: a hidden constraint, a non-obvious invariant, a workaround for a specific
bug, an external requirement, or a caveat that would surprise a reader. If there's nothing like
that to say, leave the declaration uncommented - even exported/public ones.
- When a comment is warranted, keep it to the minimum needed to convey that non-obvious point.
Don't pad it with restating context the code already shows.
- Language-specific skills (e.g. `golang`) may add formatting conventions (complete sentences,
doc-comment placement) on top of this rule as a stricter minimum, but must not relax it.
## Go Conventions
Follow the `golang` skill for project-specific Go standards.
## Documentation (website/)
- Follow the `markdown` skill for `.md`/`.mdx` formatting rules.
- Segment doc pages live in `website/docs/segments/` and use MDX frontmatter with `title`, `sidebar_label`, and `id`.
## PowerShell
PowerShell helper scripts live in `packages/` and `build/`. Follow the `powershell` skill for cmdlet conventions.
## Themes
Themes are plain JSON files in `themes/`. New themes must validate against
`website/static/schema.json`. Do not introduce breaking schema changes without updating the
schema file.
## Skills
Agent skills live in `.agents/skills/` - the vendor-neutral Agent Skills location that Copilot,
Codex, Claude Code, and most other agents discover automatically. Most skills are installed via
APM (see [CONTRIBUTING.md](CONTRIBUTING.md)) and gitignored; the repository embeds three of its
own: `segment-create`, `segment-docs`, and `project-knowledge`.
## Project Knowledge
The `project-knowledge` skill (`.agents/skills/project-knowledge/`) is the project's durable
memory: verified gotchas about the codebase, shells, terminals, and test harnesses. Before working
in any of those areas, read the matching topic file - it exists to keep you out of known rabbit
holes.
Reading it is half the contract; writing to it is the other half. When a session uncovers
something a future session should know before going down the same rabbit hole - a platform quirk,
a non-obvious root cause, a failed approach worth not retrying - append it (dated, verified) to
the matching file in
`.agents/skills/project-knowledge/references/`. Create a new topic file plus an index row in its
`SKILL.md` when none fits. Commit the knowledge update together with the change it relates to.
## Pull Request Reviews
Whenever any agent performs or addresses a pull request review, follow this process at all
times, regardless of previous instructions:
1. Stay within the scope of the pull request: only address feedback on changes it introduces.
2. Investigate every review comment and reach a conclusion: a code fix, a clarification, or a
reasoned rejection.
3. Fold each fix into the commit it belongs to. When the change semantically belongs to a
commit the pull request introduces (any commit not yet on main), create a fixup commit
(`git commit --fixup <sha>`), squash it (`git rebase --autosquash`), and force-push the
pull request branch. This preserves the atomicity of the pull request's commits instead
of stacking review-fix commits on top. Rewriting the pull request branch is fine; main
history must never be rewritten.
4. Only when a change does not semantically fit any existing commit in the pull request does
it become its own commit on top, following the commit conventions.
5. Reply to each review comment with the conclusion, referencing the commit that addresses it
when there is one.
6. Resolve each review thread once its answer and/or fix has been provided.
# V. Words And Expressions Commonly Misused
(Some of the forms here listed, as _like I did_, are downright bad English; others, as the split infinitive, have their
defenders, but are in such general disfavor that it is at least inadvisable to use them; still others, as _case_,
_factor_, _feature_, _interesting_, _one of the most_, are good in their place, but are constantly obtruding themselves
into places where they have no right to be. If the writer will make it his purpose from the beginning to express
accurately his own individual thought, and will refuse to be satisfied with a ready-made formula that saves him the
trouble of doing so, this last set of expressions will cause him little trouble. But if he finds that in a moment of
inadvertence he has used one of them, his proper course will probably be not to patch up the sentence by substituting
one word or set of words for another, but to recast it completely, as illustrated in a number of examples below and in
others under Rules 12 and 13.)
**All right.** Idiomatic in familiar speech as a detached phrase in the sense, “Agreed,” or “Go ahead.” In other uses
better avoided. Always written as two words.
**As good or better than.** Expressions of this type should be corrected by rearranging the sentence.
| Original | Revision |
| ----------------------------------------- | -------------------------------------------------------- |
| My opinion is as good or better than his. | My opinion is as good as his, or better (if not better). |
**As to whether.** _Whether_ is sufficient; see under Rule 13.
**Bid.** Takes the infinitive without _to_. The past tense in the sense, _“ordered,”_ is _bade_.
**But.** Unnecessary after _doubt_ and _help_.
| Original | Revision |
| ------------------------------ | ----------------------------- |
| I have no doubt but that | I have no doubt that |
| He could not help see but that | He could not help seeing that |
The too frequent use of _but_ as a conjunction leads to the fault discussed under Rule 14. A loose sentence formed with
_but_ can always be converted into a periodic sentence formed with _although_, as illustrated under Rule 4.
Particularly awkward is the following of one _but_ by another, making a contrast to a contrast or a reservation to a
reservation. This is easily corrected by re-arrangement.
- **Original:** America had vast resources, but she seemed almost wholly unprepared for war. But within a year she had
created an army of four million men.
- **Revision:** America seemed almost wholly unprepared for war, but she had vast resources. Within a year she had
created an army of four million men.
**Can.** Means _am (is, are) able_. Not to be used as a substitute for _may_.
**Case.** The Concise Oxford Dictionary begins its definition of this word: “instance of a thing's occurring; usual
state of affairs.” In these two senses, the word is usually unnecessary.
| Original | Revision |
| ----------------------------------------------------------- | ----------------------------------------- |
| In many cases, the rooms were poorly ventilated. | Many of the rooms were poorly ventilated. |
| It has rarely been the case that any mistake has been made. | Few mistakes have been made. |
See Wood, Suggestions to Authors, pp. 68–71, and Quiller-Couch, The Art of Writing, pp. 103–106.
**Certainly.** Used indiscriminately by some writers, much as others use _very_, to intensify any and every statement. A
mannerism of this kind, bad in speech, is even worse in writing.
**Character.** Often simply redundant, used from a mere habit of wordiness.
| Original | Revision |
| --------------------------- | ------------ |
| Acts of a hostile character | Hostile acts |
**Claim, vb.** With object-noun, means _lay claim to_. May be used with a dependent clause if this sense is clearly
involved: “He claimed that he was the sole surviving heir.” (But even here, “claimed to be” would be better.) Not to be
used as a substitute for _declare_, _maintain_, or _charge_.
**Clever.** This word has been greatly overused; it is best restricted to ingenuity displayed in small matters.
**Compare.** To _compare to_ is to point out or imply resemblances, between objects regarded as essentially of different
order; to _compare with_ is mainly to point out differences, between objects regarded as essentially of the same order.
Thus life has been compared to a pilgrimage, to a drama, to a battle; Congress may be compared with the British
Parliament. Paris has been compared to ancient Athens; it may be compared with modern London.
**Consider.** Not followed by _as_ when it means “believe to be.” “I consider him thoroughly competent.” Compare, “The
lecturer considered Cromwell first as soldier and second as administrator,” where “considered” means “examined” or
“discussed.”
**Data.** A plural, like _phenomena_ and _strata_.
These data were tabulated.
**Dependable.** A needless substitute for _reliable_, _trustworthy_.
**Different than.** Not permissible. Substitute _different from_, _other than_, or _unlike_.
**Divided into.** Not to be misused for _composed of_. The line is sometimes difficult to draw; doubtless plays are
divided into acts, but poems are composed of stanzas.
**Don't.** Contraction of _do not_. The contraction of _does not_ is _doesn't_.
**Due to.** Incorrectly used for _through_, _because of_, or _owing to_, in adverbial phrases: “He lost the first game,
due to carelessness.” In correct use related as predicate or as modifier to a particular noun: “This invention is due to
Edison;” “losses due to preventable fires.”
**Folk.** A collective noun, equivalent to _people_. Use the singular form only.
**Effect.** As noun, means _result_; as verb, means _*to* bring about_, _accomplish_ (not to be confused with _affect_,
which means “to influence”).
As noun, often loosely used in perfunctory writing about fashions, music, painting, and other arts: “an Oriental
effect;” “effects in pale green;” “very delicate effects;” “broad effects;” “subtle effects;” “a charming effect was
produced by.” The writer who has a definite meaning to express will not take refuge in such vagueness.
**Etc.** Equivalent to _and the rest_, _and so forth_, and hence not to be used if one of these would be insufficient,
that is, if the reader would be left in doubt as to any important particulars. Least open to objection when it
represents the last terms of a list already given in full, or immaterial words at the end of a quotation.
At the end of a list introduced by _such as_, _for example_, or any similar expression, _etc._ is incorrect.
**Fact.** Use this word only of matters of a kind capable of direct verification, not of matters of judgment. That a
particular event happened on a given date, that lead melts at a certain temperature, are facts. But such conclusions as
that Napoleon was the greatest of modern generals, or that the climate of California is delightful, however
incontestable they _may be_, are not properly facts.
On the formula _the fact that_, see under Rule 13.
**Factor.** A hackneyed word; the expressions of which it forms part can usually be replaced by something more direct
and idiomatic.
- **Original:** His superior training was the great factor in his winning the match.
- **Revision:** He won the match by being better trained.
- **Original:** Heavy artillery has become an increasingly important factor in deciding battles.
- **Revision:** Heavy artillery has played a constantly larger part in deciding battles.
**Feature.** Another hackneyed word; like _factor_ it usually adds nothing to the sentence in which it occurs.
- **Original:** A feature of the entertainment especially worthy of mention was the singing of Miss A.
- **Revision:** (Better use the same number of words to tell what Miss A. sang, or if the programme has already been
given, to tell how she sang.)
As a verb, in the advertising sense of _offer as a special attraction_, to be avoided.
**Fix.** Colloquial in America for _arrange_, _prepare_, _mend_. In writing restrict it to its literary senses,
_fasten_, _make firm or immovable_, etc.
**Get.** The colloquial _have got_ for _have_ should not be used in writing. The preferable form of the participle is
_got_.
**He is a man who.** A common type of redundant expression; see Rule 13.
| Original | Revision |
| ------------------------------------------------------- | ------------------------------------ |
| He is a man who is very ambitious. | He is very ambitious. |
| Spain is a country which I have always wanted to visit. | I have always wanted to visit Spain. |
**Help.** See under **But**.
**However.** In the meaning _nevertheless_, not to come first in its sentence or clause.
- **Original:** The roads were almost impassable. However, we at last succeeded in reaching camp.
- **Revision:** The roads were almost impassable. At last, however, we succeeded in reaching camp.
When _however_ comes first, it means _in whatever way_ or _to whatever extent_.
However you advise him, he will probably do as he thinks best.
However discouraging the prospect, he never lost heart.
**Interesting.** Avoid this word as a perfunctory means of introduction. Instead of announcing that what you are about
to tell is interesting, make it so.
- **Original:** An interesting story is told of
- **Revision:** (Tell the story without preamble.)
- **Original:** In connection with the anticipated visit of Mr. B. to America, it is interesting to recall that he
- **Revision:** Mr. B., who it is expected will soon visit America
**Kind of.** Not to be used as a substitute for _rather_ (before adjectives and verbs), or except in familiar style, for
_something like_ (before nouns). Restrict it to its literal sense: “Amber is a kind of fossil resin;” “I dislike that
kind of notoriety.” The same holds true of _sort of_.
**Less.** Should not be misused for _fewer_.
| Original | Revision |
| --------------------------------------------- | ---------------------------------------------- |
| He had less men than in the previous campaign | He had fewer men than in the previous campaign |
_Less_ refers to quantity, _fewer_ to number. “His troubles are less than mine” means “His troubles are not so great as
mine.” “His troubles are fewer than mine” means “His troubles are not so numerous as mine.” It is, however, correct to
say, “The signers of the petition were less than a hundred,” where the round number _a hundred_ is something like a
collective noun, and _less_ is thought of as meaning a less quantity or amount.
**Like.** Not to be misused for _as_. _Like_ governs nouns and pronouns; before phrases and clauses the equivalent word
is _as_.
| Original | Revision |
| ------------------------------------------ | ---------------------------------------- |
| We spent the evening like in the old days. | We spent the evening as in the old days. |
| He thought like I did. | He thought as I did (like me). |
**Line, along these lines.** _Line_ in the sense of _course of procedure_, _conduct_, _thought_, is allowable, but has
been so much overworked, particularly in the phrase _along these lines_, that a writer who aims at freshness or
originality had better discard it entirely.
| Original | Revision |
| --------------------------------------------------- | -------------------------------------- |
| Mr. B. also spoke along the same lines. | Mr. B. also spoke, to the same effect. |
| He is studying along the line of French literature. | He is studying French literature. |
**Literal, literally.** Often incorrectly used in support of exaggeration or violent metaphor.
| Original | Revision |
| --------------------------- | ------------------------------------- |
| A literal flood of abuse. | A flood of abuse. |
| Literally dead with fatigue | Almost dead with fatigue (dead tired) |
**Lose out.** Meant to be more emphatic than _lose_, but actually less so, because of its commonness. The same holds
true of _try out_, _win out_, _sign up_, _register up_. With a number of verbs, _out_ and _up_ form idiomatic
combinations: _find out_, _run out_, _turn out_, _cheer up_, _dry up_, _make up_, and others, each distinguishable in
meaning from the simple verb. _Lose out_ is not.
**Most.** Not to be used for _almost_.
| Original | Revision |
| ----------------- | ------------------- |
| Most everybody | Almost everybody |
| Most all the time | Almost all the time |
**Nature.** Often simply redundant, used like _character_.
| Original | Revision |
| -------------------------- | ------------ |
| Acts of a hostile _nature_ | Hostile acts |
Often vaguely used in such expressions as a “lover of nature;” “poems about nature.” Unless more specific statements
follow, the reader cannot tell whether the poems have to do with natural scenery, rural life, the sunset, the untracked
wilderness, or the habits of squirrels.
**Near by.** Adverbial phrase, not yet fully accepted as good English, though the analogy of _close by_ and _hard by_
seems to justify it. _Near_, or _near at hand_, is as good, if not better.
Not to be used as an adjective; use _neighboring_.
**Oftentimes, ofttimes.** Archaic forms, no longer in good use. The modern word is _often_.
**One hundred and one.** Retain the _and_ in this and similar expressions, in accordance with the unvarying usage of
English prose from Old English times.
**One of the most.** Avoid beginning essays or paragraphs with this formula, as, “One of the most interesting
developments of modern science is, etc.;” “Switzerland is one of the most interesting countries of Europe.” There is
nothing wrong in this; it is simply threadbare and forcible-feeble.
A common blunder is to use a singular verb in a relative clause following this or a similar expression, when the
relative is the subject.
| Original | Revision |
| ----------------------------------------------------- | ------------------------------------------------------ |
| One of the ablest men that has attacked this problem. | One of the ablest men that have attacked this problem. |
**Participle for verbal noun.**
- **Original:** Do you mind me asking a question?
- **Revision:** Do you mind my asking a question?
- **Original:** There was little prospect of the Senate accepting even this compromise.
- **Revision:** There was little prospect of the Senate's accepting even this compromise.
In the left-hand column, _asking_ and _accepting_ are present participles; in the right-hand column, they are verbal
nouns (gerunds). The construction shown in the left-hand column is occasionally found, and has its defenders. Yet it is
easy to see that the second sentence has to do not with a prospect of the Senate, but with a prospect of accepting. In
this example, at least, the construction is plainly illogical.
As the authors of The King's English point out, there are sentences apparently, but not really, of this type, in which
the possessive is not called for.
I cannot imagine Lincoln refusing his assent to this measure.
In this sentence, what the writer cannot imagine is Lincoln himself, in the act of refusing his assent. Yet the meaning
would be virtually the same, except for a slight loss of vividness, if he had written,
I cannot imagine Lincoln's refusing his assent to this measure.
By using the possessive, the writer will always be on the safe side.
In the examples above, the subject of the action is a single, unmodified term, immediately preceding the verbal noun,
and the construction is as good as any that could be used. But in any sentence in which it is a mere clumsy substitute
for something simpler, or in which the use of the possessive is awkward or impossible, should of course be recast.
- **Original:** In the event of a reconsideration of the whole matter's becoming necessary
- **Revision:** If it should become necessary to reconsider the whole matter
- **Original:** There was great dissatisfaction with the decision of the arbitrators being favorable to the company.
- **Revision:** There was great dissatisfaction that the arbitrators should have decided in favor of the company.
**People.** _The people_ is a political term, not to be confused with _the public_. From the people comes political
support or opposition; from the public comes artistic appreciation or commercial patronage.
**Phase.** Means a stage of transition or development: “the phases of the moon;” “the last phase.” Not to be used for
_aspect_ or _topic_.
| Original | Revision |
| ---------------------------- | -------------------------------- |
| Another phase of the subject | Another point (another question) |
**Possess.** Not to be used as a mere substitute for _have_ or _own_.
| Original | Revision |
| --------------------------------- | -------------------------------------- |
| He possessed great courage. | He had great courage (was very brave). |
| He was the fortunate possessor of | He owned |
**Prove.** The past participle is _proved_.
**Respective, respectively.** These words may usually be omitted with advantage.
- **Original:** Works of fiction are listed under the names of their respective authors.
- **Revision:** Works of fiction are listed under the names of their authors.
- **Original:** The one mile and two mile runs were won by Jones and Cummings respectively.
- **Revision:** The one mile and two mile runs were won by Jones and by Cummings.
In some kinds of formal writing, as geometrical proofs, it may be necessary to use _respectively_, but it should not
appear in writing on ordinary subjects.
**Shall, Will.** The future tense requires _shall_ for the first person, _will_ for the second and third. The formula to
express the speaker's belief regarding his future action or state is _I shall_; _I will_ expresses his determination or
his consent.
**Should.** See under **Would**.
**So.** Avoid, in writing, the use of _so_ as an intensifier: “so good;” “so warm;” “so delightful.”
On the use of _so_ to introduce clauses, see Rule 4.
**Sort of.** See under **Kind of**.
**Split Infinitive.** There is precedent from the fourteenth century downward for interposing an adverb between _to_ and
the infinitive which it governs, but the construction is in disfavor and is avoided by nearly all careful writers.
| Original | Revision |
| --------------------- | --------------------- |
| To diligently inquire | To inquire diligently |
**State.** Not to be used as a mere substitute for _say_, _remark_. Restrict it to the sense of _express fully or
clearly_, as, “He refused to state his objections.”
**Student Body.** A needless and awkward expression meaning no more than the simple word _students_.
| Original | Revision |
| ------------------------------------ | -------------------------------- |
| A member of the student body | A student |
| Popular with the student body | Liked by the students |
| The student body passed resolutions. | The students passed resolutions. |
**System.** Frequently used without need.
| Original | Revision |
| --------------------------------------------------------- | -------------------------------------------- |
| Dayton has adopted the commission system of _government._ | Dayton has adopted government by commission. |
| The dormitory system | Dormitories |
**Thanking You in Advance.** This sounds as if the writer meant, “It will not be worth my while to write to you again.”
In making your request, write, “Will you please,” or “I shall be obliged,” and if anything further seems necessary write
a letter of acknowledgment later.
**They.** A common inaccuracy is the use of the plural pronoun when the antecedent is a distributive expression such as
_each_, _each one_, _everybody_, _every one_, _many a man_, which, though implying more than one person, requires the
pronoun to be in the singular. Similar to this, but with even less justification, is the use of the plural pronoun with
the antecedent _anybody_, _any one_, _somebody_, _some one_, the intention being either to avoid the awkward “he or
she,” or to avoid committing oneself to either. Some bashful speakers even say, “A friend of mine told me that they,
etc.”
Use _he_ with all the above words, unless the antecedent is or must be feminine.
**Very.** Use this word sparingly. Where emphasis is necessary, use words strong in themselves.
**Viewpoint.** Write _point of view_, but do not misuse this, as many do, for _view_ or _opinion_.
**While.** Avoid the indiscriminate use of this word for _and_, _but_, and _although_. Many writers use it frequently as
a substitute for _and_ or _but_, either from a mere desire to vary the connective, or from uncertainty which of the two
connectives is the more appropriate. In this use it is best replaced by a semicolon.
- **Original:** The office and salesrooms are on the ground floor, while the rest of the building is devoted to
manufacturing.
- **Revision:** The office and salesrooms are on the ground floor; the rest of the building is devoted to
manufacturing.
Its use as a virtual equivalent of _although_ is allowable in sentences where this leads to no ambiguity or absurdity.
While I admire his energy, I wish it were employed in a better cause.
This is entirely correct, as shown by the paraphrase,
I admire his energy; at the same time I wish it were employed in a better cause.
Compare:
- **Original:** While the temperature reaches 90 or 95 degrees in the daytime, the nights are often chilly.
- **Revision:** Although the temperature reaches 90 or 95 degrees in the daytime, the nights are often chilly.
The paraphrase,
The temperature reaches 90 or 95 degrees in the daytime; at the same time the nights are often chilly,
shows why the use of _while_ is incorrect.
In general, the writer will do well to use _while_ only with strict literalness, in the sense of _during the time that_.
**Whom.** Often incorrectly used for _who_ before _he said_ or similar expressions, when it is really the subject of a
following verb.
- **Original:** His brother, whom he said would send him the money
- **Revision:** His brother, who he said would send him the money
- **Original:** The man whom he thought was his friend
- **Revision:** The man who (that) he thought was his friend (whom he thought his friend)
**Worth while.** Overworked as a term of vague approval and (with _not_) of disapproval. Strictly applicable only to
actions: “Is it worth while to telegraph?”
- **Original:** His books are not worth while.
- **Revision:** His books are not worth reading (are not worth one's while to read; do not repay reading; are
worthless).
The use of _worth while_ before a noun (“a worth while story”) is indefensible.
**Would.** A conditional statement in the first person requires _should_, not _would_.
I should not have succeeded without his help.
The equivalent of _shall_ in indirect quotation after a verb in the past tense is _should_, not _would_.
He predicted that before long we should have a great surprise.
To express habitual or repeated action, the past tense, without _would_, is usually sufficient, and from its brevity,
more emphatic.
| Original | Revision |
| ------------------------------------------- | --------------------------------------- |
| Once a year he would visit the old mansion. | Once a year he visited the old mansion. |