File README.md changed (mode: 100644) (index 1300859..afa1a75) |
... |
... |
DOWNLOAD |
18 |
18 |
https://github.com/dvorka/hstr/releases |
https://github.com/dvorka/hstr/releases |
19 |
19 |
|
|
20 |
20 |
|
|
|
21 |
|
BUILD |
|
22 |
|
------------ |
|
23 |
|
* install from the source distribution: |
|
24 |
|
|
|
25 |
|
`./configure && make && make install` |
|
26 |
|
|
|
27 |
|
|
21 |
28 |
INSTALLATION |
INSTALLATION |
22 |
29 |
------------ |
------------ |
23 |
|
* add `hh` to `$PATH` |
|
|
30 |
|
* make sure `hh` is in `${PATH}` |
24 |
31 |
* add |
* add |
25 |
32 |
|
|
26 |
33 |
`shopt -s histappend` |
`shopt -s histappend` |
|
... |
... |
INSTALLATION |
33 |
40 |
|
|
34 |
41 |
`bind '"\C-r": "\C-k\C-uhh\C-j"'` |
`bind '"\C-r": "\C-k\C-uhh\C-j"'` |
35 |
42 |
|
|
36 |
|
or F12: |
|
37 |
|
|
|
38 |
|
`bind '"\e[24~":"\C-k\C-uhh\C-j"'` |
|
39 |
|
|
|
40 |
43 |
or Ctrl-F12: |
or Ctrl-F12: |
41 |
44 |
|
|
42 |
45 |
`bind '"\e[24;5~":"\C-k\C-uhh\C-j"'` |
`bind '"\e[24;5~":"\C-k\C-uhh\C-j"'` |
43 |
46 |
|
|
44 |
47 |
To determine the character sequence emitted by a pressed key in terminal, |
To determine the character sequence emitted by a pressed key in terminal, |
45 |
|
type CTRL-v and then press the key. For example, F12 gives `^[[24~`. |
|
46 |
|
Replace the `^[` with `\e`. To clear the line first, add `\C-k \C-u` in |
|
47 |
|
front of the actual command. Check your current bindings using: |
|
|
48 |
|
type CTRL-v and then press the key. To clear the line first, add `\C-k \C-u` |
|
49 |
|
in front of the actual command. Check your current bindings using: |
48 |
50 |
|
|
49 |
51 |
`bind -S` |
`bind -S` |
50 |
52 |
|
|
File debian/control added (mode: 100644) (index 0000000..8c0d281) |
|
1 |
|
Source: hh |
|
2 |
|
Section: admin |
|
3 |
|
Priority: extra |
|
4 |
|
Maintainer: Martin Dvorak <martin.dvorak@mindforger.com> |
|
5 |
|
Build-Depends: debhelper (>= 8.0.0), autotools-dev |
|
6 |
|
Standards-Version: 3.9.4 |
|
7 |
|
Homepage: https://github.com/dvorka/hstr |
|
8 |
|
Vcs-Git: https://github.com/dvorka/hstr.git |
|
9 |
|
Vcs-Browser: https://github.com/dvorka/hstr |
|
10 |
|
|
|
11 |
|
Package: hh |
|
12 |
|
Architecture: any |
|
13 |
|
Depends: ${shlibs:Depends}, ${misc:Depends}, libreadline5 |
|
14 |
|
Description: Suggest box like shell history completion |
|
15 |
|
A command line utility that brings improved shell command completion |
|
16 |
|
from the history. It aims to make completion easier and faster than Ctrl-R. |
File debian/copyright added (mode: 100644) (index 0000000..cb72e41) |
|
1 |
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ |
|
2 |
|
Upstream-Name: hh |
|
3 |
|
Source: https://github.com/dvorka/hstr |
|
4 |
|
|
|
5 |
|
Files: debian/* |
|
6 |
|
Copyright: 2013 Martin Dvorak <martin.dvorak@mindforger.com> |
|
7 |
|
License: Apache-2.0 |
|
8 |
|
Licensed under the Apache License, Version 2.0 (the "License"); |
|
9 |
|
you may not use this file except in compliance with the License. |
|
10 |
|
You may obtain a copy of the License at |
|
11 |
|
. |
|
12 |
|
http://www.apache.org/licenses/LICENSE-2.0 |
|
13 |
|
. |
|
14 |
|
Unless required by applicable law or agreed to in writing, software |
|
15 |
|
distributed under the License is distributed on an "AS IS" BASIS, |
|
16 |
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
17 |
|
See the License for the specific language governing permissions and |
|
18 |
|
limitations under the License |
File debian/rules added (mode: 100755) (index 0000000..312e24d) |
|
1 |
|
#!/usr/bin/make -f |
|
2 |
|
# -*- makefile -*- |
|
3 |
|
# Sample debian/rules that uses debhelper. |
|
4 |
|
# This file was originally written by Joey Hess and Craig Small. |
|
5 |
|
# As a special exception, when this file is copied by dh-make into a |
|
6 |
|
# dh-make output file, you may use that output file without restriction. |
|
7 |
|
# This special exception was added by Craig Small in version 0.37 of dh-make. |
|
8 |
|
|
|
9 |
|
# Uncomment this to turn on verbose mode. |
|
10 |
|
#export DH_VERBOSE=1 |
|
11 |
|
|
|
12 |
|
%: |
|
13 |
|
dh $@ --with autotools-dev |
File src/hstr.c changed (mode: 100644) (index f8c2a43..7d685a8) |
... |
... |
char *selection_loop(HistoryItems *history) { |
249 |
249 |
int selectionCursorPosition=SELECTION_CURSOR_IN_PROMPT; |
int selectionCursorPosition=SELECTION_CURSOR_IN_PROMPT; |
250 |
250 |
int previousSelectionCursorPosition=SELECTION_CURSOR_IN_PROMPT; |
int previousSelectionCursorPosition=SELECTION_CURSOR_IN_PROMPT; |
251 |
251 |
|
|
252 |
|
int y = 1, c, maxHistoryItems, cursorX, cursorY, deleteOccurences; |
|
|
252 |
|
int y = 1, c, maxHistoryItems, cursorX=0, cursorY=0, deleteOccurences; |
253 |
253 |
bool done = FALSE; |
bool done = FALSE; |
254 |
254 |
char prefix[SELECTION_PREFIX_MAX_LNG]=""; |
char prefix[SELECTION_PREFIX_MAX_LNG]=""; |
255 |
255 |
char *result="", *msg, *delete; |
char *result="", *msg, *delete; |