Modern Alternatives to Classic Linux Tools
-
bat
is nicercat
with syntax highlighting -
fd
is a replacement for the oldfind
and that’s not amazing -
gping
isping
with a graph, in Rust -
delta
is likediff
tool but even more like a syntax-highlighting pager for git, diff, and grep output. Trydelta -s one.txt two.txt
. -
dust
betterdu
command which is used to show sizes of subfolders and such. Not impressed by results. -
broot
is alternative totree
but with much more -
exa
is a modernls
, but still not on Windows, site here but much better is lsd-rs/lsd: The next gen ls command jer ima čak i Windows instalaciju preko scoop a ubuntu preko https://apt.cli.rs/. -
procs
modern replacement forps
written in Rust. Interestingprocs --watch
-
lazygit
is simple terminal UI for git commands -
dive
is amazing CLI tool for exploring each layer in a docker image -
sharkdp/hyperfine is CLI benchmarking tool
Core Utils
uutils/coreutils is cross-platform Rust rewrite of the GNU coreutils
Improve cd
command
These tools are alternatives to the cd
command, designed to save you time by reducing the amount of typing you need to do.
The original tool, Autojump used j
command, was written in Python, but has likely been unmaintained. Its impact was such, however, that it paved the way for the creation of others, like rupa/z and rupa/v, which are written in bash
script. These tools have been so successful that they have been ported to other systems in various forms (fasd, z.lua, zsh-z, ZLocation).
- ZLocation is native PowerShell module, successor of “Jump-Location”
z
is also PowerShell, and not sure why I decided on to go with ZLocationz.lua
also works the same in Lua- zoxide is the most modern one, in Rust, and as such should be faster than others. Install on Windows as it needs more config to me invoked with simple
z
. So I’m not using it right now, but using ZLocation fasd
is archived now- Jump-Location is a Powershell implementation of autojump’s
j
command, but has a successor now
If you encounter an error while removing ZLocation, such as ERROR Couldn't remove ... it may be in use.
, first uninstall it once, and when it fails, close the entire Terminal, then open a new Powershell and try again with the purge option. That would do it.
Trying zoxide, but must add govno:
Invoke-Expression (zoxide init --hook prompt powershell | Out-String)
zi
is Z interactive
On Linux, as I’m running good-old bash, it is as simple as running:
apt install zoxide fzf
echo 'eval "$(zoxide init bash)"' >> ~/.bashrc
And on macOS zsh is default shell:
brew install zoxide
echo 'eval "$(zoxide init zsh)"' >> ~/.zshrc
For fzf, key bindings (Ctrl+T / Ctrl+R / Alt+C) and fuzzy auto-completion on Ubuntu are not enabled by default so you have to add in your ~/.bashrc
:
echo '[ -f /usr/share/doc/fzf/examples/key-bindings.bash ] && source /usr/share/doc/fzf/examples/key-bindings.bash' >> ~/.bashrc
or
echo '[ -f /usr/share/bash-completion/completions/fzf ] && source /usr/share/bash-completion/completions/fzf' >> ~/.bashrc
ali čak ni to nije dovoljno jer ga možda nema: README.Debian says to source /usr/share/doc/fzf/examples/completion.bash, but file no longer exists · Issue #2790 · junegunn/fzf pa moram da ga download u svakom slučaju
if [[ ! -f /usr/share/doc/fzf/examples/completion.zsh ]]; then sudo curl https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.zsh -o /usr/share/doc/fzf/examples/completion.zsh sudo curl https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh -o /usr/share/doc/fzf/examples/key-bindings.zsh fi
if [[ ! -f /usr/share/doc/fzf/examples/completion.bash ]]; then sudo curl https://raw.githubusercontent.com/junegunn/fzf/master/shell/completion.bash -o /usr/share/doc/fzf/examples/completion.bash sudo curl https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.bash -o /usr/share/doc/fzf/examples/key-bindings.bash fi
ali pošto prijavljuje grešku unknown option: --scheme=history
, mora starija verzija (commit: 6dcf5c3):
curl https://raw.githubusercontent.com/junegunn/fzf/6dcf5c3d7d6c321b17e6a5673f1533d6e8350462/shell/key-bindings.bash -o /usr/share/doc/fzf/examples/key-bindings.bash
Napisao sam upustvo: Configuring Key Bindings and Fuzzy Auto-Completion in Ubuntu 22.04 · Issue #3395 · junegunn/fzf
The fzf and ubuntu docs don’t mention you have to.
Improve ls
Command
Dok se exa
ne pojavi na Windows, ovo mi je jedino rešenje:
Making functions permanent in Powershell
function ll { Get-ChildItem -Force @args }
Add to $profile.AllUsersAllHosts
CLI File Manager
The following ones are not available on Windows:
- nnn won’t test it as even Ubunutu setup is not straightforward
- xplr is very nice TUI file explorer
- noice is small file browser
- ranger console file manager with VI key bindings
- clifm is terminal file manager, missing on Ubuntu
- joshuto is ranger-like terminal file manager in Rust, not on Ubuntu
- felix is TUI file manager with vim-like key mapping, not even on Ubuntu
- chafa is amazing image viewer, but inside terminal. Yes, that’s possible - but almost.
TUI libraries
TUI stands for “Text-based User Interface” or “Terminal User Interface”.
- rivo/tview is Terminal UI library for Golang
- fdehau/tui-rs is terminal user interfaces in Rust
Notes on Some Specific Tools
none