Skip to content

Commit

Permalink
🍕 Add zsh history expansion
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Fitz Abucay <ffimnsr@gmail.com>
  • Loading branch information
ffimnsr committed Sep 7, 2024
1 parent c8d4999 commit 75b3ae5
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 15 deletions.
55 changes: 41 additions & 14 deletions obsidian/plantation/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,47 @@
"type": "split",
"children": [
{
"id": "5660668c089f9ed4",
"id": "195155e3bc28d426",
"type": "tabs",
"children": [
{
"id": "5cbe24b0281db295",
"id": "22fc0be14ec27d2d",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Tips/Stable Diffusion prompt tips.md",
"file": "Homebrew/Homebrew Casks.md",
"mode": "source",
"source": false
}
}
},
{
"id": "e81696822515dd68",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Rust Built Tools.md",
"mode": "source",
"source": false
}
}
},
{
"id": "bcb8d331e97ced1a",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "ZSH History Expansion.md",
"mode": "source",
"source": false
}
}
}
]
],
"currentTab": 2
}
],
"direction": "vertical"
Expand Down Expand Up @@ -85,7 +110,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Tips/Stable Diffusion prompt tips.md",
"file": "ZSH History Expansion.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -102,7 +127,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Tips/Stable Diffusion prompt tips.md",
"file": "ZSH History Expansion.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -125,7 +150,7 @@
"state": {
"type": "outline",
"state": {
"file": "Tips/Stable Diffusion prompt tips.md"
"file": "ZSH History Expansion.md"
}
}
}
Expand All @@ -146,18 +171,20 @@
"command-palette:Open command palette": false
}
},
"active": "9b755031fdd9380e",
"active": "bcb8d331e97ced1a",
"lastOpenFiles": [
"Tips/Stable Diffusion prompt tips.md",
"Tips/List open ports on macOS.md",
"Linux CLI Tools.md",
"Rust Built Tools.md",
"Homebrew Casks.md",
"ZSH History Expansion.md",
"DevOps Tools.md",
"Flatpak.md",
"Homebrew/Homebrew Formulae.md",
"Plantation.md",
"Homebrew/Homebrew Casks.md",
"Journald Debugging.md",
"Homebrew",
"Tips/List open ports on macOS.md",
"Tips/Changing Thunderbird's default folder sort.md",
"Tips/Managing SELinux.md",
"Journald Debugging.md",
"Tips/Resize logical volume.md",
"Tips/Setup Hackintosh on Intel NUC8i5BEH.md",
"Tips/Change Thunderbird's default folder sort.md",
Expand All @@ -175,4 +202,4 @@
"2024-08-13.md",
"2024-08-12.md"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
- Thunderbird - `thunderbird`
- Visual Studio Code - `visual-studio-code`
- Yubico Authenticator - `yubico-authenticator`
- Yubico Yubikey Manager - `yubico-yubikey-manager`
- Zoom Workplace - `zoom`
- Emacs - `emacs`
- Emacs - `emacs`
- Docker - `docker`
- FiraCode - `font-fira-code-nerd-font`
- Hack - `font-hack-nerd-font`
- Keka - `keka`
- OBS - `obs`
- Telegram - `telegram`
30 changes: 30 additions & 0 deletions obsidian/plantation/Homebrew/Homebrew Formulae.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
- bandwhich
- bat
- bottom
- difftastic
- dust
- fd
- fzf
- gnupg
- grex
- hexyl
- htop
- hurl
- hyperfine
- iproute2mac
- jq
- neovim
- nmap
- oha
- ollama
- pinentry-mac
- python-tk@3.12
- rclone
- ripgrep
- sd
- socat
- starship
- tmux
- yt-dlp
- zoxide
- zplug
1 change: 1 addition & 0 deletions obsidian/plantation/Plantation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- [[Homebrew Casks]] - contains my most often used homebrew casks in Mac OS.
- [[Homebrew Formulae]]
- [[Flatpak]]
- [[Journald Debugging]]
- [[Rust Built Tools]]
Expand Down
15 changes: 15 additions & 0 deletions obsidian/plantation/ZSH History Expansion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- `!$` or `!:$` - the last argument
- `!^` or `!:^` - first argument (after the program/script/built-in command) from previous command
- `!*` - all arguments from the previous command
- `!!` - previous command including arguments
- `!n` - command number `n` from **history**.
- `!str` - most recent command **starting** with `str`
- `!?str[?]` - most recent command **containing** `str`
- `!!:s/find/replace[/:G]` - previous (last) command, substitute `find` with `replace`
- `!!:1` - get the previous command first argument
- `!!:1-2` - get the previous command first and second argument
- `!!:0` - get the previous command only
- `!#` - get **current** command line typed in so far (duplicate the current command)

Note:
For word designators a `:` usually separates the event specification from the word designator. It may be omitted only if the word designator begins with a `^`, `$`, `*`, `-`, or `%`.

0 comments on commit 75b3ae5

Please sign in to comment.