far command doesn't launch Far Manager in PowerShell on Windows 10 #21013

Closed
opened 2026-01-31 07:30:37 +00:00 by claunia · 6 comments
Owner

Originally created by @jdrch on GitHub (Dec 23, 2023).

Windows Terminal version

1.19.3172.0

Windows build number

10.0.19045.3803

Other Software

No response

Steps to reproduce

  1. Install Far Manager using the GUI .msi, selecting the Path features to be installed
  2. Open Windows Terminal
  3. Type far
  4. Hit Enter

Expected Behavior

Far Manager starts.

Actual Behavior

Error message appears:

> far
far: The term 'far' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Originally created by @jdrch on GitHub (Dec 23, 2023). ### Windows Terminal version 1.19.3172.0 ### Windows build number 10.0.19045.3803 ### Other Software _No response_ ### Steps to reproduce 1. Install Far Manager using the GUI .msi, selecting the `Path` features to be installed 2. Open Windows Terminal 3. Type `far` 4. Hit `Enter` ### Expected Behavior Far Manager starts. ### Actual Behavior Error message appears: ``` > far far: The term 'far' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. ```
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 07:30:37 +00:00
Author
Owner

@o-sdn-o commented on GitHub (Dec 23, 2023):

This may be related to #16226.

@o-sdn-o commented on GitHub (Dec 23, 2023): This may be related to #16226.
Author
Owner

@jdrch commented on GitHub (Dec 23, 2023):

This may be related to #16226.

Good thinking. However, cmd throws an error message in response to > far too. Also, > micro works in PowerShell immediately after installation via winget.

FWIW, folks at the actual Far Manager repo are saying the path variable or alias apparently have to be manually set no matter what.

@jdrch commented on GitHub (Dec 23, 2023): > This may be related to #16226. Good thinking. However, `cmd` throws an error message in response to `> far` too. Also, `> micro` works in PowerShell immediately after installation via `winget`. FWIW, folks at the actual Far Manager repo are [saying](https://github.com/FarGroup/FarManager/discussions/766#discussioncomment-7935151) the path variable or alias apparently have to be manually set no matter what.
Author
Owner

@237dmitry commented on GitHub (Dec 24, 2023):

I added alias for far.exe in powershell's profile:

Set-Alias -Name far  -Value "D:\bin\Far-3\.\far.exe"

FAR was installed manually from the 7z archive and has been updated by script every week for several years. And it's not in $env:PATH.

@237dmitry commented on GitHub (Dec 24, 2023): I added alias for far.exe in powershell's profile: ``` Set-Alias -Name far -Value "D:\bin\Far-3\.\far.exe" ``` FAR was installed manually from the 7z archive and has been updated by script every week for several years. And it's not in $env:PATH.
Author
Owner

@zcobol commented on GitHub (Dec 25, 2023):

Installing Far Manager via winget doesn't add far.exe to user or system path variables:

PS C:\Users\zcobol> winget install --id FarManager.FarManager
Found Far Manager 3 [FarManager.FarManager] Version 3.0.6226
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.farmanager.com/files/Far30b6226.x64.20231214.msi
  ██████████████████████████████  12.9 MB / 12.9 MB
Successfully verified installer hash
Starting package install...
Successfully installed

Restart terminal and look for the command:

PS C:\Users\zcobol> gcm far.exe
Get-Command: The term 'far.exe' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

This looks like a Far Manager installer bug!

@zcobol commented on GitHub (Dec 25, 2023): Installing `Far Manager` via `winget` doesn't add `far.exe` to user or system path variables: ``` PS C:\Users\zcobol> winget install --id FarManager.FarManager Found Far Manager 3 [FarManager.FarManager] Version 3.0.6226 This application is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Downloading https://www.farmanager.com/files/Far30b6226.x64.20231214.msi ██████████████████████████████ 12.9 MB / 12.9 MB Successfully verified installer hash Starting package install... Successfully installed ``` Restart terminal and look for the command: ``` PS C:\Users\zcobol> gcm far.exe Get-Command: The term 'far.exe' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. ``` This looks like a `Far Manager` installer bug!
Author
Owner

@237dmitry commented on GitHub (Dec 25, 2023):

This looks like a Far Manager installer bug!

I think it's more of a Windows tradition))
These directories were added to %PATH% automatically:

PS >  $env:PATH.Split(';')
C:\Program Files\PowerShell\7
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\WINDOWS\System32\WindowsPowerShell\v1.0\
C:\WINDOWS\System32\OpenSSH\
C:\Program Files\PowerShell\7\
C:\Users\<user>\AppData\Local\Microsoft\WindowsApps
@237dmitry commented on GitHub (Dec 25, 2023): > This looks like a Far Manager installer bug! I think it's more of a Windows tradition)) These directories were added to `%PATH%` automatically: ```powershell PS > $env:PATH.Split(';') C:\Program Files\PowerShell\7 C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\WINDOWS\System32\OpenSSH\ C:\Program Files\PowerShell\7\ C:\Users\<user>\AppData\Local\Microsoft\WindowsApps ```
Author
Owner

@lexKaktus commented on GitHub (Jun 3, 2024):

I added alias for far.exe in powershell's profile:

Set-Alias -Name far  -Value "D:\bin\Far-3\.\far.exe"

Thanks a lot!!!
My version with the ability to open in the current directory and a fast text editor for the terminal

#Open far  fix
function OpenFar {
    if ($args) {
        & "C:\Program Files\Far Manager\Far.exe" $args
    } else {
        & "C:\Program Files\Far Manager\Far.exe" $pwd $pwd
    }
}
function FarEdit{
    & "C:\Program Files\Far Manager\Far.exe" -e $args
}

Set-Alias -Name far -Value OpenFar
Set-Alias -Name edit -Value FarEdit
@lexKaktus commented on GitHub (Jun 3, 2024): > I added alias for far.exe in powershell's profile: > > ``` > Set-Alias -Name far -Value "D:\bin\Far-3\.\far.exe" > ``` Thanks a lot!!! My version with the ability to open in the current directory and a fast text editor for the terminal ``` #Open far fix function OpenFar { if ($args) { & "C:\Program Files\Far Manager\Far.exe" $args } else { & "C:\Program Files\Far Manager\Far.exe" $pwd $pwd } } function FarEdit{ & "C:\Program Files\Far Manager\Far.exe" -e $args } Set-Alias -Name far -Value OpenFar Set-Alias -Name edit -Value FarEdit ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21013