ljkajkladljkasd
This commit is contained in:
users/pbsds/home
@ -167,6 +167,7 @@
|
|||||||
bin = "${lib.getExe pkgs.netcat} termbin.com 9999";
|
bin = "${lib.getExe pkgs.netcat} termbin.com 9999";
|
||||||
|
|
||||||
denix = "sed -E 's@/nix/store/[^ /]+@@g'";
|
denix = "sed -E 's@/nix/store/[^ /]+@@g'";
|
||||||
|
denix-ellipsis = "sed -E 's@/nix/store/[^ /-]+-?@/nix/store/...@g'";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.enableNixpkgsReleaseCheck = true;
|
home.enableNixpkgsReleaseCheck = true;
|
||||||
|
@ -11,7 +11,7 @@ zeditor-remote() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
ensure xe fd fzf gum || return 1
|
ensure xe fd rg fzf gum || return 1
|
||||||
|
|
||||||
local spin=""
|
local spin=""
|
||||||
# doesn't forward stdin
|
# doesn't forward stdin
|
||||||
@ -92,15 +92,21 @@ zeditor-remote() {
|
|||||||
rg <<<"$choice" '^ssh://([^/]*)/(~/.*)$' -r 'ssh -t "$1" "cd $2; \\$$SHELL -l"' ||:
|
rg <<<"$choice" '^ssh://([^/]*)/(~/.*)$' -r 'ssh -t "$1" "cd $2; \\$$SHELL -l"' ||:
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -n "$ssh_cd_cmd" ]] && gum confirm "SSH in there now?" --default=yes; then
|
if [[ -n "$ssh_cd_cmd" ]]; then
|
||||||
|
local do_ssh=""
|
||||||
|
if gum confirm "SSH in there now?" --default=yes; then
|
||||||
|
do_ssh=1
|
||||||
|
fi
|
||||||
# history -s "${zed_cmd}"
|
# history -s "${zed_cmd}"
|
||||||
eval ${zed_cmd}
|
eval ${zed_cmd}
|
||||||
|
|
||||||
# TODO: find a way to not push the rest of the unpushed history
|
# TODO: find a way to not push the rest of the unpushed history
|
||||||
history -s "${ssh_cd_cmd}"
|
history -s "${ssh_cd_cmd}"
|
||||||
history -a
|
history -a
|
||||||
printf >&2 "%s\n" "+ ${ssh_cd_cmd}"
|
if [[ -n "$do_ssh" ]]; then
|
||||||
eval ${ssh_cd_cmd}
|
printf >&2 "%s\n" "+ ${ssh_cd_cmd}"
|
||||||
|
eval ${ssh_cd_cmd}
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [[ "$?" -eq 130 ]]; then
|
if [[ "$?" -eq 130 ]]; then
|
||||||
return 1 # ctrl-c
|
return 1 # ctrl-c
|
||||||
|
Reference in New Issue
Block a user