File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// For the full copyright and license information, please view the LICENSE
44// file that was distributed with this source code.
55
6- // spell-checker:ignore (ToDO) clrtoeol dircolors eightbit endcode fnmatch leftcode multihardlink rightcode setenv sgid suid colorterm disp
6+ // spell-checker:ignore (ToDO) dircolors eightbit fnmatch setenv colorterm disp cshell
77
88use std:: borrow:: Borrow ;
99use std:: env;
@@ -43,12 +43,10 @@ fn guess_syntax<T: AsRef<Path>>(path: T) -> Option<OutputFmt> {
4343 return None ;
4444 }
4545
46- if let Some ( name) = shell_path. file_name ( ) {
47- if name == "csh" || name == "tcsh" {
48- Some ( OutputFmt :: CShell )
49- } else {
50- Some ( OutputFmt :: Shell )
51- }
46+ let is_cshell = |name| name == "csh" || name == "tcsh" ;
47+
48+ if shell_path. file_name ( ) . is_some_and ( is_cshell) {
49+ Some ( OutputFmt :: CShell )
5250 } else {
5351 Some ( OutputFmt :: Shell )
5452 }
You can’t perform that action at this time.
0 commit comments