Skip to content

Commit

Permalink
fix fish errors (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
peeviddy authored Apr 11, 2023
1 parent 9a54fc3 commit 83fca51
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion functions/_enhancd_filepath_walk.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function _enhancd_filepath_walk
set -a dirs ($PWD _enhancd_filepath_get_parent_dirs)
set -a dirs $PWD (_enhancd_filepath_get_parent_dirs)

for dir in $dirs
command find "$dir" -maxdepth 1 -type d -name '\.*' -prune -o -type d -print
Expand Down
2 changes: 1 addition & 1 deletion functions/_enhancd_filter_interactive.fish
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function _enhancd_filter_interactive
set -l filter (_enhancd_helper_parse_filter_string "$ENHANCD_FILTER")
set -l count (echo "$stdin" | _enhancd_command_grep -c "")

if test $ENHANCD_USE_ABBREV = true
if test "$ENHANCD_USE_ABBREV" = true
function _enhancd_filter_interactive_abbrev
while read -l line
string replace --regex "^$HOME" "~" "$line"
Expand Down
4 changes: 2 additions & 2 deletions functions/enhancd.fish
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ function enhancd
if test -n $format; and not string match --quiet '*%*' $format
echo "$opt: 'format' label needs to include '%' (selected line)" >&2
return 1
fi
end
_enhancd_command_run "$func" "$arg" | _enhancd_filter_interactive
set -l seleted
set -l selected
if test -z $format
set selected (_enhancd_command_run "$func" | _enhancd_filter_interactive)
else
Expand Down
6 changes: 3 additions & 3 deletions src/filepath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ __enhancd::filepath::walk()
{
local -a dirs

# __enhancd::filepath::get_parent_dirs does not return $PWD itself
# so add it to array expressly
dirs=( "${PWD}" $(__enhancd::filepath::get_parent_dirs "${1:-${PWD}}") )
# __enhancd::filepath::get_parent_dirs does not return $PWD itself,
# so add it to the array explicitly
dirs=( "${PWD}" "$(__enhancd::filepath::get_parent_dirs "${1:-${PWD}}")" )

for dir in "${dirs[@]}"
do
Expand Down

0 comments on commit 83fca51

Please sign in to comment.