zsh: add `field` as a simplified `cut` that works more like `awk`
Alan Pearce alan@alanpearce.eu
Sat, 25 Mar 2023 21:39:23 +0100
1 files changed, 5 insertions(+), 0 deletions(-)
jump to
M user/zsh/zshrc → user/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