lkjdsalkjdsalkjad
This commit is contained in:
@@ -36,6 +36,8 @@ zeditor-remote() {
|
||||
local -a hosts
|
||||
readarray -d $'\n' -t hosts < <(
|
||||
cut <"$HOME"/.ssh/known_hosts -d' ' -f1 | sort -u \
|
||||
| grep -vE '^\[' \
|
||||
| grep -v '[,@]' \
|
||||
| grep -Ev '^([0-9]{0,3}\.){3}[0-9]{0,3}$' \
|
||||
| grep -Ev '^([0-9a-fA-F]{0,4}:){0,7}:?([0-9a-fA-F]{0,4}:){0,6}[0-9a-fA-F]{0,4}$'
|
||||
)
|
||||
@@ -45,7 +47,7 @@ zeditor-remote() {
|
||||
)
|
||||
printf '%s\n' "${hosts[@]}" \
|
||||
| sed -E "s/\\.($(IFS='|'; printf "%s" "${domains[*]}"))\$//g" \
|
||||
| grep -v '\.'
|
||||
| grep -v '[.:]'
|
||||
fi
|
||||
} | grep -v '^localhost$' | sort -u
|
||||
} | fzf --multi --reverse --bind 'ctrl-a:toggle-all' --height=25 --cycle \
|
||||
@@ -100,6 +102,9 @@ zeditor-remote() {
|
||||
printf >&2 "%s\n" "+ ${ssh_cd_cmd}"
|
||||
eval ${ssh_cd_cmd}
|
||||
else
|
||||
if [[ "$?" -eq 130 ]]; then
|
||||
return 1 # ctrl-c
|
||||
fi
|
||||
# history -s "${zed_cmd}"
|
||||
eval ${zed_cmd}
|
||||
printf >&2 "%s\n" "+$(printf " %q" cd "${choice}")"
|
||||
|
||||
@@ -5,6 +5,7 @@ let
|
||||
in
|
||||
{
|
||||
programs = let
|
||||
# TODO: a notification based variant
|
||||
rcScript = ''
|
||||
salert() {
|
||||
local retval=$?
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
unstable.nixfmt-rfc-style # nix
|
||||
harper # harper
|
||||
typos-lsp # typos
|
||||
tinymist # typst
|
||||
|
||||
# I prefer these in shell.nix / virtual environments
|
||||
# python3Packages.python-lsp-server # pylsp
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#".envrc"
|
||||
".remote.toml"
|
||||
".remoteenv"
|
||||
".zed"
|
||||
"result"
|
||||
"result-*"
|
||||
"results"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
let
|
||||
|
||||
_tmp_func_name = "_tmp_func_Oaw5aifeeniezeiquonaipheNahthae9caik4Rai"; # pwgen ftw
|
||||
# TODO: trap the 'unset'?
|
||||
mkArgsAlias = alias: ''${_tmp_func_name}() { ${alias}; unset -f ${_tmp_func_name}; }; ${_tmp_func_name}'';
|
||||
|
||||
in
|
||||
@@ -115,7 +116,6 @@ in
|
||||
|
||||
# old -> new
|
||||
home.shellAliases.vimv = "edir";
|
||||
#home.shellAliases.atom = "pulsar";
|
||||
|
||||
# Be conservative with files
|
||||
# --preserver-root is for GNU versions, preventing changing perms on /
|
||||
@@ -131,6 +131,8 @@ in
|
||||
home.shellAliases.fda = "fd --no-ignore --hidden";
|
||||
home.shellAliases.afd = "fd --no-ignore --hidden";
|
||||
|
||||
home.shellAliases.nlocate = "nix-locate --top-level --regex"; # via nix-index-with-full-db
|
||||
|
||||
home.shellAliases.inom = mkArgsAlias ''nom "$@" --system i686-linux -j0'';
|
||||
home.shellAliases.inix = mkArgsAlias ''nix "$@" --system i686-linux -j0'';
|
||||
home.shellAliases.rnom = mkArgsAlias ''nom "$@" --system riscv64-linux -j0'';
|
||||
@@ -172,6 +174,7 @@ in
|
||||
#tldr
|
||||
stress
|
||||
entr
|
||||
faketty
|
||||
axel aria aria2
|
||||
xe # xargs alternative
|
||||
sd # sed alternative
|
||||
|
||||
Reference in New Issue
Block a user