On 7/7/07, Chris Rebert <[EMAIL PROTECTED]> wrote: > I created a config.fish that, among other things, makes the prompt more > bash-like. Here is the relevant excerpt: > > > if status --is-interactive > set fish_color_cwd blue -o > function fish_prompt -d "Write out the prompt, ala bash" > set_color -o green > printf '[EMAIL PROTECTED] %s%s >%s ' (whoami) (hostname|cut -d . -f > 1) > (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) > end > end > > > However, with this in my config, when starting fish I get this: > > > Welcome to fish, the friendly interactive shell > Type help for instructions on how to use fish > commandline: Can not set commandline in non-interactive mode > /usr/share/fish/config_interactive.fish (line 169): commandline -f > repaint > ^ > in function "__fish_repaint", > called on line 1 of file "/home/user/.config/fish/config.fish", > with parameter list "VARIABLE SET fish_color_cwd" > > in event handler: handler for variable "fish_color_cwd" > > > commandline - set or get the current commandline buffer > > > Synopsis > commandline [OPTIONS] [CMD] > > commandline: Type 'help commandline' for related documentation > > [EMAIL PROTECTED] ~ > #fish now started, prompt is changed as per config > > > But fish is being started interactively, as evidenced by the fact that > the 'if' was true. So, why is fish complaining about the shell being > non-interactive? >
Hi. Thank you for the bug report. The error message is poorly phrased and misleading. When fish is sourcing a script (like in this case the init script), there is no prompt, so fish assumes it is in non-interactive mode when it should just stay silent. I've added a patch to fix this for the next fish version. Axel > Thanks, > Chris Rebert > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
