Skip to content

Instantly share code, notes, and snippets.

@cprieto
Created January 6, 2016 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cprieto/88d239a50ec345e95f0f to your computer and use it in GitHub Desktop.
Save cprieto/88d239a50ec345e95f0f to your computer and use it in GitHub Desktop.
function which_term
switch(basename (ps -p (ps -p %self -o ppid=) -o args=))
case 'login*'
# This is a MacOSX terminal
echo (basename $TERM_PROGRAM .app)
case '*'
echo (basename (ps -p (ps -p %self -o ppid=) -o args=))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment