Browse Source

zsh: Fix map function.

master
Kevin Baensch 2 months ago
parent
commit
0d97bc51a2
Signed by: derped GPG Key ID: C0F1D326C7626543
  1. 4
      config/zsh.nix

4
config/zsh.nix

@ -16,6 +16,7 @@ mkIf (elem "zsh" config.machine.conffiles) {
ustrip = "sed -e '/\.service\|\.timer\|\.target\|\.socket\|\.slice\|\.scope\|\.path\|\.mount\|\.device)/!d' -e 's/loaded.*$//g' -e 's/^ \|^ //g'";
lsunits = "systemctl list-units | ustrip";
};
shellInit = ''
function ll() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" }
function lln() { exa -abgHhl@ --git --color=always --group-directories-first $@ | bat --paging=always --style=changes --color=always --theme="Solarized (dark)" -n }
@ -23,8 +24,9 @@ mkIf (elem "zsh" config.machine.conffiles) {
function rwhich() { realpath $(which $@) }
function cdf() { cd $(rwhich $@ | sed "s/$@$//") }
function sfu() { lsunits | rg -i $@ }
function map() { for f in "$\{@:2\}"; do; eval $1 $f; done }
function map() { for f in "$\{@:2\}"; do; eval $1 \"$f\"; done }
'';
ohMyZsh = {
enable = true;
plugins = [ "cabal" "docker" "gitfast" "python" "pip" "sudo" "systemd" "man" ];

Loading…
Cancel
Save