commit 33fc9dd33e46915c49f30cb08784168b5a897a41
parent 2cbfb4ef88abc0d13e774b28279123cfd6818dd2
Author: Chris Down <chris@chrisdown.name>
Date: Sun, 8 Feb 2015 17:42:39 +0000
Show first non-empty line in dmenu
Fixes #4. As first suggested in a fork by @milouse.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clipmenu b/clipmenu
@@ -5,7 +5,7 @@ dmenu_lines=8
declare -A selections
for file in /tmp/clipmenu/*; do
- first_line=$(sed -n '1{p;q}' "$file")
+ first_line=$(sed -n '/./{p;q}' "$file")
lines=$(wc -l "$file")
lines=${lines%% *}