From 8f2bc5f7e770921e20165babf17b5c8f7675c8dc Mon Sep 17 00:00:00 2001 From: Denis Isidoro Date: Fri, 17 Jan 2020 14:41:23 -0300 Subject: [PATCH] Fish: fix widget (#174) Fixes #170 and #171 --- navi | 2 +- navi.plugin.fish | 2 +- docstring.txt => src/docstring.txt | 0 src/opts.sh | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename docstring.txt => src/docstring.txt (100%) diff --git a/navi b/navi index d58d2c03..f935fc75 100755 --- a/navi +++ b/navi @@ -4,7 +4,7 @@ set -euo pipefail export NAVI_HOME="$(cd "$(dirname "$0")" && pwd)" source "${NAVI_HOME}/src/main.sh" -VERSION="0.17.0" +VERSION="0.17.1" NAVI_ENV="${NAVI_ENV:-prod}" opts::eval "$@" diff --git a/navi.plugin.fish b/navi.plugin.fish index ddb6079e..645dffd9 100644 --- a/navi.plugin.fish +++ b/navi.plugin.fish @@ -1,7 +1,7 @@ function navi-widget -d "Show cheat sheets" begin stty sane - env NAVI_USE_FZF_ALL_INPUTS=true navi --print query (commandline) | perl -pe 'chomp if eof' | read -lz result + env NAVI_USE_FZF_ALL_INPUTS=true navi --print (commandline) | perl -pe 'chomp if eof' | read -lz result and commandline -- $result end commandline -f repaint diff --git a/docstring.txt b/src/docstring.txt similarity index 100% rename from docstring.txt rename to src/docstring.txt diff --git a/src/opts.sh b/src/opts.sh index 92455fa9..a1825c63 100644 --- a/src/opts.sh +++ b/src/opts.sh @@ -2,7 +2,7 @@ set -euo pipefail opts::extract_help() { - local -r file="${NAVI_HOME}/docstring.txt" + local -r file="${NAVI_HOME}/src/docstring.txt" cat "$file" }