ljkajkladljkasd

This commit is contained in:
Peder Bergebakken Sundt 2025-03-21 14:01:17 +01:00
parent abd66da607
commit dcbf828bc4
2 changed files with 11 additions and 4 deletions
users/pbsds/home

@ -167,6 +167,7 @@
bin = "${lib.getExe pkgs.netcat} termbin.com 9999";
denix = "sed -E 's@/nix/store/[^ /]+@@g'";
denix-ellipsis = "sed -E 's@/nix/store/[^ /-]+-?@/nix/store/...@g'";
};
home.enableNixpkgsReleaseCheck = true;

@ -11,7 +11,7 @@ zeditor-remote() {
return 1
fi
}
ensure xe fd fzf gum || return 1
ensure xe fd rg fzf gum || return 1
local spin=""
# doesn't forward stdin
@ -92,15 +92,21 @@ zeditor-remote() {
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}"
eval ${zed_cmd}
# TODO: find a way to not push the rest of the unpushed history
history -s "${ssh_cd_cmd}"
history -a
printf >&2 "%s\n" "+ ${ssh_cd_cmd}"
eval ${ssh_cd_cmd}
if [[ -n "$do_ssh" ]]; then
printf >&2 "%s\n" "+ ${ssh_cd_cmd}"
eval ${ssh_cd_cmd}
fi
else
if [[ "$?" -eq 130 ]]; then
return 1 # ctrl-c