From 60f162db1963c35f21205898e856795eb155d14d Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 5 Mar 2019 17:56:57 +0100 Subject: [PATCH] Remove single-argument test This is an awful bit of `test` functionality that only exists to have a clever shortcut and confuse people. [ci skip] --- share/functions/__fish_shared_key_bindings.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index ea1fc7f08..d54887551 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -80,7 +80,7 @@ function __fish_shared_key_bindings -d "Bindings shared between emacs and vi mod bind --preset $argv \e. history-token-search-backward bind --preset $argv \el __fish_list_current_token - bind --preset $argv \ew 'set tok (commandline -pt); if test $tok[1]; echo; whatis $tok[1]; commandline -f repaint; end' + bind --preset $argv \ew 'set tok (commandline -pt); if test -n "$tok[1]"; echo; whatis $tok[1]; commandline -f repaint; end' # ncurses > 6.0 sends a "delete scrollback" sequence along with clear. # This string replace removes it. bind --preset $argv \cl 'echo -n (clear | string replace \e\[3J ""); commandline -f repaint'