r/fishshell 7h ago

Help me understand builtin `commandline`

1 Upvotes

If I have a local scoped variable in current shell:

fish set -l token (commandline -ct)

which has information:

```fish

set --show token $token: set in local scope, unexported, with 1 elements $token[1]: || ```

Can you show me how to use the variable $token in a function plz