forked from antonmedv/walk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
282 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,16 @@ | ||
# π₯Ύ walk | ||
# walk | ||
|
||
<p align="center"> | ||
<br> | ||
<img src=".github/images/demo.gif" width="600" alt="walk demo"> | ||
<br> | ||
</p> | ||
Walk is based on [antonmedv/walk](https://github.com/antonmedv/walk) with modifications to enable reuse as a component in other [BubbleTea](https://github.com/charmbracelet/bubbletea) applications, along with some other bugfixes and enhancements. | ||
|
||
**Walk** β a terminal navigator. | ||
|
||
Why another terminal navigator? I wanted something simple and minimalistic. | ||
Something to help me with faster navigation in the filesystem; a `cd` and `ls` | ||
replacement. So I build **walk**. It allows for quick navigation with fuzzy | ||
searching, `cd` integration is quite simple. And you can open `vim` right from | ||
the walk. That's it. | ||
|
||
## Install | ||
To use the `walk` component, install the module using: | ||
|
||
``` | ||
brew install walk | ||
go get github.com/ardnew/walk/v2 | ||
``` | ||
|
||
``` | ||
pkg_add walk | ||
``` | ||
The original `walk` command has been refactored into the [cmd/lk] submodule ([README.md](cmd/lk/README.md)) and can be installed using: | ||
|
||
``` | ||
pacman -S walk | ||
``` | ||
|
||
go get github.com/ardnew/walk/v2/cmd/lk | ||
``` | ||
go install github.com/antonmedv/walk@latest | ||
``` | ||
|
||
Or download [prebuild binaries](https://github.com/antonmedv/walk/releases). | ||
|
||
Put the next function into the **.bashrc** or a similar config: | ||
|
||
<table> | ||
<tr> | ||
<th> Bash/Zsh </th> | ||
<th> Fish </th> | ||
<th> PowerShell </th> | ||
</tr> | ||
<tr> | ||
<td> | ||
|
||
```bash | ||
function lk { | ||
cd "$(walk "$@")" | ||
} | ||
``` | ||
|
||
</td> | ||
<td> | ||
|
||
```fish | ||
function lk | ||
set loc (walk $argv); and cd $loc; | ||
end | ||
``` | ||
|
||
</td> | ||
<td> | ||
|
||
```powershell | ||
function lk() { | ||
cd $(walk $args) | ||
} | ||
``` | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
|
||
|
||
Now use `lk` command to start walking. | ||
|
||
## Usage | ||
|
||
| Key binding | Description | | ||
|------------------|--------------------| | ||
| `Arrows`, `hjkl` | Move cursor | | ||
| `Enter` | Enter directory | | ||
| `Backspace` | Exit directory | | ||
| `Space` | Toggle preview | | ||
| `Esc`, `q` | Exit with cd | | ||
| `Ctrl+c` | Exit without cd | | ||
| `/` | Fuzzy search | | ||
| `dd` | Delete file or dir | | ||
| `y` | yank current dir | | ||
|
||
The `EDITOR` or `WALK_EDITOR` environment variable used for opening files from | ||
the walk. | ||
|
||
```bash | ||
export EDITOR=vim | ||
``` | ||
|
||
### Preview mode | ||
|
||
Press `Space` to toggle preview mode. | ||
|
||
<img src=".github/images/preview-mode.gif" width="600" alt="Walk Preview Mode"> | ||
|
||
### Delete file or directory | ||
|
||
Press `dd` to delete file or directory. Press `u` to undo. | ||
|
||
<img src=".github/images/rm-demo.gif" width="600" alt="Walk Deletes a File"> | ||
|
||
### Display icons | ||
|
||
Install [Nerd Fonts](https://www.nerdfonts.com) and add `--icons` flag. | ||
|
||
<img src=".github/images/demo-icons.gif" width="600" alt="Walk Icons Support"> | ||
|
||
### Image preview | ||
|
||
No additional setup is required. | ||
|
||
<img src=".github/images/images-mode.gif" width="600" alt="Walk Image Preview"> | ||
|
||
## Become a sponsor | ||
|
||
Every line of code in my repositories π signifies my unwavering commitment to open source π‘. Your support π€ ensures these projects keep thriving, innovating, and benefiting all πΌ. If my work has ever resonated π΅ or helped you, kindly consider showing love β€οΈ by sponsoring. [**π Sponsor Me Today! π**](https://github.com/sponsors/antonmedv) | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Anton Medvedev | ||
Modified (c) 2023 Andrew Shultzabarger | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# π₯Ύ lk | ||
|
||
<p align="center"> | ||
<br> | ||
<img src=".github/images/demo.gif" width="600" alt="lk demo"> | ||
<br> | ||
</p> | ||
|
||
**lk** β a terminal navigator. | ||
|
||
Taken from [antonmedv/walk](https://github.com/antonmedv/walk): | ||
|
||
> Why another terminal navigator? I wanted something simple and minimalistic. Something to help me with faster navigation in the filesystem; a `cd` and `ls`replacement. So I build \[`lk`\]. It allows for quick navigation with fuzzy searching, `cd` integration is quite simple. And you can open `vim` right from \[`lk`\]. That's it. | ||
## Install | ||
|
||
``` | ||
go install github.com/ardnew/walk/v2/cmd/lk@latest | ||
``` | ||
|
||
Or download [prebuild binaries](https://github.com/ardnew/walk/releases). | ||
|
||
Put the next function into the `.bashrc` or a similar config: | ||
|
||
<table> | ||
<tr> | ||
<th> Bash/Zsh </th> | ||
<th> Fish </th> | ||
<th> PowerShell </th> | ||
</tr> | ||
<tr> | ||
<td> | ||
|
||
```bash | ||
function clk { | ||
cd "$(lk "$@")" | ||
} | ||
``` | ||
|
||
</td> | ||
<td> | ||
|
||
```fish | ||
function clk | ||
set loc (lk $argv); and cd $loc; | ||
end | ||
``` | ||
|
||
</td> | ||
<td> | ||
|
||
```powershell | ||
function clk() { | ||
cd $(lk $args) | ||
} | ||
``` | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
|
||
|
||
Now use `clk` command to start walking. | ||
|
||
## Usage | ||
|
||
| Key binding | Description | | ||
|------------------|--------------------| | ||
| `Arrows`, `hjkl` | Move cursor | | ||
| `Enter` | Enter directory | | ||
| `Backspace` | Exit directory | | ||
| `Space` | Toggle preview | | ||
| `Esc`, `q` | Exit with cd | | ||
| `Ctrl+c` | Exit without cd | | ||
| `/` | Fuzzy search | | ||
| `dd` | Delete file or dir | | ||
| `y` | yank current dir | | ||
|
||
The `EDITOR` or `LK_EDITOR` environment variable used for opening files from lk. | ||
|
||
```bash | ||
export EDITOR=vim | ||
``` | ||
|
||
### Preview mode | ||
|
||
Press `Space` to toggle preview mode. | ||
|
||
<img src=".github/images/preview-mode.gif" width="600" alt="Walk Preview Mode"> | ||
|
||
### Delete file or directory | ||
|
||
Press `dd` to delete file or directory. Press `u` to undo. | ||
|
||
<img src=".github/images/rm-demo.gif" width="600" alt="Walk Deletes a File"> | ||
|
||
### Display icons | ||
|
||
Install [Nerd Fonts](https://www.nerdfonts.com) and add `--icons` flag. | ||
|
||
<img src=".github/images/demo-icons.gif" width="600" alt="Walk Icons Support"> | ||
|
||
### Image preview | ||
|
||
No additional setup is required. | ||
|
||
<img src=".github/images/images-mode.gif" width="600" alt="Walk Image Preview"> | ||
|
||
## Become a sponsor | ||
|
||
Every line of code in my repositories π signifies my unwavering commitment to open source π‘. Your support π€ ensures these projects keep thriving, innovating, and benefiting all πΌ. If my work has ever resonated π΅ or helped you, kindly consider showing love β€οΈ by sponsoring. [**π Sponsor Me Today! π**](https://github.com/sponsors/antonmedv) | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.