Skip to content

Commit 2b34848

Browse files
Merge tag 'v0.4.1' into debian
2 parents 8c3ce62 + 3cec4a0 commit 2b34848

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.16) # focal
2-
project(devdocs VERSION 0.4 LANGUAGES C)
2+
project(devdocs VERSION 0.4.1 LANGUAGES C)
33

44
option(SYSTEM_INSTALL "" OFF)
55

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ and _[w3m](https://w3m.sourceforge.net/)_ text-based browser?
1010
Stable version (requires [CMake](https://cmake.org/) >= 3.16):
1111

1212
```shell
13-
$ p=devdocs v=0.4
13+
$ p=devdocs v=0.4.1
1414
$ wget -O ${p}-${v}.tar.gz https://github.com/dimitry-ishenko-cpp/${p}/archive/refs/tags/v${v}.tar.gz
1515
$ tar xzf ${p}-${v}.tar.gz
1616
$ mkdir ${p}-${v}/build

bin/devgrep.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from json import load
55
from os import environ
66
from pathlib import Path
77
from subprocess import call, check_output
8-
from sys import argv
8+
from sys import argv, stderr
99

1010
devopen = argv[0].replace("grep", "open")
1111
fzf = [ "fzf" ]
@@ -16,7 +16,7 @@ www = environ.get("DEVDOCS_BROWSER", "w3m")
1616
root_path = Path("@DEVDOCS_INSTALL_DATADIR@")
1717
html_path = root_path / "html"
1818

19-
local = sorted([ path.name for path in html_path.iterdir() ])
19+
local = sorted([ path.name for path in html_path.iterdir() if path.is_dir() ])
2020

2121
def get_item(items, query):
2222
input = "\n".join(items)
@@ -99,8 +99,7 @@ class ArgumentParser(argparse.ArgumentParser):
9999
self.add_argument("pattern" , nargs="?")
100100

101101
def error(self, message):
102-
print("Error:", message)
103-
usage()
102+
print("Error:", message, file=stderr)
104103
exit(1)
105104

106105
parser = ArgumentParser()

bin/devopen.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from json import load
55
from os import environ
66
from pathlib import Path
77
from subprocess import call, check_output
8-
from sys import argv
8+
from sys import argv, stderr
99

1010
fzf = [ "fzf", "--no-sort" ]
1111
pgm = Path(argv[0]).name
@@ -15,7 +15,7 @@ www = environ.get("DEVDOCS_BROWSER", "w3m")
1515
root_path = Path("@DEVDOCS_INSTALL_DATADIR@")
1616
html_path = root_path / "html"
1717

18-
local = sorted([ path.name for path in html_path.iterdir() ])
18+
local = sorted([ path.name for path in html_path.iterdir() if path.is_dir() ])
1919

2020
def get_item(items):
2121
input = "\n".join(items)
@@ -102,8 +102,7 @@ class ArgumentParser(argparse.ArgumentParser):
102102
self.add_argument("entry" , nargs="?")
103103

104104
def error(self, message):
105-
print("Error:", message)
106-
usage()
105+
print("Error:", message, file=stderr)
107106
exit(1)
108107

109108
parser = ArgumentParser()

0 commit comments

Comments
 (0)