Commit df6dab17 authored by Takeya Yuki's avatar Takeya Yuki

Rollback without PID Check

parent 60f5009c
...@@ -1640,14 +1640,14 @@ get_term() { ...@@ -1640,14 +1640,14 @@ get_term() {
esac esac
# Check $PPID for terminal emulator. # Check $PPID for terminal emulator.
while [[ -z "$term" ]] || ((parent>1)); do while [[ -z "$term" ]]; do
parent="$(get_ppid "$parent")" parent="$(get_ppid "$parent")"
name="$(get_process_name "$parent")" name="$(get_process_name "$parent")"
case "${name// }" in case "${name// }" in
"${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;; "${SHELL/*\/}" | *"sh" | "tmux"* | "screen" | "su"*) ;;
"login"* | *"Login"* | "init" | "(init)") term="$(tty)";break ;; "login"* | *"Login"* | "init" | "(init)") term="$(tty)" ;;
"ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;; "ruby" | "1" | "systemd" | "sshd"* | "python"* | "USER"*"PID"*) break ;;
"gnome-terminal-") term="gnome-terminal";break ;; "gnome-terminal-") term="gnome-terminal" ;;
*) term="${name##*/}" ;; *) term="${name##*/}" ;;
esac esac
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment