Skip to content

Commit

Permalink
Add error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
decors committed Apr 22, 2019
1 parent 1525719 commit 715fd3f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions functions/__ghq_repository_search.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ function __ghq_repository_search -d 'Repository search'
set -l selector_options
[ -n "$GHQ_SELECTOR_OPTS" ]; and set selector_options $GHQ_SELECTOR_OPTS

if not type -qf $selector
printf "\nERROR: '$selector' not found.\n"
exit 1
end

set -l query (commandline -b)
[ -n "$query" ]; and set flags --query="$query"; or set flags
switch "$selector"
Expand Down

0 comments on commit 715fd3f

Please sign in to comment.