Sha256: ea235b36b9e76fa1cd0cb02c068ee99373aeaf5e56f999827163e7716f1bca49

Contents?: true

Size: 609 Bytes

Versions: 47

Compression:

Stored size: 609 Bytes

Contents

#!/bin/bash
# This alias allows invocations of `python` to work as expected under msys bash.
# In particular, it detects if stdout+stdin are both attached to a pseudo-tty,
# and if so, invokes python in interactive mode. If this is not the case, or
# the user passes any arguments, python will be invoked unmodified.
python() {
  if [[ $# > 0 ]]; then
    python.exe "$@"
  else
    readlink /proc/$$/fd/0 | grep pty > /dev/null
    TTY0=$?
    readlink /proc/$$/fd/1 | grep pty > /dev/null
    TTY1=$?
    if [ $TTY0 == 0 ] && [ $TTY1 == 0 ]; then
      python.exe -i
    else
      python.exe
    fi
  fi
}

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
libv8-8.4.255.0.1 vendor/depot_tools/bootstrap/profile.d.python.sh
libv8-8.4.255.0 vendor/depot_tools/bootstrap/profile.d.python.sh
libv8-7.8.279.23.0beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-7.4.288.28.0beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-7.3.492.27.3beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-7.3.492.27.1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-7.3.492.27.0 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-7.3.492.27.0beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.7.288.46.1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.7.288.46.0 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.7.288.46.1beta0 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.3.292.48.1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.3.292.48.0 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.3.292.48.0beta2 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.3.292.48.0beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.2.414.42.1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.2.414.42.0 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.2.414.42.0beta1 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.0.286.54.3 vendor/depot_tools/bootstrap/win/profile.d.python.sh
libv8-6.0.286.54.2 vendor/depot_tools/bootstrap/win/profile.d.python.sh