Properly detect shell so that ^L can be bound