aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md34
-rw-r--r--ROADMAP.md2
-rw-r--r--src/c_defs.go2
-rw-r--r--src/c_fuzz.go9
4 files changed, 37 insertions, 10 deletions
diff --git a/README.md b/README.md
index 5bbc145..9f51a75 100644
--- a/README.md
+++ b/README.md
@@ -141,9 +141,39 @@ of the various keybinds are available by pressing the key `?`.
vim-like keybinds are available by default. It is not possible yet to rebind
keys, maybe in the future.
-On first start, you will be prompted to configure GnuPG and default SSH keys.
+On first start, you will be prompted to configure GnuPG (for passwords
+encryption) and default SSH keys.
+
+### Search mode
+
+A quick **search mode** is implemented using the vim-like keybinds `/`, `f`
+or `Ctrl+f`. This calls a fuzzy finder (`fzf` by default). You can change the
+default fuzzy finder in the config file (see Config) for any program that
+behaves the same way ([fzf](https://github.com/junegunn/fzf),
+[skim](https://github.com/skim-rs/skim), even
+[dmenu](https://tools.suckless.org/dmenu/), `rofi` not tested but probably
+works too).
+
+Note that when starting search mode, all previously folded folders will be
+unfolded in order to search through them all. This is because I am a very
+bad programmer and my code is utter crap.
+
+A **search-only** mode can be started by running `hf -s`. This will start
+directly in and `fzf` prompt (or any other set up fuzzy finder) and execute
+the selected host session uppon validation. This runs in no-loop mode, so
+`hardflip` will exit when the session ends or if the search is cancelled. This
+is useful when bound to a key in your window manager, to spawn a quick remote
+session. Bind this to your favorite key for example :
-### Options
+```sh
+alacritty -e hf -s
+```
+
+I was intending to implement a basic search in case the `fzf` bin (or any other
+set up fuzzy finder) was not found, but I gave up at least for now. Install
+[fzf](https://github.com/junegunn/fzf) or no search for you.
+
+### CLI Options
`man hf` for more infos.
diff --git a/ROADMAP.md b/ROADMAP.md
index eda20e3..0c47a12 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -57,7 +57,7 @@
## v1.1 - 360 hard
-- [ ] fuzz
+- [x] fuzz
- [ ] better insert form
- [ ] ssh port rdr
diff --git a/src/c_defs.go b/src/c_defs.go
index cc8a42f..f0eeb12 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -56,7 +56,7 @@ const (
STYLE_FILE_NAME = "colors.yml"
CONF_DIR_NAME = "hf"
DATA_DIR_NAME = "hf"
- VERSION = "v1.0.3"
+ VERSION = "v1.0.4"
VERSION_NAME = "wheelbite"
)
diff --git a/src/c_fuzz.go b/src/c_fuzz.go
index 5dd7880..ffc05b6 100644
--- a/src/c_fuzz.go
+++ b/src/c_fuzz.go
@@ -116,12 +116,9 @@ func c_fuzz(data *HardData, ui *HardUI) (bool) {
defer stdin.Close()
for ptr := data.litems.head; ptr != nil; ptr = ptr.next {
if ptr.is_dir() == true {
- // } else if data.litems.curr.Dirs != nil &&
- // data.folds[data.litems.curr.Dirs] == nil {
- // e_fold_dir(data, data.litems.curr)
- // } else {
- // e_unfold_dir(data, data.litems.curr)
- // }
+ if ptr.Dirs != nil && data.folds[ptr.Dirs] != nil {
+ e_unfold_dir(data, ptr)
+ }
continue
}
io.WriteString(stdin, ptr.path()[1:] + ptr.Host.Name + "\n")