@LKG
I have never used twrp on my N5 so I suspects that you will need to reflash the "recovery.img" with stock android "recovery.img". Here is the procedure:

Download the factory android images for N5 Hammerhead from here:

https://developers.google.com/android/images#hammerhead

extract the zip archive, within that folder, there is another zip archive extract that too. Inside the second folder you'll have the "recovery.img"

Right click on an empty spot in the folder, in the menu click on "open terminal here".

I assume that you'll have adb and fastboot installed.

Enter bootloader by turning off the phone.

Connect the phone to your pc.

Press power and volume down until it enter bootloader mode

In the terminal type this:

You should check if the the pc connects to the phone:

fastboot devices

If the pc has connected to the phone proceed with the next step.

fastboot flash recovery recovery.img

fastboot reboot bootloader.

when the phone enters the bootloader again after the last command, run the ubports installer.

I suspect that this is the procedure for unbricking your phone when you forgot to activate usb-debugging in developer Mode. So if there is someone whit a softbricked N5, try the above procedure and make a comment if you are able to use adb when your phone is in recovery.