diff --git a/cmake/Rust.cmake b/cmake/Rust.cmake index 40887be45..a8eadf839 100644 --- a/cmake/Rust.cmake +++ b/cmake/Rust.cmake @@ -26,7 +26,7 @@ set(rust_profile $,debug,$,releas set(rust_debugflags "$<$:-g>$<$:-g>") -# Temporary hack to propogate CMake flags/options to build.rs. We need to get CMake to evaluate the +# Temporary hack to propagate CMake flags/options to build.rs. We need to get CMake to evaluate the # truthiness of the strings if they are set. set(CMAKE_WITH_GETTEXT "1") if(DEFINED WITH_GETTEXT AND NOT "${WITH_GETTEXT}") @@ -47,7 +47,7 @@ get_property( set(VARS_FOR_CARGO "FISH_BUILD_DIR=${CMAKE_BINARY_DIR}" "PREFIX=${CMAKE_INSTALL_PREFIX}" - # Temporary hack to propogate CMake flags/options to build.rs. + # Temporary hack to propagate CMake flags/options to build.rs. "CMAKE_WITH_GETTEXT=${CMAKE_WITH_GETTEXT}" # Cheesy so we can tell cmake was used to build "CMAKE=1" diff --git a/cmake/Tests.cmake b/cmake/Tests.cmake index 56d150417..8e6ef66cd 100644 --- a/cmake/Tests.cmake +++ b/cmake/Tests.cmake @@ -48,7 +48,7 @@ add_custom_target(fish_run_tests ) # If CMP0037 is available, also make an alias "test" target. -# Note that this policy may not be available, in which case definining such a target silently fails. +# Note that this policy may not be available, in which case defining such a target silently fails. cmake_policy(PUSH) if(POLICY CMP0037) cmake_policy(SET CMP0037 OLD) diff --git a/printf/src/fmt_fp/decimal.rs b/printf/src/fmt_fp/decimal.rs index 23123454f..bc8a8205a 100644 --- a/printf/src/fmt_fp/decimal.rs +++ b/printf/src/fmt_fp/decimal.rs @@ -221,7 +221,7 @@ impl Decimal { // Round up if necessary. if self.should_round_up(last_digit_idx, remainder_to_round, mod_base) { self[last_digit_idx] += mod_base; - // Propogate carry. + // Propagate carry. while self[last_digit_idx] >= DIGIT_BASE { self[last_digit_idx] = 0; last_digit_idx -= 1; diff --git a/share/config.fish b/share/config.fish index 194c0e8dc..d8beb9d59 100644 --- a/share/config.fish +++ b/share/config.fish @@ -232,7 +232,7 @@ end if command -q kill # Only define this if something to wrap exists - # this allows a nice "commad not found" error to be triggered. + # this allows a nice "command not found" error to be triggered. function kill set -l args (__fish_expand_pid_args $argv) and command kill $args diff --git a/src/abbrs.rs b/src/abbrs.rs index c9fcc102d..4d58a81f9 100644 --- a/src/abbrs.rs +++ b/src/abbrs.rs @@ -177,7 +177,7 @@ pub struct AbbreviationSet { /// List of abbreviations, in definition order. abbrs: Vec, - /// Set of used abbrevation names. + /// Set of used abbreviation names. /// This is to avoid a linear scan when adding new abbreviations. used_names: HashSet, } diff --git a/src/builtins/complete.rs b/src/builtins/complete.rs index 618653834..4b1988fd4 100644 --- a/src/builtins/complete.rs +++ b/src/builtins/complete.rs @@ -223,7 +223,7 @@ pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> let mut result_mode = CompletionMode::default(); let mut remove = false; let mut short_opt = WString::new(); - // todo!("these whould be Vec<&wstr>"); + // todo!("these would be Vec<&wstr>"); let mut gnu_opt = vec![]; let mut old_opt = vec![]; let mut subcommand = vec![]; diff --git a/src/builtins/fg.rs b/src/builtins/fg.rs index 675a06ebd..a07746607 100644 --- a/src/builtins/fg.rs +++ b/src/builtins/fg.rs @@ -50,7 +50,7 @@ pub fn fg(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Optio } else if optind + 1 < argv.len() { // Specifying more than one job to put to the foreground is a syntax error, we still // try to locate the job $argv[1], since we need to determine which error message to - // emit (ambigous job specification vs malformed job id). + // emit (ambiguous job specification vs malformed job id). let mut found_job = false; if let Ok(Some(pid)) = fish_wcstoi(argv[optind]).map(Pid::new) { found_job = parser.job_get_from_pid(pid).is_some(); diff --git a/src/builtins/status.rs b/src/builtins/status.rs index 06a76ee41..3d2a30731 100644 --- a/src/builtins/status.rs +++ b/src/builtins/status.rs @@ -583,7 +583,7 @@ pub fn status(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> O } if path.is_absolute() { let path = str2wcstring(path.as_os_str().as_bytes()); - // This is an absoulte path, we can canonicalize it + // This is an absolute path, we can canonicalize it let real = match wrealpath(&path) { Some(p) if waccess(&p, F_OK) == 0 => p, // realpath did not work, just append the path diff --git a/src/builtins/string/collect.rs b/src/builtins/string/collect.rs index 7718a9a1f..dbf7b3bbd 100644 --- a/src/builtins/string/collect.rs +++ b/src/builtins/string/collect.rs @@ -48,7 +48,7 @@ impl StringSubCommand<'_> for Collect { } // If we haven't printed anything and "no_empty" is set, - // print something empty. Helps with empty ellision: + // print something empty. Helps with empty elision: // echo (true | string collect --allow-empty)"bar" // prints "bar". if self.allow_empty && appended == 0 { diff --git a/src/complete.rs b/src/complete.rs index 904375af5..ee6ddc22c 100644 --- a/src/complete.rs +++ b/src/complete.rs @@ -1807,7 +1807,7 @@ impl<'ctx> Completer<'ctx> { // The getpwent() function does not exist on Android. A Linux user on Android isn't // really a user - each installed app gets an UID assigned. Listing all UID:s is not // possible without root access, and doing a ~USER type expansion does not make sense - // since every app is sandboxed and can't access eachother. + // since every app is sandboxed and can't access each other. return false; } #[cfg(not(target_os = "android"))] diff --git a/src/env_dispatch.rs b/src/env_dispatch.rs index 8a6db3fd0..21d54e8b6 100644 --- a/src/env_dispatch.rs +++ b/src/env_dispatch.rs @@ -359,7 +359,7 @@ pub fn env_dispatch_init(vars: &EnvStack) { use once_cell::sync::Lazy; run_inits(vars); - // env_dispatch_var_change() purposely supresses change notifications until the dispatch table + // env_dispatch_var_change() purposely suppresses change notifications until the dispatch table // was initialized elsewhere (either explicitly as below or via deref of VAR_DISPATCH_TABLE). Lazy::force(&VAR_DISPATCH_TABLE); } diff --git a/src/exec.rs b/src/exec.rs index f74068ac0..bebd7dc8c 100644 --- a/src/exec.rs +++ b/src/exec.rs @@ -1349,7 +1349,7 @@ fn get_deferred_process(j: &Job) -> Option { return None; } - // Find the last non-external process, and return it if it pipes into an extenal process. + // Find the last non-external process, and return it if it pipes into an external process. for (i, p) in j.processes().iter().enumerate().rev() { if p.typ != ProcessType::external { return if p.is_last_in_job { None } else { Some(i) }; diff --git a/src/future_feature_flags.rs b/src/future_feature_flags.rs index 7c98e3aa8..e4afbe73b 100644 --- a/src/future_feature_flags.rs +++ b/src/future_feature_flags.rs @@ -28,7 +28,7 @@ pub enum FeatureFlag { /// Remove `test`'s one and zero arg mode (make `test -n` return false etc) test_require_arg, - /// Buffered enter (typed wile running a command) does not execute. + /// Buffered enter (typed while running a command) does not execute. buffered_enter_noexec, } diff --git a/src/history.rs b/src/history.rs index 2d41bc946..269158544 100644 --- a/src/history.rs +++ b/src/history.rs @@ -386,7 +386,7 @@ struct HistoryImpl { /// The file ID of the history file. history_file_id: FileId, // INVALID_FILE_ID /// The boundary timestamp distinguishes old items from new items. Items whose timestamps are <= - /// the boundary are considered "old". Items whose timestemps are > the boundary are new, and are + /// the boundary are considered "old". Items whose timestamps are > the boundary are new, and are /// ignored by this instance (unless they came from this instance). The timestamp may be adjusted /// by incorporate_external_changes(). boundary_timestamp: SystemTime, diff --git a/src/history/file.rs b/src/history/file.rs index 5125981b6..5a223cf82 100644 --- a/src/history/file.rs +++ b/src/history/file.rs @@ -1,4 +1,4 @@ -//! Implemention of history files. +//! Implementation of history files. use std::{ borrow::Cow, diff --git a/src/key.rs b/src/key.rs index 22ef27243..9517987c7 100644 --- a/src/key.rs +++ b/src/key.rs @@ -472,7 +472,7 @@ pub fn char_to_symbol(c: char) -> WString { } else if fish_wcwidth(c) > 0 { sprintf!(=> buf, "%lc", c); } else if c <= '\u{FFFF}' { - // BMP Unicode chararacter + // BMP Unicode character sprintf!(=> buf, "\\u%04X", u32::from(c)); } else { sprintf!(=> buf, "\\U%06X", u32::from(c)); diff --git a/src/parse_execution.rs b/src/parse_execution.rs index 988cca1f5..acd85766c 100644 --- a/src/parse_execution.rs +++ b/src/parse_execution.rs @@ -62,7 +62,7 @@ use std::sync::{atomic::Ordering, Arc}; /// cancellation. Note it does not track the exit status of commands. #[derive(Eq, PartialEq)] pub enum EndExecutionReason { - /// Evaluation was successfull. + /// Evaluation was successful. ok, /// Evaluation was skipped due to control flow (break or return). diff --git a/src/proc.rs b/src/proc.rs index 87149e987..3c59ad18b 100644 --- a/src/proc.rs +++ b/src/proc.rs @@ -377,7 +377,7 @@ impl TtyTransfer { // 1. There is no tty at all (tcgetpgrp() returns -1). For example running from a pure script. // Of course do not transfer it in that case. // 2. The tty is owned by the process. This comes about often, as the process will call - // tcsetpgrp() on itself between fork ane exec. This is the essential race inherent in + // tcsetpgrp() on itself between fork and exec. This is the essential race inherent in // tcsetpgrp(). In this case we want to reclaim the tty, but do not need to transfer it // ourselves since the child won the race. // 3. The tty is owned by a different process. This may come about if fish is running in the diff --git a/src/reader.rs b/src/reader.rs index 8c02e797b..4c27fad47 100644 --- a/src/reader.rs +++ b/src/reader.rs @@ -3899,7 +3899,7 @@ impl<'a> Reader<'a> { // Return true on success, false if we got an error, in which case the caller should fire the // error event. fn handle_execute(&mut self) -> bool { - // Evaluate. If the current command is unfinished, or if the charater is escaped + // Evaluate. If the current command is unfinished, or if the character is escaped // using a backslash, insert a newline. // If the user hits return while navigating the pager, it only clears the pager. if self.is_navigating_pager_contents() { @@ -4287,7 +4287,7 @@ fn acquire_tty_or_exit(shell_pgid: libc::pid_t) { // Bummer, we are not in control of the terminal. Stop until parent has given us control of // it. // - // In theory, reseting signal handlers could cause us to miss signal deliveries. In + // In theory, resetting signal handlers could cause us to miss signal deliveries. In // practice, this code should only be run during startup, when we're not waiting for any // signals. signal_reset_handlers(); diff --git a/src/screen.rs b/src/screen.rs index 729badb7e..9b8332678 100644 --- a/src/screen.rs +++ b/src/screen.rs @@ -825,7 +825,7 @@ impl Screen { if self.mtime_stdout_stderr != mtime_stdout_stderr() { // Ok, someone has been messing with our screen. We will want to repaint. However, we do not // know where the cursor is. It is our best bet that we are still on the same line, so we - // move to the beginning of the line, reset the modelled screen contents, and then set the + // move to the beginning of the line, reset the modeled screen contents, and then set the // modeled cursor y-pos to its earlier value. let prev_line = self.actual.cursor.y; self.reset_line(true /* repaint prompt */); @@ -1465,7 +1465,7 @@ impl LayoutCache { if endc != '\0' { if endc == '\n' || endc == '\x0C' { layout.line_breaks.push(trunc_prompt.len()); - // If the prompt ends in a new line, that's one empy last line. + // If the prompt ends in a new line, that's one empty last line. if run_end == prompt_str.len() - 1 { layout.last_line_width = 0; } diff --git a/src/threads.rs b/src/threads.rs index 0596b4465..b7f6ac166 100644 --- a/src/threads.rs +++ b/src/threads.rs @@ -533,7 +533,7 @@ pub(crate) fn iothread_drain_all(ctx: &mut Reader) { } } -/// `Debounce` is a simple class which executes one function on a background thread while enqueing +/// `Debounce` is a simple class which executes one function on a background thread while enqueuing /// at most one more. Subsequent execution requests overwrite the enqueued one. It takes an optional /// timeout; if a handler does not finish within the timeout then a new thread is spawned to service /// the remaining request. @@ -677,7 +677,7 @@ impl Debounce { } #[test] -/// Verify that spawing a thread normally via [`std::thread::spawn()`] causes the calling thread's +/// Verify that spawning a thread normally via [`std::thread::spawn()`] causes the calling thread's /// sigmask to be inherited by the newly spawned thread. fn std_thread_inherits_sigmask() { // First change our own thread mask diff --git a/src/topic_monitor.rs b/src/topic_monitor.rs index 1b49f91f0..4698001f3 100644 --- a/src/topic_monitor.rs +++ b/src/topic_monitor.rs @@ -330,7 +330,7 @@ pub struct TopicMonitor { status_: AtomicU8, /// Binary semaphore used to communicate changes. - /// If status_ is STATUS_NEEDS_WAKEUP, then a thread has commited to call wait() on our sema and + /// If status_ is STATUS_NEEDS_WAKEUP, then a thread has committed to call wait() on our sema and /// this must be balanced by the next call to post(). Note only one thread may wait at a time. sema_: BinarySemaphore, } diff --git a/src/wutil/fileid.rs b/src/wutil/fileid.rs index 3b6109b86..9be1a880a 100644 --- a/src/wutil/fileid.rs +++ b/src/wutil/fileid.rs @@ -14,7 +14,7 @@ pub struct DevInode { } /// While an inode / dev pair is sufficient to distinguish co-existing files, Linux -/// seems to aggressively re-use inodes, so it cannot determine if a file has been deleted +/// seems to aggressively reuse inodes, so it cannot determine if a file has been deleted /// (ABA problem). Therefore we include richer information to detect file changes. #[derive(Debug, Clone, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct FileId { diff --git a/tests/checks/alias.fish b/tests/checks/alias.fish index 71b1ee2ee..dceb6c715 100644 --- a/tests/checks/alias.fish +++ b/tests/checks/alias.fish @@ -32,7 +32,7 @@ functions d # CHECK: '/mnt/c/Program Files (x86)/devenv.exe' /Edit $argv # CHECK: end -# Use "command" to prevent recusion, and don't add --wraps to avoid accidental recursion in completion. +# Use "command" to prevent recursion, and don't add --wraps to avoid accidental recursion in completion. alias e 'e --option=value' functions e # CHECK: # Defined via `source` diff --git a/tests/checks/psub.fish b/tests/checks/psub.fish index d277072e2..a2e8c7d2c 100644 --- a/tests/checks/psub.fish +++ b/tests/checks/psub.fish @@ -12,7 +12,7 @@ rm $filename set -l filename (echo foo | psub --testing --fifo) test -p $filename or echo 'psub is not a fifo' >&2 -# hack: the background write that psub peforms may block +# hack: the background write that psub performs may block # until someone opens the fifo for reading. So make sure we # actually read it. cat $filename >/dev/null diff --git a/tests/checks/string.fish b/tests/checks/string.fish index a7c2c1eb9..bc6f25fb8 100644 --- a/tests/checks/string.fish +++ b/tests/checks/string.fish @@ -87,7 +87,7 @@ string pad -c_ --width 5 longer-than-width-param x # CHECK: ______________________x # Current behavior is that only a single padding character is supported. -# We can support longer strings in future without breaking compatibilty. +# We can support longer strings in future without breaking compatibility. string pad -c ab -w4 . # CHECKERR: string pad: Padding should be a character 'ab' diff --git a/tests/checks/tmux-abbr.fish b/tests/checks/tmux-abbr.fish index a822b540c..8c265960e 100644 --- a/tests/checks/tmux-abbr.fish +++ b/tests/checks/tmux-abbr.fish @@ -34,7 +34,7 @@ isolated-tmux send-keys abbr-test C-Space arg3 Enter tmux-sleep # CHECK: prompt {{\d+}}> abbr-test arg3 -# Do not expand abbrevation if the cursor is not at the command, even if it's just white space. +# Do not expand abbreviation if the cursor is not at the command, even if it's just white space. # This makes the behavior more consistent with the above two scenarios. isolated-tmux send-keys abbr-test C-Space Enter tmux-sleep diff --git a/tests/checks/trap.fish b/tests/checks/trap.fish index c88de3abd..e10bf531a 100644 --- a/tests/checks/trap.fish +++ b/tests/checks/trap.fish @@ -39,7 +39,7 @@ sleep .1 kill -USR2 $fish_pid sleep .1 -# Send the signal and immediately define the function; it should not excute. +# Send the signal and immediately define the function; it should not execute. kill -USR1 $fish_pid function handle1 --on-signal SIGUSR1 gotsigusr1 diff --git a/tests/pexpects/disable_mouse.py b/tests/pexpects/disable_mouse.py index 5fe11d987..0c5c13db7 100644 --- a/tests/pexpects/disable_mouse.py +++ b/tests/pexpects/disable_mouse.py @@ -4,7 +4,7 @@ from pexpect_helper import SpawnedProc sp = SpawnedProc(args=["-d", "reader"]) sp.expect_prompt() -# Verify we correctly diable mouse tracking. +# Verify we correctly disable mouse tracking. # Five char sequence. sp.send("\x1b[tDE") diff --git a/tests/pexpects/exit_nohang.py b/tests/pexpects/exit_nohang.py index a91093d36..756d87ef4 100644 --- a/tests/pexpects/exit_nohang.py +++ b/tests/pexpects/exit_nohang.py @@ -49,7 +49,7 @@ if fish_pid == tty_owner: # It must not hang. But it might hang when trying to restore the tty. os.kill(fish_pid, signal.SIGTERM) -# Loop a bit until the process exits (correct) or stops (incorrrect). +# Loop a bit until the process exits (correct) or stops (incorrect). # When it exits it should be due to the SIGTERM that we sent it. for i in range(50): pid, status = os.waitpid(fish_pid, os.WUNTRACED | os.WNOHANG)