mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
profiles/dev: fix custom functions... again
This commit is contained in:
parent
5a30ebcb02
commit
95d30dbdcf
@ -47,7 +47,7 @@ in {
|
|||||||
dir=''${1:-$PWD}
|
dir=''${1:-$PWD}
|
||||||
dest=$(${pkgs.fd}/bin/fd --type directory --hidden --ignore-vcs --base-directory "$dir" \
|
dest=$(${pkgs.fd}/bin/fd --type directory --hidden --ignore-vcs --base-directory "$dir" \
|
||||||
| ${pkgs.fzf}/bin/fzf --prompt "Go to directory ")
|
| ${pkgs.fzf}/bin/fzf --prompt "Go to directory ")
|
||||||
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dest")
|
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
|
||||||
|
|
||||||
[ "$dest" ] && cd "$destPrime"
|
[ "$dest" ] && cd "$destPrime"
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ in {
|
|||||||
dir=''${1:-$PWD}
|
dir=''${1:-$PWD}
|
||||||
dest=$(${pkgs.fd}/bin/fd --hidden --ignore-vcs --base-directory "$dir" \
|
dest=$(${pkgs.fd}/bin/fd --hidden --ignore-vcs --base-directory "$dir" \
|
||||||
| ${pkgs.fzf}/bin/fzf --prompt "Open file ")
|
| ${pkgs.fzf}/bin/fzf --prompt "Open file ")
|
||||||
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dest")
|
destPrime=$(${pkgs.coreutils}/bin/realpath --canonicalize-existing --logical "$dir/$dest")
|
||||||
|
|
||||||
if [ -d "$destPrime" ]; then
|
if [ -d "$destPrime" ]; then
|
||||||
[ "$dest" ] && cd "$destPrime";
|
[ "$dest" ] && cd "$destPrime";
|
||||||
|
Loading…
Reference in New Issue
Block a user