Skip to content

Commit 41a2989

Browse files
committed
Terminal prompt inject to insert; build fixes.
1 parent 1a36278 commit 41a2989

File tree

7 files changed

+28
-24
lines changed

7 files changed

+28
-24
lines changed

Changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
2021-12-03 Martin Dvorak <[email protected]>
22

3-
* Released v2.4.0 - ability to inject custom command to terminal prompt,
3+
* Released v2.4.0 - ability to insert custom command to terminal prompt,
44
minor fixes.
55

66
2020-11-19 Martin Dvorak <[email protected]>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Tarball:
6262

6363
* [build and install tarball](INSTALLATION.md#build-and-install-tarball)
6464

65+
Check also [packages](https://pkgs.org/search/?q=hstr) for Linux and Unix.
6566

6667
## Configuration
6768
Configure HSTR just by running:

build/ubuntu/launchpad-make-all-releases.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,15 @@ then
163163
exit 1
164164
fi
165165

166-
export ARG_BAZAAR_MSG="Release 2.3"
167-
export ARG_MAJOR_VERSION=2.3.
168-
export ARG_MINOR_VERSION=0 # minor version is incremented for every Ubuntu version
166+
export ARG_BAZAAR_MSG="Release 2.4"
167+
export ARG_MAJOR_VERSION=2.4.
168+
export ARG_MINOR_VERSION=7 # minor version is incremented for every Ubuntu version
169169

170170
# https://wiki.ubuntu.com/Releases
171-
# old: precise quantal saucy precise utopic vivid wily yakkety artful cosmic
172-
# current: trusty xenial bionic focal groovy hirsute
173-
for UBUNTU_VERSION in trusty xenial bionic focal groovy hirsute
171+
# obsolete: precise quantal saucy precise utopic vivid wily yakkety artful cosmic
172+
# current : (trusty) xenial bionic (cosmic disco eoan) focal (groovy) hirsute impish
173+
# xenial bionic focal hirsute impish
174+
for UBUNTU_VERSION in trusty xenial bionic focal hirsute impish
174175
do
175176
echo "Releasing HSTR for Ubuntu version: ${UBUNTU_VERSION}"
176177
releaseForParticularUbuntuVersion ${UBUNTU_VERSION} ${ARG_MAJOR_VERSION}${ARG_MINOR_VERSION} "${ARG_BAZAAR_MSG}"

build/ubuntu/pbuilder-add-new-distro.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# https://wiki.ubuntu.com/Releases
1818

1919
# boostrap new OR refresh distribution base for pbuilder
20-
export DISTRO=hirsute
20+
export DISTRO=impish
2121

2222
sudo pbuilder --create $DISTRO
2323
rm -vf ~/pbuilder/${DISTRO}-base.tgz

build/ubuntu/pbuilder-refresh-all-distros.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
# old distros: precise quantal saucy utopic
18-
for DISTRO in trusty xenial bionic disco eoan
17+
# https://wiki.ubuntu.com/Releases
18+
# obsolete: precise quantal saucy precise utopic vivid wily yakkety artful cosmic
19+
# current : (trusty) xenial bionic (cosmic disco eoan) focal (groovy) hirsute impish
20+
for DISTRO in xenial bionic focal hirsute impish
1921
do
2022

2123
sudo pbuilder --create ${DISTRO}

man/hstr.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Print filtered history on standard output and exit
2424
\fB-k --kill-last-command\fR
2525
Delete the last command from history and exit
2626
.TP
27-
\fB-i --inject-in-terminal=[command]\fR
28-
Inject custom command to terminal prompt and exit
27+
\fB-i --insert-in-terminal=[command]\fR
28+
Insert custom command to terminal prompt and exit
2929
.TP
3030
\fB-f --favorites\fR
3131
Show favorites view immediately
@@ -225,7 +225,7 @@ bindkey -s "\eC\-r" "\eC\-a hstr \-\- \eC\-j" # bind hstr to Ctrl-r (for Vi mode
225225
\fBhstr --show-blacklist\fR
226226
Show blacklist configured for history processing.
227227
.TP
228-
\fBhstr --inject-in-terminal="git add . && git diff --cached"\fR
228+
\fBhstr --insert-in-terminal="git add . && git diff --cached"\fR
229229
Insert command in terminal prompt and exit.
230230
.SH AUTHOR
231231
Written by Martin Dvorak <[email protected]>

src/hstr.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static const char* HELP_STRING=
263263
"\n --show-configuration -s ... show configuration to be added to ~/.bashrc"
264264
"\n --show-zsh-configuration -z ... show zsh configuration to be added to ~/.zshrc"
265265
"\n --show-blacklist -b ... show commands to skip on history indexation"
266-
"\n --inject-in-terminal=[c] -i ... inject command c in terminal prompt and exit"
266+
"\n --insert-in-terminal=[c] -i ... insert command c in terminal prompt and exit"
267267
"\n --version -V ... show version details"
268268
"\n --help -h ... help"
269269
"\n"
@@ -280,16 +280,16 @@ static const char* LABEL_HELP=
280280
#define GETOPT_OPTIONAL_ARGUMENT 2
281281

282282
static const struct option long_options[] = {
283-
{"favorites", GETOPT_NO_ARGUMENT, NULL, 'f'},
284-
{"kill-last-command", GETOPT_NO_ARGUMENT, NULL, 'k'},
285-
{"version", GETOPT_NO_ARGUMENT, NULL, 'V'},
286-
{"help", GETOPT_NO_ARGUMENT, NULL, 'h'},
287-
{"non-interactive", GETOPT_NO_ARGUMENT, NULL, 'n'},
288-
{"show-configuration", GETOPT_NO_ARGUMENT, NULL, 's'},
289-
{"show-zsh-configuration", GETOPT_NO_ARGUMENT, NULL, 'z'},
290-
{"show-blacklist", GETOPT_NO_ARGUMENT, NULL, 'b'},
291-
{"inject-in-terminal", GETOPT_OPTIONAL_ARGUMENT, NULL, 'i'},
292-
{0, 0, NULL, 0 }
283+
{"favorites", GETOPT_NO_ARGUMENT, NULL, 'f'},
284+
{"kill-last-command", GETOPT_NO_ARGUMENT, NULL, 'k'},
285+
{"version", GETOPT_NO_ARGUMENT, NULL, 'V'},
286+
{"help", GETOPT_NO_ARGUMENT, NULL, 'h'},
287+
{"non-interactive", GETOPT_NO_ARGUMENT, NULL, 'n'},
288+
{"show-configuration", GETOPT_NO_ARGUMENT, NULL, 's'},
289+
{"show-zsh-configuration", GETOPT_NO_ARGUMENT, NULL, 'z'},
290+
{"show-blacklist", GETOPT_NO_ARGUMENT, NULL, 'b'},
291+
{"insert-in-terminal", GETOPT_REQUIRED_ARGUMENT, NULL, 'i'},
292+
{0, 0, NULL, 0 }
293293
};
294294

295295
typedef struct {

0 commit comments

Comments
 (0)