File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.16 ) # focal
2
- project (devdocs VERSION 0.4 LANGUAGES C )
2
+ project (devdocs VERSION 0.4.1 LANGUAGES C )
3
3
4
4
option (SYSTEM_INSTALL "" OFF )
5
5
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ and _[w3m](https://w3m.sourceforge.net/)_ text-based browser?
10
10
Stable version (requires [ CMake] ( https://cmake.org/ ) >= 3.16):
11
11
12
12
``` shell
13
- $ p=devdocs v=0.4
13
+ $ p=devdocs v=0.4.1
14
14
$ wget -O ${p} -${v} .tar.gz https://github.com/dimitry-ishenko-cpp/${p} /archive/refs/tags/v${v} .tar.gz
15
15
$ tar xzf ${p} -${v} .tar.gz
16
16
$ mkdir ${p} -${v} /build
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ from json import load
5
5
from os import environ
6
6
from pathlib import Path
7
7
from subprocess import call , check_output
8
- from sys import argv
8
+ from sys import argv , stderr
9
9
10
10
devopen = argv [0 ].replace ("grep" , "open" )
11
11
fzf = [ "fzf" ]
@@ -16,7 +16,7 @@ www = environ.get("DEVDOCS_BROWSER", "w3m")
16
16
root_path = Path ("@DEVDOCS_INSTALL_DATADIR@" )
17
17
html_path = root_path / "html"
18
18
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 () ])
20
20
21
21
def get_item (items , query ):
22
22
input = "\n " .join (items )
@@ -99,8 +99,7 @@ class ArgumentParser(argparse.ArgumentParser):
99
99
self .add_argument ("pattern" , nargs = "?" )
100
100
101
101
def error (self , message ):
102
- print ("Error:" , message )
103
- usage ()
102
+ print ("Error:" , message , file = stderr )
104
103
exit (1 )
105
104
106
105
parser = ArgumentParser ()
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ from json import load
5
5
from os import environ
6
6
from pathlib import Path
7
7
from subprocess import call , check_output
8
- from sys import argv
8
+ from sys import argv , stderr
9
9
10
10
fzf = [ "fzf" , "--no-sort" ]
11
11
pgm = Path (argv [0 ]).name
@@ -15,7 +15,7 @@ www = environ.get("DEVDOCS_BROWSER", "w3m")
15
15
root_path = Path ("@DEVDOCS_INSTALL_DATADIR@" )
16
16
html_path = root_path / "html"
17
17
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 () ])
19
19
20
20
def get_item (items ):
21
21
input = "\n " .join (items )
@@ -102,8 +102,7 @@ class ArgumentParser(argparse.ArgumentParser):
102
102
self .add_argument ("entry" , nargs = "?" )
103
103
104
104
def error (self , message ):
105
- print ("Error:" , message )
106
- usage ()
105
+ print ("Error:" , message , file = stderr )
107
106
exit (1 )
108
107
109
108
parser = ArgumentParser ()
You can’t perform that action at this time.
0 commit comments