Patrick Drechsler
Douglas Adams
I’ve come up with a set of rules that describe our reactions to technologies:
Patrick Drechsler
Douglas Adams
I’ve come up with a set of rules that describe our reactions to technologies:
__________________________________________
/ This is the year of linux on the desktop \
| |
| ...Windows10 has WSL ;-) |
\ /
------------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
do one thing (and only one thing!) well
chaining
sound familiar? (hint: functional programming…)
productivity
optics
PS1
, ls
, …)VS Code is cool, but it is not a CLI tool
cd
, ls
, cat
, less
, find
, grep
, sed
, tail
, awk
, dd
, rsync
, ….
+--------------------+
| "terminal" |
+--------------------+
| |
| +--------------+ |
| | | |
| | "shell" | |
| | | |
| +--------------+ |
| |
+--------------------+
terminal
shell
PS1
, scripting language)What is the best terminal?
but think about enriching your output!
PS1: alias for "prompt"
username@machinename:~/some/location $
$PWD
present working directoryExtra, nice-to-have information
$PWD
)started as fancy statusline for vim
…
$PWD
zsh
, bash
, etcsimple prompt
$PWD
zsh
, bash
, etcthe new kid on the block
terminal-independent shell UI
tmuxinator
tmux
-wrapper for non-vim users
F1
- F12
Smooth git handover
## first user
mob start 5
mob next
## second user
mob start 5
mob next
## any user, wanting to make a normal commit
mob done
file explorer / manager
iterms2
, urxvt
, kitty
) not gnome-terminal
(!)~/.config/ranger/rc.conf
starting at line ~300…another terminal file manager
Most terminal file managers out there (if not all) are built using the TUI design principles, much like the superb
Midnight Commander
andRanger
. But clifm is built rather having the CLI design principles in mind: do not navigate through a big menu of files, just type it!, exactly as you do in your regular shell, but easier and> faster.For this reason, clifm does not need to be better: it’s just different!
ranger
alternativeanother terminal file manager
nnn (n³) is a full-featured terminal file manager. It’s tiny, nearly 0-config and incredibly fast.
ranger
alternativeemacs -nw .
emacs in current directory in terminal (-nw
: non-window mode)M-x wdired-change-to-wdired-mode
C-c C-c
man pages can be difficult
an upgraded Ctrl R where history results make sense for what you’re working on right now
McFly replaces your default Ctrl R shell history search with an intelligent search engine that takes into account your working directory and the context of recently executed commands. McFly’s suggestions are prioritized in real time with a small neural network.
cat
& less
with syntax highlighting
ranger
…very fast grep
replacement
ripgrep
recursively searches directories for a regex pattern
sensible defaults: respect .gitignore
, ignores hidden files & folders
command: rg
category: search
use rg --hidden -g '!.git' "your search"
to search all hidden folder except .git
rgh
?)…ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, sqlite (!), etc
rga
pdfgrep
(see website for a benchmark)interactive fuzzy search
find * -type f | fzf
Alt+c
: quick cd
navigationcd **<TAB>
kill -9 <TAB>
ssh **<TAB>
unset **<TAB>
, export **<TAB>
, unalias **<TAB>
simple alternative to find
find
"fd PATTERN
(instead of find -iname '*PATTERN*'
).gitignore
, ignore hidden files/foldersjq
jq
, but also for CSV, TSV, JSON, XML, etc.jq
, but for binary databenchmarking tool
# comparing `fd` with `find`
hyperfine --warmup 3 \
'fd -e jpg -uu' \
'find -iname "*.jpg"'
monitor any kind of "copy"
No command currently running: cp, mv, dd, tar, cat, rsync, grep, fgrep, egrep, cut, sort, md5sum,
sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, adb, gzip, gunzip, bzip2, bunzip2, xz,
unxz, lzma, unlzma, 7z, 7za, zcat, bzcat, lzcat, split, gpg, or wrong permissions.
interactive REPL for shell piping
when the tv team comes in your office
nms
or just run sneakers
sl
(instead of ls
) -> show steam locomotivelolcat
? of courseGitHub CLI
gh repo create --source . --push --private
fix common typos / mistakes
ls
problem: sort by name and time and size at the same time…
Use colors!
colorls
("the original" in ruby: https://github.com/athityakumar/colorls)lsd
(in rust: https://github.com/Peltoche/lsd)exa
(in rust: https://github.com/ogham/exa)Required: font providing all symbols
colorls
boxes -l
2023 - no presentation without the current hype: ChatGPT
chatgpt
Everything *top
Everything lazy*
I’ve done it 😇
Slides 👇