all repos — nixfiles @ 363c634d3af8bc81b1b9a66e6a07dcc12aaf7983

System and user configuration, managed by nix and home-manager

zsh: add `field` as a simplified `cut` that works more like `awk`

Alan Pearce
commit

363c634d3af8bc81b1b9a66e6a07dcc12aaf7983

parent

85aed2343af26b278eb8254846554881f8e35330

1 file changed, 5 insertions(+), 0 deletions(-)

jump to
M user/zsh/zshrcuser/zsh/zshrc
@@ -21,6 +21,11 @@ fi
} compdef '_dispatch docker-compose docker-compose' dc +field () { + awk "{ print \$${1:-0} }" +} +alias f=field + backward-argument () { local WORDCHARS="\!\`~#@$%^&*()-_=+[{]}\|;:,<.>/?\'\"" zle backward-word