logoalt Hacker News

SJMGlast Friday at 2:11 AM2 repliesview on HN

Uh do aliases load in non-interactive shells?


Replies

figmertlast Friday at 4:47 AM

Create a wrapping binary instead

    mkdir -p ~/.local/bin
    printf '#!/usr/bin/env sh\nexec android-cli --no-metrics "$@"' > ~/.local/bin/android-cli
    echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.zshenv
show 1 reply
EdwardDiegolast Friday at 4:27 AM

You could export BASH_ENV to have Bash processes source a given file at startup.

Zsh has .zshenv, and Fish just has config.fish for everything with the ability to guard certain things within it to login only or non-interactive only.