mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
make "take" available to every shell
This commit is contained in:
@@ -185,23 +185,24 @@
|
|||||||
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.cargo/bin";
|
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.cargo/bin";
|
||||||
environment.shellAliases =
|
environment.shellAliases =
|
||||||
let
|
let
|
||||||
wcd =
|
wcd = pkgs.writeDash "wcd" ''
|
||||||
pkgs.writeScript "wcd" ''
|
cd "$(${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" \
|
||||||
#!/bin/sh
|
| ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname)/.."
|
||||||
cd "$(${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname)/.."
|
'';
|
||||||
'';
|
where = pkgs.writeDash "where" ''
|
||||||
where =
|
${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" \
|
||||||
pkgs.writeScript "where" ''
|
| ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname
|
||||||
#!/bin/sh
|
'';
|
||||||
${pkgs.coreutils}/bin/readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | ${pkgs.findutils}/bin/xargs ${pkgs.coreutils}/bin/dirname
|
take = pkgs.writeDash "take" ''
|
||||||
'';
|
mkdir "$1" && cd "$1"
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
clipboard = "${pkgs.xclip}/bin/xclip -se c";
|
||||||
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
o = "${pkgs.xdg_utils}/bin/xdg-open";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
ip = "${pkgs.iproute}/bin/ip -c";
|
ip = "${pkgs.iproute}/bin/ip -c";
|
||||||
ns = "nix-shell --run zsh";
|
ns = "nix-shell --run zsh";
|
||||||
nixi = ''nix repl "<nixpkgs>"'';
|
nixi = "nix repl '<nixos/nixpkgs>'";
|
||||||
rm = "rm -i";
|
rm = "rm -i";
|
||||||
cp = "cp -i";
|
cp = "cp -i";
|
||||||
mv = "mv -i";
|
mv = "mv -i";
|
||||||
@@ -212,6 +213,7 @@
|
|||||||
dig = "dig +short";
|
dig = "dig +short";
|
||||||
wcd = "source ${wcd}";
|
wcd = "source ${wcd}";
|
||||||
where = "source ${where}";
|
where = "source ${where}";
|
||||||
|
take = "source ${take}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,11 +49,6 @@
|
|||||||
|
|
||||||
autoload -U zmv run-help
|
autoload -U zmv run-help
|
||||||
|
|
||||||
take() {
|
|
||||||
mkdir $1
|
|
||||||
cd $1
|
|
||||||
}
|
|
||||||
|
|
||||||
fpath=(${zsh-completions}/src $fpath)
|
fpath=(${zsh-completions}/src $fpath)
|
||||||
source ${zsh-history-substring-search}/zsh-history-substring-search.zsh
|
source ${zsh-history-substring-search}/zsh-history-substring-search.zsh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user