Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fish: TERM environment variable not set #16

Open
ethanliu opened this issue Mar 26, 2018 · 0 comments
Open

fish: TERM environment variable not set #16

ethanliu opened this issue Mar 26, 2018 · 0 comments

Comments

@ethanliu
Copy link

I think it more about sandboxing issue while fish shell can't get $TERM env.
fish global config (/usr/local/etc/fish/config.fish) and --init-command both not working as expect.

disable interactive mode to get rid of warning message seems works fine

DTRunManager.m

+ (NSArray*)argumentsToRunCommand:(NSString*)command {
    NSString* shell = [[DTRunManager shellPath] lastPathComponent];
    
    if([shell isEqualToString:@"bash"] || [shell isEqualToString:@"sh"])
        return @[@"-l", @"-i", @"-c", command];
    else if([shell isEqualToString:@"fish"])
        return @[@"-c", command];
    else
        return @[@"-i", @"-c", command];
}

Partial of the debug result with fish shell under NSTask or Process in swift

<2> fish: init_locale() setlocale(): 'C'
<2> fish: curses var TERM=''
<2> fish: curses var TERMINFO=''
<2> fish: curses var TERMINFO_DIRS=''
<W> fish: Could not set up terminal.
<W> fish: TERM environment variable not set.
<W> fish: Using fallback terminal type 'ansi'.
<2> fish: 256 color support: using 8 colors per terminfo
<2> fish: curses var TERM='ansi'
<2> fish: curses var TERMINFO=''
<2> fish: curses var TERMINFO_DIRS=''
<2> fish: 256 color support: using 8 colors per terminfo
<2> fish: sourcing /usr/local/share/fish/config.fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant