far2l
far2l copied to clipboard
Better linux shell integration.
Feature request.
Provide better linux shell integration:
- use .profile and shell rc files to configure shell used in far
- use $PS1 as a command prompt string
- cd command should also change directory displayed on the current panel (cd .., cd ~, cd)
As I can see cd command now works. Use of $PS1 is not good idea. Usually user already know computer and user name, omitting them save some space for useful information like long file path. Configure shell is good feature.
- tested cd, it's working now, eventually it got fixed.
- $PS1 it's a customization. For example I like to display current repository branch I'm in and without this information I've noticed, that I experience some discomfort. The best solution is to integrate whole shell configuration and let user decide how he wants to deal with prompt.
FAR has its own prompt customization, configured via Options/Command Line Settings
This customization is not that powerful the zsh or bash has and also it requires user to do this configuration twice: in the shell and in the far separately, which is not very convenient to say the least.
Items 1 and 3 already work in Far (.bashrc works), so they can be crossed out.
So the issue can probably be renamed to "Support $PS1"?
And about PS1: far have own prompt formatting option. Just may be its not so fancy as PS1..
Yep, I verified it before writing. I believe that it only makes sense on Windows, and is redundant on Linux/OSX.
Windows does have %PROMPT%, but its features are laughable.
The way I would approach the issue is - to REMOVE Far's option (or move it to registry/whatever), and use the system default. Some minority of Windows users will not like it, but as long as they have a tool to customize it, this should be OK.
But my original proposal was only about editing the issue title.
For example I like to display current repository branch I'm in and without this information I've noticed, that I experience some discomfort.
@invy If this issue is still actual, try to build far2l from this branch https://github.com/ujos/far2l/tree/get_git_branch.
@ujos The ticket was not only about current git branch, but about the ability to take information about 'prompt' from the shell and reuse it (or just somehow integrate shell?). As far as I remember back than I was missing some of my customization in the shell prompt when opening far2l.