add kpaste
This commit is contained in:
parent
6aaecf4ac5
commit
a03344046b
1 changed files with 13 additions and 0 deletions
|
@ -43,6 +43,19 @@ with lib;
|
||||||
nix-show-garbadge-roots = "ls -lh /nix/var/nix/gcroots/auto/";
|
nix-show-garbadge-roots = "ls -lh /nix/var/nix/gcroots/auto/";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
interactiveShellInit = ''
|
||||||
|
kpaste() {
|
||||||
|
arg=cat
|
||||||
|
if [[ $# -ne 0 ]]; then
|
||||||
|
arg+=("''${@}")
|
||||||
|
elif [[ -t 0 ]] && [[ -o interactive ]]; then
|
||||||
|
arg=(wl-paste)
|
||||||
|
fi
|
||||||
|
"''${arg[@]}" | curl -sS http://p.r --data-binary @- | \
|
||||||
|
sed '$ {p;s|http://p.r|https://p.krebsco.de|}'
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue