def appendAliasExpansion():
    # zsh by default expands aliases when running in interactive mode
    # (see ../fpp). bash (on this author's Yosemite box) seems to have
    # alias expansion off when run with -i present and -c absent,
    # despite documentation hinting otherwise.
    #
    # so here we must ask bash to turn on alias expansion.
    shell = os.environ.get('SHELL')
    if 'fish' not in shell:
        appendToFile("""
if type shopt > /dev/null; then
  shopt -s expand_aliases
fi
""")
dataset/ETHPy150Open facebook/PathPicker/src/output.py/appendAliasExpansion/original