diff options
author | joe <rbo@gmx.us> | 2025-08-29 18:27:17 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-08-29 18:27:17 +0200 |
commit | aa3f952a92decb73e982f62a0764f19ab1c05b10 (patch) | |
tree | 0160d8f0d75084ddbb2fa38cfc5654ef46dfc0eb | |
parent | fzf bin plus fix bad behaviour (diff) | |
download | hardflip-aa3f952a92decb73e982f62a0764f19ab1c05b10.tar.gz hardflip-aa3f952a92decb73e982f62a0764f19ab1c05b10.tar.bz2 hardflip-aa3f952a92decb73e982f62a0764f19ab1c05b10.tar.xz hardflip-aa3f952a92decb73e982f62a0764f19ab1c05b10.tar.zst hardflip-aa3f952a92decb73e982f62a0764f19ab1c05b10.zip |
fuzzed
Diffstat (limited to '')
-rw-r--r-- | README.md | 34 | ||||
-rw-r--r-- | ROADMAP.md | 2 | ||||
-rw-r--r-- | src/c_defs.go | 2 | ||||
-rw-r--r-- | src/c_fuzz.go | 9 |
4 files changed, 37 insertions, 10 deletions
@@ -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. @@ -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") |