Fix for issue where wc on OS X would produce leading spaces, causing

down-or-search to fail to match the case statement and therefore do the wrong thing.
This commit is contained in:
ridiculousfish 2014-01-25 15:22:28 -08:00
parent 67bb12e569
commit 2139334c36

View file

@ -9,7 +9,7 @@ function down-or-search -d "Depending on cursor position and current mode, eithe
# If we are on the bottom line, start search mode,
# otherwise move down
set lineno (commandline -L)
set line_count (commandline|wc -l)
set line_count (commandline | wc -l | tr -d ' ')
switch $lineno
case $line_count