diff --git a/PSReadLine/Changes.txt b/PSReadLine/Changes.txt
index a3822e36..18ffcc3c 100644
--- a/PSReadLine/Changes.txt
+++ b/PSReadLine/Changes.txt
@@ -6,7 +6,7 @@
### [2.2.5] - 2022-05-03
-- Re-package the `2.2.4-beta1` version to `2.2.5` as an offical servicing release.
+- Re-package the `2.2.4-beta1` version to `2.2.5` as an official servicing release.
[2.2.5]: https://github.com/PowerShell/PSReadLine/compare/v2.2.4-beta1...v2.2.5
@@ -385,7 +385,7 @@ Bug fixes:
* Fix InvokePrompt when the prompt is > 1 line.
* Fix YankToPercent off by 1 error.
* Fix error reported when running in container.
-* Catch and ignore execptions in InvokePrompt (#583)
+* Catch and ignore exceptions in InvokePrompt (#583)
* Get new completions on 2nd tab if 1st had 1 result (#238)
* Tab replaced with 4 spaces during paste (#144)
* Fix rendering after buffer resize (#418)
@@ -670,7 +670,7 @@ New features:
* Add ETW event source for demo mode, key logger, macro recorder etc.
* Undo/redo
* Get-PSReadLineOption cmdlet
-* Make specifying key handlers for builtins simpler
+* Make specifying key handlers for built-ins simpler
* Current un-entered line is saved and recalled when cycling through history
* Support syntax coloring of member names
diff --git a/PSReadLine/Cmdlets.cs b/PSReadLine/Cmdlets.cs
index f6afe327..ee323db5 100644
--- a/PSReadLine/Cmdlets.cs
+++ b/PSReadLine/Cmdlets.cs
@@ -853,7 +853,7 @@ public class SetPSReadLineKeyHandlerCommand : ChangePSReadLineKeyHandlerCommandB
public string BriefDescription { get; set; }
[Parameter(ParameterSetName = "ScriptBlock")]
- [Alias("LongDescription")] // Alias to stay comptible with previous releases
+ [Alias("LongDescription")] // Alias to stay compatible with previous releases
public string Description { get; set; }
private const string FunctionParameter = "Function";
diff --git a/PSReadLine/Completion.cs b/PSReadLine/Completion.cs
index 4523e524..5a8dd9b0 100644
--- a/PSReadLine/Completion.cs
+++ b/PSReadLine/Completion.cs
@@ -1079,7 +1079,7 @@ private void MenuCompleteImpl(Menu menu, CommandCompletion completions)
processingKeys = false;
prependNextKey = true;
- // without this branch experience doesnt look naturally
+ // without this branch experience doesn't look naturally
if (_dispatchTable.TryGetValue(nextKey, out var handler) &&
(
handler.Action == CopyOrCancelLine ||
diff --git a/PSReadLine/DisplayBlockBase.cs b/PSReadLine/DisplayBlockBase.cs
index c4da5324..e84be99a 100644
--- a/PSReadLine/DisplayBlockBase.cs
+++ b/PSReadLine/DisplayBlockBase.cs
@@ -49,7 +49,7 @@ protected void MoveCursorToStartDrawingPosition(IConsole console)
{
// Calculate the coord to place the cursor at the end of current input.
Point bufferEndPoint = Singleton.ConvertOffsetToPoint(Singleton._buffer.Length);
- // Top must be initialized before any possible adjustion by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
+ // Top must be initialized before any possible adjustment by 'AdjustForPossibleScroll' or 'AdjustForActualScroll',
// otherwise its value would be corrupted and cause rendering issue.
Top = bufferEndPoint.Y + 1;
diff --git a/PSReadLine/Keys.cs b/PSReadLine/Keys.cs
index c9ed230e..4a621bb2 100644
--- a/PSReadLine/Keys.cs
+++ b/PSReadLine/Keys.cs
@@ -139,7 +139,7 @@ internal static void TryGetCharFromConsoleKey(ConsoleKeyInfo key, ref char resul
// get corresponding scan code
uint scanCode = MapVirtualKey(virtualKey, 0x0 /*MAPVK_VK_TO_VSC*/);
- // get corresponding character - maybe be 0, 1 or 2 in length (diacriticals)
+ // get corresponding character - may be 0, 1 or 2 in length (diacriticals)
var chars = toUnicodeBuffer.Value;
var flags = 0u; /* If bit 0 is set, a menu is active. */
var osVersion = Environment.OSVersion.Version;
@@ -238,7 +238,7 @@ void AppendPart(string str)
{
// A heuristic to check for dead keys --
// We got an 'OemXXX' ConsoleKey, '\0' key char, and no 'Ctrl' modifier. It's very likely generated by a dead key.
- // We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combinding 'Ctrl' with
+ // We check for 'Ctrl' modifier because it's easy to generate '\0' KeyChar and 'OemXXX' by combining 'Ctrl' with
// another special key, such as 'Ctrl+?' and 'Ctrl+;'.
isDeadKey = (c == '\0') && (consoleKey >= ConsoleKey.Oem1 && consoleKey <= ConsoleKey.Oem102) && !isCtrl;
diff --git a/PSReadLine/Movement.cs b/PSReadLine/Movement.cs
index 074ae4b1..da52230e 100644
--- a/PSReadLine/Movement.cs
+++ b/PSReadLine/Movement.cs
@@ -527,16 +527,16 @@ private static char TryGetArgAsChar(object arg)
}
///
- /// Read a character and search forward for the next occurence of that character.
+ /// Read a character and search forward for the next occurrence of that character.
/// If an argument is specified, search forward (or backward if negative) for the
- /// nth occurence.
+ /// nth occurrence.
///
public static void CharacterSearch(ConsoleKeyInfo? key = null, object arg = null)
{
- int occurence = arg as int? ?? 1;
- if (occurence < 0)
+ int occurrence = arg as int? ?? 1;
+ if (occurrence < 0)
{
- CharacterSearchBackward(key, -occurence);
+ CharacterSearchBackward(key, -occurrence);
return;
}
@@ -550,31 +550,31 @@ public static void CharacterSearch(ConsoleKeyInfo? key = null, object arg = null
{
if (_singleton._buffer[i] == toFind)
{
- occurence -= 1;
- if (occurence == 0)
+ occurrence -= 1;
+ if (occurrence == 0)
{
_singleton.MoveCursor(i);
break;
}
}
}
- if (occurence > 0)
+ if (occurrence > 0)
{
Ding();
}
}
///
- /// Read a character and search backward for the next occurence of that character.
+ /// Read a character and search backward for the next occurrence of that character.
/// If an argument is specified, search backward (or forward if negative) for the
- /// nth occurence.
+ /// nth occurrence.
///
public static void CharacterSearchBackward(ConsoleKeyInfo? key = null, object arg = null)
{
- int occurence = arg as int? ?? 1;
- if (occurence < 0)
+ int occurrence = arg as int? ?? 1;
+ if (occurrence < 0)
{
- CharacterSearch(key, -occurence);
+ CharacterSearch(key, -occurrence);
return;
}
@@ -588,8 +588,8 @@ public static void CharacterSearchBackward(ConsoleKeyInfo? key = null, object ar
{
if (_singleton._buffer[i] == toFind)
{
- occurence -= 1;
- if (occurence == 0)
+ occurrence -= 1;
+ if (occurrence == 0)
{
_singleton.MoveCursor(i);
return;
diff --git a/PSReadLine/PSReadLineResources.Designer.cs b/PSReadLine/PSReadLineResources.Designer.cs
index 4a8e905e..925355f7 100644
--- a/PSReadLine/PSReadLineResources.Designer.cs
+++ b/PSReadLine/PSReadLineResources.Designer.cs
@@ -241,7 +241,7 @@ internal static string CaptureScreenDescription {
}
///
- /// Looks up a localized string similar to Read a character and move the cursor to the previous occurence of that character.
+ /// Looks up a localized string similar to Read a character and move the cursor to the previous occurrence of that character.
///
internal static string CharacterSearchBackwardDescription {
get {
@@ -250,7 +250,7 @@ internal static string CharacterSearchBackwardDescription {
}
///
- /// Looks up a localized string similar to Read a character and move the cursor to the next occurence of that character.
+ /// Looks up a localized string similar to Read a character and move the cursor to the next occurrence of that character.
///
internal static string CharacterSearchDescription {
get {
diff --git a/PSReadLine/PSReadLineResources.resx b/PSReadLine/PSReadLineResources.resx
index f90b510c..7dc66be2 100644
--- a/PSReadLine/PSReadLineResources.resx
+++ b/PSReadLine/PSReadLineResources.resx
@@ -292,10 +292,10 @@
Move the text from the cursor to the start of the current or previous whitespace delimited word to the kill ring
- Read a character and move the cursor to the previous occurence of that character
+ Read a character and move the cursor to the previous occurrence of that character
- Read a character and move the cursor to the next occurence of that character
+ Read a character and move the cursor to the next occurrence of that character
Start or accumulate a numeric argument to other functions
diff --git a/PSReadLine/Prediction.Views.cs b/PSReadLine/Prediction.Views.cs
index de04c4e1..ddfbd073 100644
--- a/PSReadLine/Prediction.Views.cs
+++ b/PSReadLine/Prediction.Views.cs
@@ -742,7 +742,7 @@ internal override void RenderSuggestion(List consoleBufferLines,
// The whole suggestion text cannot fit in the console buffer without having part of it scrolled up off the buffer.
// We truncate the end part and append ellipsis.
- // We need to truncate 4 buffer cells ealier (just to be safe), so we have enough room to add the ellipsis.
+ // We need to truncate 4 buffer cells earlier (just to be safe), so we have enough room to add the ellipsis.
int lenFromEnd = SubstringLengthByCellsFromEnd(_suggestionText, length - 1, countOfCells: 4);
totalLength = length - lenFromEnd;
if (totalLength <= inputLength)
diff --git a/PSReadLine/ReadLine.cs b/PSReadLine/ReadLine.cs
index e38b05c5..a6010bb9 100644
--- a/PSReadLine/ReadLine.cs
+++ b/PSReadLine/ReadLine.cs
@@ -777,7 +777,7 @@ private void Initialize(Runspace runspace, EngineIntrinsics engineIntrinsics)
private void DelayedOneTimeInitialize()
{
// Delayed initialization is needed so that options can be set
- // after the constuctor but have an affect before the user starts
+ // after the constructor but have an affect before the user starts
// editing their first command line. For example, if the user
// specifies a custom history save file, we don't want to try reading
// from the default one.
diff --git a/PSReadLine/Render.Helper.cs b/PSReadLine/Render.Helper.cs
index 9fd67159..0c041e73 100644
--- a/PSReadLine/Render.Helper.cs
+++ b/PSReadLine/Render.Helper.cs
@@ -93,7 +93,7 @@ internal static int LengthInBufferCells(char c)
(c >= 0xff00 && c <= 0xff60) || /* Fullwidth Forms */
(c >= 0xffe0 && c <= 0xffe6));
// We can ignore these ranges because .Net strings use surrogate pairs
- // for this range and we do not handle surrogage pairs.
+ // for this range and we do not handle surrogate pairs.
// (c >= 0x20000 && c <= 0x2fffd) ||
// (c >= 0x30000 && c <= 0x3fffd)
return 1 + (isWide ? 1 : 0);
diff --git a/PSReadLine/Render.cs b/PSReadLine/Render.cs
index 94df9631..ff5649fe 100644
--- a/PSReadLine/Render.cs
+++ b/PSReadLine/Render.cs
@@ -1162,7 +1162,7 @@ private void MoveCursor(int newCursor)
_previousRender.initialY = _initialY;
}
- // While waiting to render, and a keybinding has occured that is moving the cursor,
+ // While waiting to render, and a keybinding has occurred that is moving the cursor,
// converting offset to point could potentially result in an invalid screen position,
// but the insertion point should reflect the move.
_current = newCursor;
diff --git a/PSReadLine/YankPaste.vi.cs b/PSReadLine/YankPaste.vi.cs
index 727fec87..d59fdd5c 100644
--- a/PSReadLine/YankPaste.vi.cs
+++ b/PSReadLine/YankPaste.vi.cs
@@ -80,7 +80,7 @@ private void SaveLinesToClipboard(int lineIndex, int lineCount)
///
///
/// Use 'false' as the default value because this method is used a lot by VI operations,
- /// and for VI opeartions, we do NOT want to move the cursor to the end when undoing a
+ /// and for VI operations, we do NOT want to move the cursor to the end when undoing a
/// deletion.
///
private void RemoveTextToViRegister(
diff --git a/build.ps1 b/build.ps1
index 0c303bc9..bb41830b 100644
--- a/build.ps1
+++ b/build.ps1
@@ -57,7 +57,7 @@ if ($Clean) {
Import-Module "$PSScriptRoot/tools/helper.psm1"
if ($Bootstrap) {
- Write-Log "Validate and install missing prerequisits for building ..."
+ Write-Log "Validate and install missing prerequisites for building ..."
Install-Dotnet
if (-not (Get-Module -Name InvokeBuild -ListAvailable)) {
diff --git a/test/CompletionTest.cs b/test/CompletionTest.cs
index c2f6bad1..eeec6a16 100644
--- a/test/CompletionTest.cs
+++ b/test/CompletionTest.cs
@@ -975,7 +975,7 @@ public void MenuCompletions_WorkWithListView()
using var disp = SetPrediction(PredictionSource.History, PredictionViewStyle.ListView);
_console.Clear();
- SetHistory("Get-Mocha -AddMilk -AddSugur -ExtraCup", "Get-MoreBook -Kind Fiction -FlatCover");
+ SetHistory("Get-Mocha -AddMilk -AddSugar -ExtraCup", "Get-MoreBook -Kind Fiction -FlatCover");
Test("Get-Module", Keys(
"Get-Mo",
@@ -994,8 +994,8 @@ public void MenuCompletions_WorkWithListView()
TokenClassification.ListPrediction, '>',
TokenClassification.None, ' ',
emphasisColors, "Get-Mo",
- TokenClassification.None, "cha -AddMilk -AddSugur -ExtraCup",
- TokenClassification.None, new string(' ', listWidth - 49), // 49 is the length of '> Get-Mocha -AddMilk -AddSugur -ExtraCup' plus '[History]'.
+ TokenClassification.None, "cha -AddMilk -AddSugar -ExtraCup",
+ TokenClassification.None, new string(' ', listWidth - 49), // 49 is the length of '> Get-Mocha -AddMilk -AddSugar -ExtraCup' plus '[History]'.
TokenClassification.None, '[',
TokenClassification.ListPrediction, "History",
TokenClassification.None, ']')),
diff --git a/test/MockConsole.cs b/test/MockConsole.cs
index 372a6fff..dc218e77 100644
--- a/test/MockConsole.cs
+++ b/test/MockConsole.cs
@@ -102,7 +102,7 @@ protected TestConsole(int width, int height, bool mimicScrolling)
_bufferWidth = _windowWidth = width;
_bufferHeight = _windowHeight = height;
- // Use a big enough buffer when we are mimicing scrolling.
+ // Use a big enough buffer when we are mimicking scrolling.
int bufferSize = mimicScrolling ? BufferWidth * 1000 : BufferWidth * BufferHeight;
buffer = new CHAR_INFO[bufferSize];
ClearBuffer();
diff --git a/test/RenderTest.cs b/test/RenderTest.cs
index 647fac67..a1222c11 100644
--- a/test/RenderTest.cs
+++ b/test/RenderTest.cs
@@ -307,7 +307,7 @@ public void InvokePrompt()
Tuple.Create(_console.ForegroundColor, _console.BackgroundColor), "PSREADLINE> ",
TokenClassification.Command, "dir"))));
- // Tricky prompt - writes to console directly with colors, uses ^H trick to eliminate trailng space.
+ // Tricky prompt - writes to console directly with colors, uses ^H trick to eliminate trailing space.
using (var ps = PowerShell.Create(RunspaceMode.CurrentRunspace))
{
ps.AddCommand("New-Variable").AddParameter("Name", "__console").AddParameter("Value", _console).Invoke();
diff --git a/tools/CheckHelp.ps1 b/tools/CheckHelp.ps1
index 2a3caa62..bc37b540 100644
--- a/tools/CheckHelp.ps1
+++ b/tools/CheckHelp.ps1
@@ -13,7 +13,7 @@ Import-Module $PSScriptRoot/helper.psm1
$t ='Microsoft.PowerShell.PSConsoleReadLine' -as [type]
if ($null -ne $t)
{
- # Make sure we're runnning in a non-interactive session by relaunching
+ # Make sure we're running in a non-interactive session by relaunching
$psExePath = Get-PSExePath
& $psExePath -NoProfile -NonInteractive -File $PSCommandPath $Configuration
exit $LASTEXITCODE
diff --git a/tools/releaseTools.psm1 b/tools/releaseTools.psm1
index 3437e93a..8fab92e1 100644
--- a/tools/releaseTools.psm1
+++ b/tools/releaseTools.psm1
@@ -168,7 +168,7 @@ function Get-ChangeLog
## but not reachable from the last release tag. Instead, we need to exclude the commits that were cherry-picked,
## and only include the commits that are not in the last release into the change log.
- # Find the commits that were only in the orginal master, excluding those that were cherry-picked to release branch.
+ # Find the commits that were only in the original master, excluding those that were cherry-picked to release branch.
$new_commits_from_other_parent = git --no-pager log --first-parent --cherry-pick --right-only "$tag_hash...$other_parent_hash" --format=$format | New-CommitNode
# Find the commits that were only in the release branch, excluding those that were cherry-picked from master branch.
$new_commits_from_last_release = git --no-pager log --first-parent --cherry-pick --left-only "$tag_hash...$other_parent_hash" --format=$format | New-CommitNode