Skip to content

Commit

Permalink
Fix breakage when the stderr-nocaret feature flag is enabled. (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjuxax authored Jul 1, 2020
1 parent 8d26b08 commit 1b882b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/_pisces_lookup.fish
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ function _pisces_lookup -a pos len -d "Returns the text at the given position re
set input (commandline -b)

# NOTE: it's important to quote $input, because it may have newlines
string sub --start (math "$cur + $pos + 1") --length $len -- "$input" ^/dev/null
string sub --start (math "$cur + $pos + 1") --length $len -- "$input" 2>/dev/null
or echo '' # if it's out of bounds (probably better to return cut part)
end

0 comments on commit 1b882b6

Please sign in to comment.