diff options
author | tdro <tdro@users.noreply.github.com> | 2021-12-07 19:52:40 -0500 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2021-12-07 19:52:40 -0500 |
commit | 9b21f1355f503474fbf7597f1259a13a543a967a (patch) | |
tree | 7c1aadd103bfa1f36bd548575e950709da724ba3 /.local | |
parent | be56792c447c2fae794cb8d08810cd60f2003f5d (diff) | |
download | dotfiles-9b21f1355f503474fbf7597f1259a13a543a967a.tar.gz dotfiles-9b21f1355f503474fbf7597f1259a13a543a967a.tar.bz2 dotfiles-9b21f1355f503474fbf7597f1259a13a543a967a.zip |
.local/bin/,: Print file
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/, | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.local/bin/, b/.local/bin/, index 47b2673..08f7864 100755 --- a/.local/bin/, +++ b/.local/bin/, @@ -38,11 +38,14 @@ attributes=$($nixLocate | awk '{ print $1, $4 }' | sed 's|/nix/store/.[^-]*-||g' [ -z "$attributes" ] && printf "No files found containing '%s'\n" "${1:-}" && exit -attribute=$(printf '%s' "$attributes" | column --table | fzf | awk '{ print $1 }') +option=$(printf '%s' "$attributes" | column --table | fzf) +attribute=${option%% *} +file=${option#*/} [ -z "$attribute" ] && exit printf '\nsetting up shell with %s path...\n' "$attribute" +printf '\n$OUT/%s\n' "$file" nix-shell --packages "$attribute" fish bat toybox --command \ ' |