From 2139334c36a0f169a129ae9dfb0be5bd3e07854b Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jan 2014 15:22:28 -0800 Subject: [PATCH] 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. --- share/functions/down-or-search.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/down-or-search.fish b/share/functions/down-or-search.fish index 3f775bfbf..8bacfb4c7 100644 --- a/share/functions/down-or-search.fish +++ b/share/functions/down-or-search.fish @@ -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