From 7eee158292626e4b1d5437d691b3d3fe7bbfa857 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 27 Jan 2019 14:23:36 +0100 Subject: [PATCH] Don't test with one argument [ci skip] --- share/completions/adb.fish | 2 +- share/tools/web_config/sample_prompts/robbyrussell.fish | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/share/completions/adb.fish b/share/completions/adb.fish index 7684d0ef2..559a3e3bc 100644 --- a/share/completions/adb.fish +++ b/share/completions/adb.fish @@ -24,7 +24,7 @@ function __fish_adb_run_command -d 'Runs adb with any -s parameters already give set -l cmd (commandline -poc) set -e cmd[1] for i in $cmd - if test $sopt_is_next + if test -n "$sopt_is_next" set sopt -s $i break else diff --git a/share/tools/web_config/sample_prompts/robbyrussell.fish b/share/tools/web_config/sample_prompts/robbyrussell.fish index 80a600004..65275ccd9 100644 --- a/share/tools/web_config/sample_prompts/robbyrussell.fish +++ b/share/tools/web_config/sample_prompts/robbyrussell.fish @@ -80,7 +80,8 @@ function fish_prompt set -l repo_branch $red(_repo_branch_name $repo_type) set repo_info "$blue $repo_type:($repo_branch$blue)" - if [ (_is_repo_dirty $repo_type) ] + set -l dirty (_is_repo_dirty $repo_type) + if test -n "$dirty" set -l dirty "$yellow ✗" set repo_info "$repo_info$dirty" end