-
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.
Environment with fzf and zoxide - fuzzy file and directory magic (#19)
Our last two FPF entries in one environment! Activate this and you get `fzf` and `zoxide` with the shell extensions enabled in `[profile]`. --------- Signed-off-by: Ross Turk <ross@floxdev.com> Co-authored-by: Rok Garbas <rok@flox.dev>
- Loading branch information
Showing
6 changed files
with
324 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
run/ | ||
cache/ | ||
lib/ | ||
log/ |
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,4 @@ | ||
{ | ||
"name": "fuzzytools", | ||
"version": 1 | ||
} |
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,275 @@ | ||
{ | ||
"lockfile-version": 1, | ||
"manifest": { | ||
"version": 1, | ||
"install": { | ||
"fzf": { | ||
"pkg-path": "fzf" | ||
}, | ||
"zoxide": { | ||
"pkg-path": "zoxide" | ||
} | ||
}, | ||
"hook": {}, | ||
"profile": { | ||
"bash": "eval \"$(fzf --bash)\"\neval \"$(zoxide init bash)\"\n", | ||
"zsh": "source <(fzf --zsh)\neval \"$(zoxide init zsh)\"\n", | ||
"fish": "fzf --fish | source\nzoxide init fish | source\n" | ||
}, | ||
"options": { | ||
"systems": [ | ||
"aarch64-darwin", | ||
"aarch64-linux", | ||
"x86_64-darwin", | ||
"x86_64-linux" | ||
], | ||
"allow": { | ||
"licenses": [] | ||
}, | ||
"semver": {}, | ||
"cuda-detection": false | ||
} | ||
}, | ||
"packages": [ | ||
{ | ||
"attr_path": "fzf", | ||
"broken": false, | ||
"derivation": "/nix/store/52b3vwa7p2jpmp47x1x58g472mfj3qlj-fzf-0.55.0.drv", | ||
"description": "Command-line fuzzy finder written in Go", | ||
"install_id": "fzf", | ||
"license": "MIT", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "fzf-0.55.0", | ||
"pname": "fzf", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.55.0", | ||
"outputs_to_install": [ | ||
"out", | ||
"man" | ||
], | ||
"outputs": { | ||
"man": "/nix/store/7w93k1b3kkxg0bw1rngjmlzlqhlkpj9j-fzf-0.55.0-man", | ||
"out": "/nix/store/7flbcf7cpjz2hypfdhansk4h38ik0x5z-fzf-0.55.0" | ||
}, | ||
"system": "aarch64-darwin", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "fzf", | ||
"broken": false, | ||
"derivation": "/nix/store/md6l933ws3yvdchmmjrz4n1fa4ilrnba-fzf-0.55.0.drv", | ||
"description": "Command-line fuzzy finder written in Go", | ||
"install_id": "fzf", | ||
"license": "MIT", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "fzf-0.55.0", | ||
"pname": "fzf", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.55.0", | ||
"outputs_to_install": [ | ||
"out", | ||
"man" | ||
], | ||
"outputs": { | ||
"man": "/nix/store/wvrm9p8h4fvbhw3jzmkn3a6n5byvys39-fzf-0.55.0-man", | ||
"out": "/nix/store/j1vi8r6y8mzwmxsjmyj49kr3kz6x0vbz-fzf-0.55.0" | ||
}, | ||
"system": "aarch64-linux", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "fzf", | ||
"broken": false, | ||
"derivation": "/nix/store/qpa5d2ymrxsmbmncpv5672ggn88z52fr-fzf-0.55.0.drv", | ||
"description": "Command-line fuzzy finder written in Go", | ||
"install_id": "fzf", | ||
"license": "MIT", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "fzf-0.55.0", | ||
"pname": "fzf", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.55.0", | ||
"outputs_to_install": [ | ||
"out", | ||
"man" | ||
], | ||
"outputs": { | ||
"man": "/nix/store/i62yyfjw7wn49fk1s6kknv0f24xihk92-fzf-0.55.0-man", | ||
"out": "/nix/store/5m233j1vgl3s170wi3ya9avmfqjzyjk6-fzf-0.55.0" | ||
}, | ||
"system": "x86_64-darwin", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "fzf", | ||
"broken": false, | ||
"derivation": "/nix/store/lqcayp0i5y7l6x35ab2c3ymf0k9g0f0x-fzf-0.55.0.drv", | ||
"description": "Command-line fuzzy finder written in Go", | ||
"install_id": "fzf", | ||
"license": "MIT", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "fzf-0.55.0", | ||
"pname": "fzf", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.55.0", | ||
"outputs_to_install": [ | ||
"out", | ||
"man" | ||
], | ||
"outputs": { | ||
"man": "/nix/store/7g42rcn8alnz8z9m23jwpabfa6bsx31b-fzf-0.55.0-man", | ||
"out": "/nix/store/xm4vlmmmsjac0pl80z5clg7mgw6ngzcp-fzf-0.55.0" | ||
}, | ||
"system": "x86_64-linux", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "zoxide", | ||
"broken": false, | ||
"derivation": "/nix/store/vhlqjfdzvx62nqyy95apkjczpyjwavam-zoxide-0.9.6.drv", | ||
"description": "Fast cd command that learns your habits", | ||
"install_id": "zoxide", | ||
"license": "[ MIT ]", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "zoxide-0.9.6", | ||
"pname": "zoxide", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.9.6", | ||
"outputs_to_install": [ | ||
"out" | ||
], | ||
"outputs": { | ||
"out": "/nix/store/sfwyyzk7yf4h9zjg0sgf5jvx1w4i7d6w-zoxide-0.9.6" | ||
}, | ||
"system": "aarch64-darwin", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "zoxide", | ||
"broken": false, | ||
"derivation": "/nix/store/f7jd4wh6y4y86wabwfcjrjd2163a7j18-zoxide-0.9.6.drv", | ||
"description": "Fast cd command that learns your habits", | ||
"install_id": "zoxide", | ||
"license": "[ MIT ]", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "zoxide-0.9.6", | ||
"pname": "zoxide", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.9.6", | ||
"outputs_to_install": [ | ||
"out" | ||
], | ||
"outputs": { | ||
"out": "/nix/store/wvh11j99d9mb26pjrqpxcsjydgc5di70-zoxide-0.9.6" | ||
}, | ||
"system": "aarch64-linux", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "zoxide", | ||
"broken": false, | ||
"derivation": "/nix/store/hfh8rbw7y49agmgpz8bf555f4gq4r97p-zoxide-0.9.6.drv", | ||
"description": "Fast cd command that learns your habits", | ||
"install_id": "zoxide", | ||
"license": "[ MIT ]", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "zoxide-0.9.6", | ||
"pname": "zoxide", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.9.6", | ||
"outputs_to_install": [ | ||
"out" | ||
], | ||
"outputs": { | ||
"out": "/nix/store/kp280cjkj2qcbypaprgbmrcsmpysr9qd-zoxide-0.9.6" | ||
}, | ||
"system": "x86_64-darwin", | ||
"group": "toplevel", | ||
"priority": 5 | ||
}, | ||
{ | ||
"attr_path": "zoxide", | ||
"broken": false, | ||
"derivation": "/nix/store/cnpdzdg7m9maglarbilkakmcj10ynf73-zoxide-0.9.6.drv", | ||
"description": "Fast cd command that learns your habits", | ||
"install_id": "zoxide", | ||
"license": "[ MIT ]", | ||
"locked_url": "https://github.com/flox/nixpkgs?rev=a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"name": "zoxide-0.9.6", | ||
"pname": "zoxide", | ||
"rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c", | ||
"rev_count": 692963, | ||
"rev_date": "2024-10-14T06:48:30Z", | ||
"scrape_date": "2024-10-16T03:55:11Z", | ||
"stabilities": [ | ||
"unstable" | ||
], | ||
"unfree": false, | ||
"version": "0.9.6", | ||
"outputs_to_install": [ | ||
"out" | ||
], | ||
"outputs": { | ||
"out": "/nix/store/bhf60g7kd1h4bzgrhyag26rgi34vcc4j-zoxide-0.9.6" | ||
}, | ||
"system": "x86_64-linux", | ||
"group": "toplevel", | ||
"priority": 5 | ||
} | ||
] | ||
} |
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,26 @@ | ||
version = 1 | ||
|
||
[install] | ||
zoxide.pkg-path = "zoxide" | ||
fzf.pkg-path = "fzf" | ||
|
||
[profile] | ||
bash = ''' | ||
eval "$(fzf --bash)" | ||
eval "$(zoxide init bash)" | ||
''' | ||
|
||
fish = ''' | ||
fzf --fish | source | ||
zoxide init fish | source | ||
''' | ||
|
||
zsh = ''' | ||
source <(fzf --zsh) | ||
eval "$(zoxide init zsh)" | ||
''' | ||
|
||
[options] | ||
systems = ["aarch64-darwin", "aarch64-linux", "x86_64-darwin", "x86_64-linux"] | ||
cuda-detection = false | ||
|
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eo pipefail | ||
|
||
command_exists() { | ||
if ! command -v $1 2>&1 >/dev/null; then | ||
echo "Error: '$1' command could not be found." | ||
return 1 | ||
fi | ||
echo ">>> '$1' command exists" | ||
} | ||
|
||
command_exists fzf | ||
command_exists zoxide |