Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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