2026-01-14 22:57:45 +05:30
2026-01-14 21:09:29 +05:30
2026-01-14 20:59:18 +05:30
2026-01-14 12:45:31 +05:30
2026-01-14 22:31:20 +05:30
2026-01-14 22:28:53 +05:30

args

args is a simple command line tool that lists out each positional argument that it receives

why?

i created it to help me understand word-splitting and quote removal in shells

how do i use it?

$ args one two three
@1  one
@2  two
@3  three

$ # the second argument doesn't get split because of the quotes
$ args one 'a world of spaces'
@1  one
@2  a world with spaces

$ # NOTE: empty arguments are presented as ''
$ args ''
@1  ''

$ # words are split, quoting removed
$ args $(echo hello \"world\")
@1  hello
@2  "world"

$ # words aren't split because $() is quoted
$ args "$(echo hello \"world\")"
@1  hello "world"

how do i install it?

$ cd [a reasonable place]
$ #     |_ personally i create and use ~/.local/src
$ git clone https://gitea.kevinnlsamuel.com/kevinnlsamuel/args.git --depth 1
$ cd args
$ make build install
Description
a command line tool to understand word splitting and quote removal in shells
Readme 42 KiB
Languages
C 34%
Makefile 33.2%
Shell 23.6%
Just 9.2%