3

Is it possible to have different command line prompt in pure bash and mc? So, sometime i have mc started, but but panels switched off (Ctrl+O), and when i return back to the terminal after some period of time I forget is mc started or not, and some times try to start mc again, or try to switch on panels, when mc is not started.

So, what I try to do: in normal mode path should look like:

PS1=\u@\h:\w$

when in mc mode something like:

PS1=mc \u:\w$

So, the question is: how can i make different PS1 prompts for mc and pure bash?

radistao
  • 195
  • 1
  • 9

1 Answers1

3

man mc says:

If you are using bash you can specify startup commands for the subshell in your ~/.local/share/mc/bashrc file and special keyboard maps in the ~/.local/share/mc/inputrc file. tcsh users may specify startup commands in the ~/.local/share/mc/tcshrc file.

So you can set up your different version of PS1 variable inside ~/.local/share/mc/bashrc.

Nykakin
  • 3,732
  • 19
  • 22
  • found it, thanks. shame on me: i missed it in man, and i've tried already ~/.config/mc, ~/.mc and bunch of other places, but i missed only one right place for "shell specific settings" – radistao Sep 13 '16 at 09:59