Tuesday | 05 NOV 2024
[ previous ]
[ next ]

NSH - Up Arrow Issue

Title:
Date: 2024-01-08
Tags:  nsh

I finally was able to duplicate the strange issue of NSH getting stuck in an infinite loop.

When you do a history search for something that doesn't find a match, NSH returns the first item in the list. Then immediately hitting the down arrow key would result in NSH getting lost. I think it wasn't lost but just spinning going through every option.

Luckily the fix was relatively straightforward. I needed to fix the history search such that if a match wasn't found, I shouldn't default to the first value in the history. Instead it should leave you on your search term. This actually makes sense and I wish I had done this originally. I think this was a case of me not being burned by it during development so I never bothered to fix it.

This involves fixing both the up arrow and the down arrow. I think this is one of the major bugs left in my shell, otherwise it has worked pretty well so far. There are some issues to iron out on D3 but because the majority of my use is on universe, it hasn't bothered me enough yet.

Incoming Links

  1. [ Ideas in 2024 ]