├── .devcontainer └── devcontainer.json ├── .dockerignore ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yaml │ └── request.yaml ├── advanced-issue-labeler.yml ├── codeql │ └── codeql-config.yml ├── dependabot.yml └── workflows │ ├── codeql-analysis.yml │ ├── doc.yml │ ├── go.yml │ ├── golangci-lint.yml │ ├── issue-labeler.yml │ ├── vhs-template.yml │ └── vhs.env ├── .gitignore ├── .golangci.yml ├── .goreleaser.yml ├── LICENSE.txt ├── README.md ├── action.go ├── action_test.go ├── batch.go ├── batch_test.go ├── carapace.go ├── carapace_test.go ├── command.go ├── compat.go ├── compat_test.go ├── complete.go ├── compose.yaml ├── context.go ├── context_test.go ├── defaultActions.go ├── defaultActions_test.go ├── diff.go ├── diff_test.go ├── docs ├── asciinema │ ├── asciinema-player.css │ ├── asciinema-player.min.js │ └── load.js ├── book.toml ├── src │ ├── SUMMARY.md │ ├── carapace.md │ ├── carapace │ │ ├── action.md │ │ ├── action │ │ │ ├── cache-key.cast │ │ │ ├── cache.cast │ │ │ ├── cache.md │ │ │ ├── chdir.cast │ │ │ ├── chdir.md │ │ │ ├── chdirF.cast │ │ │ ├── chdirF.md │ │ │ ├── filter.cast │ │ │ ├── filter.md │ │ │ ├── filterArgs.cast │ │ │ ├── filterArgs.md │ │ │ ├── filterParts.cast │ │ │ ├── filterParts.md │ │ │ ├── invoke.cast │ │ │ ├── invoke.md │ │ │ ├── list.cast │ │ │ ├── list.md │ │ │ ├── multiParts.md │ │ │ ├── multiPartsP.cast │ │ │ ├── multiPartsP.md │ │ │ ├── multiparts.cast │ │ │ ├── noSpace.md │ │ │ ├── nospace.cast │ │ │ ├── prefix.cast │ │ │ ├── prefix.md │ │ │ ├── retain.cast │ │ │ ├── retain.md │ │ │ ├── shift.cast │ │ │ ├── shift.md │ │ │ ├── split.cast │ │ │ ├── split.md │ │ │ ├── splitP.cast │ │ │ ├── splitP.md │ │ │ ├── style.cast │ │ │ ├── style.md │ │ │ ├── styleF.cast │ │ │ ├── styleF.md │ │ │ ├── styleR.cast │ │ │ ├── styleR.md │ │ │ ├── suffix.cast │ │ │ ├── suffix.md │ │ │ ├── suppress.cast │ │ │ ├── suppress.md │ │ │ ├── tag.cast │ │ │ ├── tag.md │ │ │ ├── tagF.cast │ │ │ ├── tagF.md │ │ │ ├── timeout.cast │ │ │ ├── timeout.md │ │ │ ├── uniqueList.md │ │ │ ├── uniqueListF.md │ │ │ ├── uniquelist.cast │ │ │ ├── uniquelistF.cast │ │ │ ├── unless.cast │ │ │ ├── unless.md │ │ │ ├── unlessF.cast │ │ │ ├── unlessF.md │ │ │ ├── usage.cast │ │ │ ├── usage.md │ │ │ └── usageF.md │ │ ├── batch.md │ │ ├── batch │ │ │ ├── ToA.md │ │ │ └── invoke.md │ │ ├── clearCache.md │ │ ├── command.md │ │ ├── command │ │ │ ├── group.cast │ │ │ └── group.md │ │ ├── commands.md │ │ ├── context.md │ │ ├── context │ │ │ ├── abs.md │ │ │ ├── command.md │ │ │ ├── envSubst.md │ │ │ ├── getEnv.md │ │ │ ├── lookupEnv.md │ │ │ └── setEnv.md │ │ ├── customActions.md │ │ ├── defaultActions.md │ │ ├── defaultActions │ │ │ ├── actionCallback.cast │ │ │ ├── actionCallback.md │ │ │ ├── actionCobra.cast │ │ │ ├── actionCobra.md │ │ │ ├── actionCommands.cast │ │ │ ├── actionCommands.md │ │ │ ├── actionDirectories.cast │ │ │ ├── actionDirectories.md │ │ │ ├── actionExecCommand.cast │ │ │ ├── actionExecCommand.md │ │ │ ├── actionExecCommandE.cast │ │ │ ├── actionExecCommandE.md │ │ │ ├── actionExecutables.cast │ │ │ ├── actionExecutables.md │ │ │ ├── actionExecute.cast │ │ │ ├── actionExecute.md │ │ │ ├── actionFiles.cast │ │ │ ├── actionFiles.md │ │ │ ├── actionImport.cast │ │ │ ├── actionImport.md │ │ │ ├── actionMessage.cast │ │ │ ├── actionMessage.md │ │ │ ├── actionMultiParts-nested.cast │ │ │ ├── actionMultiParts.cast │ │ │ ├── actionMultiParts.md │ │ │ ├── actionMultiPartsN.cast │ │ │ ├── actionMultiPartsN.md │ │ │ ├── actionPositional.cast │ │ │ ├── actionPositional.md │ │ │ ├── actionStyleConfig.md │ │ │ ├── actionStyledValues.cast │ │ │ ├── actionStyledValues.md │ │ │ ├── actionStyledValuesDescribed.cast │ │ │ ├── actionStyledValuesDescribed.md │ │ │ ├── actionStyles.cast │ │ │ ├── actionStyles.md │ │ │ ├── actionValues.cast │ │ │ ├── actionValues.md │ │ │ ├── actionValuesDescribed.cast │ │ │ └── actionValuesDescribed.md │ │ ├── expect.md │ │ ├── expectNot.md │ │ ├── export.cast │ │ ├── export.md │ │ ├── files.md │ │ ├── gen.md │ │ ├── gen │ │ │ ├── dashAnyCompletion.md │ │ │ ├── dashCompletion.md │ │ │ ├── flagCompletion.md │ │ │ ├── positionalAnyCompletion.md │ │ │ ├── positionalCompletion.md │ │ │ ├── preInvoke.cast │ │ │ ├── preInvoke.md │ │ │ ├── preRun.cast │ │ │ ├── preRun.md │ │ │ ├── snippet.md │ │ │ └── standalone.md │ │ ├── invokedAction.md │ │ ├── invokedAction │ │ │ ├── filter.md │ │ │ ├── merge.md │ │ │ ├── prefix.md │ │ │ ├── retain.md │ │ │ ├── suffix.md │ │ │ ├── toA.md │ │ │ └── toMultiPartsA.md │ │ ├── invokedBatch.md │ │ ├── invokedBatch │ │ │ └── merge.md │ │ ├── keep.md │ │ ├── newContext.md │ │ ├── output.md │ │ ├── reply.md │ │ ├── reply │ │ │ └── with.md │ │ ├── run.md │ │ ├── sandbox.md │ │ ├── standalone.md │ │ └── standalone │ │ │ ├── carapace-parse.md │ │ │ └── pflag.md │ ├── development.md │ └── development │ │ ├── additionalInformation.md │ │ ├── asciinema.md │ │ ├── shells.md │ │ ├── shells │ │ ├── bash.md │ │ ├── elvish.md │ │ ├── fish.md │ │ ├── ion.md │ │ ├── nushell.md │ │ ├── oil.md │ │ ├── powershell.md │ │ ├── tcsh.md │ │ ├── xonsh.md │ │ └── zsh.md │ │ ├── testing.md │ │ ├── vhs.md │ │ └── vhs │ │ ├── bash.tape │ │ ├── doubleQuote.md │ │ ├── doubleQuote │ │ ├── doubleQuote.bash.tape │ │ ├── doubleQuote.elvish.tape │ │ ├── doubleQuote.fish.tape │ │ ├── doubleQuote.nushell.tape │ │ ├── doubleQuote.oil.tape │ │ ├── doubleQuote.powershell.tape │ │ ├── doubleQuote.xonsh.tape │ │ ├── doubleQuote.zsh.tape │ │ └── out │ │ │ ├── doubleQuote.bash.ascii │ │ │ ├── doubleQuote.elvish.ascii │ │ │ ├── doubleQuote.fish.ascii │ │ │ ├── doubleQuote.nushell.ascii │ │ │ ├── doubleQuote.oil.ascii │ │ │ ├── doubleQuote.powershell.ascii │ │ │ ├── doubleQuote.xonsh.ascii │ │ │ └── doubleQuote.zsh.ascii │ │ ├── doubleQuoteOpen.md │ │ ├── doubleQuoteOpen │ │ ├── doubleQuoteOpen.bash.tape │ │ ├── doubleQuoteOpen.elvish.tape │ │ ├── doubleQuoteOpen.fish.tape │ │ ├── doubleQuoteOpen.nushell.tape │ │ ├── doubleQuoteOpen.oil.tape │ │ ├── doubleQuoteOpen.powershell.tape │ │ ├── doubleQuoteOpen.xonsh.tape │ │ ├── doubleQuoteOpen.zsh.tape │ │ └── out │ │ │ ├── doubleQuoteOpen.bash.ascii │ │ │ ├── doubleQuoteOpen.elvish.ascii │ │ │ ├── doubleQuoteOpen.fish.ascii │ │ │ ├── doubleQuoteOpen.nushell.ascii │ │ │ ├── doubleQuoteOpen.oil.ascii │ │ │ ├── doubleQuoteOpen.powershell.ascii │ │ │ ├── doubleQuoteOpen.xonsh.ascii │ │ │ └── doubleQuoteOpen.zsh.ascii │ │ ├── doubleQuotePartial.md │ │ ├── doubleQuotePartial │ │ ├── doubleQuotePartial.bash.tape │ │ ├── doubleQuotePartial.elvish.tape │ │ ├── doubleQuotePartial.fish.tape │ │ ├── doubleQuotePartial.nushell.tape │ │ ├── doubleQuotePartial.oil.tape │ │ ├── doubleQuotePartial.powershell.tape │ │ ├── doubleQuotePartial.xonsh.tape │ │ ├── doubleQuotePartial.zsh.tape │ │ └── out │ │ │ ├── doubleQuoteOpen.bash.ascii │ │ │ ├── doubleQuoteOpen.elvish.ascii │ │ │ ├── doubleQuoteOpen.fish.ascii │ │ │ ├── doubleQuoteOpen.nushell.ascii │ │ │ ├── doubleQuoteOpen.oil.ascii │ │ │ ├── doubleQuoteOpen.powershell.ascii │ │ │ ├── doubleQuoteOpen.xonsh.ascii │ │ │ ├── doubleQuoteOpen.zsh.ascii │ │ │ ├── doubleQuotePartial.bash.ascii │ │ │ ├── doubleQuotePartial.elvish.ascii │ │ │ ├── doubleQuotePartial.fish.ascii │ │ │ ├── doubleQuotePartial.nushell.ascii │ │ │ ├── doubleQuotePartial.oil.ascii │ │ │ ├── doubleQuotePartial.powershell.ascii │ │ │ ├── doubleQuotePartial.xonsh.ascii │ │ │ └── doubleQuotePartial.zsh.ascii │ │ ├── elvish.tape │ │ ├── escape.md │ │ ├── escape │ │ ├── escape.bash.tape │ │ ├── escape.elvish.tape │ │ ├── escape.fish.tape │ │ ├── escape.nushell.tape │ │ ├── escape.oil.tape │ │ ├── escape.powershell.tape │ │ ├── escape.xonsh.tape │ │ ├── escape.zsh.tape │ │ └── out │ │ │ ├── escape.bash.ascii │ │ │ ├── escape.elvish.ascii │ │ │ ├── escape.fish.ascii │ │ │ ├── escape.nushell.ascii │ │ │ ├── escape.oil.ascii │ │ │ ├── escape.powershell.ascii │ │ │ ├── escape.xonsh.ascii │ │ │ └── escape.zsh.ascii │ │ ├── fish.tape │ │ ├── nospace.md │ │ ├── nospace │ │ ├── nospace.bash.tape │ │ ├── nospace.elvish.tape │ │ ├── nospace.fish.tape │ │ ├── nospace.nushell.tape │ │ ├── nospace.oil.tape │ │ ├── nospace.powershell.tape │ │ ├── nospace.xonsh.tape │ │ ├── nospace.zsh.tape │ │ └── out │ │ │ ├── nospace.bash.ascii │ │ │ ├── nospace.elvish.ascii │ │ │ ├── nospace.fish.ascii │ │ │ ├── nospace.nushell.ascii │ │ │ ├── nospace.oil.ascii │ │ │ ├── nospace.powershell.ascii │ │ │ ├── nospace.xonsh.ascii │ │ │ └── nospace.zsh.ascii │ │ ├── nushell.tape │ │ ├── oil.tape │ │ ├── powershell.tape │ │ ├── redirect.md │ │ ├── redirect │ │ ├── out │ │ │ ├── redirect.bash.ascii │ │ │ ├── redirect.elvish.ascii │ │ │ ├── redirect.fish.ascii │ │ │ ├── redirect.nushell.ascii │ │ │ ├── redirect.oil.ascii │ │ │ ├── redirect.powershell.ascii │ │ │ ├── redirect.xonsh.ascii │ │ │ └── redirect.zsh.ascii │ │ ├── redirect.bash.tape │ │ ├── redirect.elvish.tape │ │ ├── redirect.fish.tape │ │ ├── redirect.nushell.tape │ │ ├── redirect.oil.tape │ │ ├── redirect.powershell.tape │ │ ├── redirect.xonsh.tape │ │ └── redirect.zsh.tape │ │ ├── singleQuote.md │ │ ├── singleQuote │ │ ├── out │ │ │ ├── singleQuote.bash.ascii │ │ │ ├── singleQuote.elvish.ascii │ │ │ ├── singleQuote.fish.ascii │ │ │ ├── singleQuote.nushell.ascii │ │ │ ├── singleQuote.oil.ascii │ │ │ ├── singleQuote.powershell.ascii │ │ │ ├── singleQuote.xonsh.ascii │ │ │ └── singleQuote.zsh.ascii │ │ ├── singleQuote.bash.tape │ │ ├── singleQuote.elvish.tape │ │ ├── singleQuote.fish.tape │ │ ├── singleQuote.nushell.tape │ │ ├── singleQuote.oil.tape │ │ ├── singleQuote.powershell.tape │ │ ├── singleQuote.xonsh.tape │ │ └── singleQuote.zsh.tape │ │ ├── singleQuoteOpen.md │ │ ├── singleQuoteOpen │ │ ├── out │ │ │ ├── singleQuoteOpen.bash.ascii │ │ │ ├── singleQuoteOpen.elvish.ascii │ │ │ ├── singleQuoteOpen.fish.ascii │ │ │ ├── singleQuoteOpen.nushell.ascii │ │ │ ├── singleQuoteOpen.oil.ascii │ │ │ ├── singleQuoteOpen.powershell.ascii │ │ │ ├── singleQuoteOpen.xonsh.ascii │ │ │ └── singleQuoteOpen.zsh.ascii │ │ ├── singleQuoteOpen.bash.tape │ │ ├── singleQuoteOpen.elvish.tape │ │ ├── singleQuoteOpen.fish.tape │ │ ├── singleQuoteOpen.nushell.tape │ │ ├── singleQuoteOpen.oil.tape │ │ ├── singleQuoteOpen.powershell.tape │ │ ├── singleQuoteOpen.xonsh.tape │ │ └── singleQuoteOpen.zsh.tape │ │ ├── singleQuotePartial.md │ │ ├── singleQuotePartial │ │ ├── out │ │ │ ├── singleQuotePartial.bash.ascii │ │ │ ├── singleQuotePartial.elvish.ascii │ │ │ ├── singleQuotePartial.fish.ascii │ │ │ ├── singleQuotePartial.nushell.ascii │ │ │ ├── singleQuotePartial.oil.ascii │ │ │ ├── singleQuotePartial.powershell.ascii │ │ │ ├── singleQuotePartial.xonsh.ascii │ │ │ └── singleQuotePartial.zsh.ascii │ │ ├── singleQuotePartial.bash.tape │ │ ├── singleQuotePartial.elvish.tape │ │ ├── singleQuotePartial.fish.tape │ │ ├── singleQuotePartial.nushell.tape │ │ ├── singleQuotePartial.oil.tape │ │ ├── singleQuotePartial.powershell.tape │ │ ├── singleQuotePartial.xonsh.tape │ │ └── singleQuotePartial.zsh.tape │ │ ├── special.md │ │ ├── special │ │ ├── out │ │ │ ├── special.bash.ascii │ │ │ ├── special.elvish.ascii │ │ │ ├── special.fish.ascii │ │ │ ├── special.nushell.ascii │ │ │ ├── special.oil.ascii │ │ │ ├── special.powershell.ascii │ │ │ ├── special.xonsh.ascii │ │ │ └── special.zsh.ascii │ │ ├── special.bash.tape │ │ ├── special.elvish.tape │ │ ├── special.fish.tape │ │ ├── special.nushell.tape │ │ ├── special.oil.tape │ │ ├── special.powershell.tape │ │ ├── special.xonsh.tape │ │ └── special.zsh.tape │ │ ├── specialDoubleQuote.md │ │ ├── specialDoubleQuote │ │ ├── out │ │ │ ├── specialDoubleQuote.bash.ascii │ │ │ ├── specialDoubleQuote.elvish.ascii │ │ │ ├── specialDoubleQuote.fish.ascii │ │ │ ├── specialDoubleQuote.nushell.ascii │ │ │ ├── specialDoubleQuote.oil.ascii │ │ │ ├── specialDoubleQuote.powershell.ascii │ │ │ ├── specialDoubleQuote.xonsh.ascii │ │ │ └── specialDoubleQuote.zsh.ascii │ │ ├── specialDoubleQuote.bash.tape │ │ ├── specialDoubleQuote.elvish.tape │ │ ├── specialDoubleQuote.fish.tape │ │ ├── specialDoubleQuote.nushell.tape │ │ ├── specialDoubleQuote.oil.tape │ │ ├── specialDoubleQuote.powershell.tape │ │ ├── specialDoubleQuote.xonsh.tape │ │ └── specialDoubleQuote.zsh.tape │ │ ├── specialSingleQuote.md │ │ ├── specialSingleQuote │ │ ├── out │ │ │ ├── specialSingleQuote.bash.ascii │ │ │ ├── specialSingleQuote.elvish.ascii │ │ │ ├── specialSingleQuote.fish.ascii │ │ │ ├── specialSingleQuote.nushell.ascii │ │ │ ├── specialSingleQuote.oil.ascii │ │ │ ├── specialSingleQuote.powershell.ascii │ │ │ ├── specialSingleQuote.xonsh.ascii │ │ │ └── specialSingleQuote.zsh.ascii │ │ ├── specialSingleQuote.bash.tape │ │ ├── specialSingleQuote.elvish.tape │ │ ├── specialSingleQuote.fish.tape │ │ ├── specialSingleQuote.nushell.tape │ │ ├── specialSingleQuote.oil.tape │ │ ├── specialSingleQuote.powershell.tape │ │ ├── specialSingleQuote.xonsh.tape │ │ └── specialSingleQuote.zsh.tape │ │ ├── word.md │ │ ├── word │ │ ├── out │ │ │ ├── word.bash.ascii │ │ │ ├── word.elvish.ascii │ │ │ ├── word.fish.ascii │ │ │ ├── word.nushell.ascii │ │ │ ├── word.oil.ascii │ │ │ ├── word.powershell.ascii │ │ │ ├── word.xonsh.ascii │ │ │ └── word.zsh.ascii │ │ ├── word.bash.tape │ │ ├── word.elvish.tape │ │ ├── word.fish.tape │ │ ├── word.nushell.tape │ │ ├── word.oil.tape │ │ ├── word.powershell.tape │ │ ├── word.xonsh.tape │ │ └── word.zsh.tape │ │ ├── xonsh.tape │ │ └── zsh.tape └── theme │ ├── catppuccin.css │ └── index.hbs ├── example-nonposix ├── cmd │ ├── root.go │ └── root_test.go ├── go.mod ├── go.sum └── main.go ├── example ├── README.md ├── cmd │ ├── _test │ │ ├── bash-ble.sh │ │ ├── bash.sh │ │ ├── cmd-clink.lua │ │ ├── elvish.elv │ │ ├── fish.fish │ │ ├── nushell.nu │ │ ├── oil.sh │ │ ├── powershell.ps1 │ │ ├── xonsh.py │ │ └── zsh.sh │ ├── _test_files │ │ ├── files_linux.go │ │ └── go.mod │ ├── action.go │ ├── action_test.go │ ├── chain.go │ ├── chain_test.go │ ├── compat.go │ ├── compat_sub.go │ ├── compat_sub_test.go │ ├── compat_test.go │ ├── flag.go │ ├── flag_disabled.go │ ├── flag_disabled_test.go │ ├── group.go │ ├── help_test.go │ ├── interspersed.go │ ├── interspersed_test.go │ ├── modifier.go │ ├── modifier_test.go │ ├── multiparts.go │ ├── multiparts_test.go │ ├── root.go │ ├── root_test.go │ ├── special.go │ ├── special_test.go │ ├── subcommand.go │ ├── subcommand_alias.go │ ├── subcommand_group.go │ ├── subcommand_hidden.go │ └── subcommand_hidden_visible.go ├── main.go └── main_test.go ├── experimental.go ├── go.mod ├── go.sum ├── go.work ├── go.work.sum ├── internal ├── assert │ └── assert.go ├── cache │ └── cache.go ├── common │ ├── dash.go │ ├── dash_test.go │ ├── group.go │ ├── message.go │ ├── meta.go │ ├── mock.go │ ├── suffix.go │ ├── suffix_test.go │ ├── value.go │ └── value_test.go ├── config │ └── config.go ├── env │ └── env.go ├── export │ └── export.go ├── log │ └── log.go ├── man │ └── man.go ├── pflagfork │ ├── flag.go │ ├── flagset.go │ └── flagset_test.go ├── shell │ ├── bash │ │ ├── action.go │ │ ├── patch.go │ │ └── snippet.go │ ├── bash_ble │ │ ├── action.go │ │ └── snippet.go │ ├── cmd_clink │ │ ├── action.go │ │ ├── patch.go │ │ └── snippet.go │ ├── elvish │ │ ├── action.go │ │ └── snippet.go │ ├── export │ │ ├── action.go │ │ └── snippet.go │ ├── fish │ │ ├── action.go │ │ └── snippet.go │ ├── ion │ │ ├── action.go │ │ └── snippet.go │ ├── nushell │ │ ├── action.go │ │ ├── patch.go │ │ ├── snippet.go │ │ └── style.go │ ├── oil │ │ ├── action.go │ │ └── snippet.go │ ├── powershell │ │ ├── action.go │ │ └── snippet.go │ ├── shell.go │ ├── tcsh │ │ ├── action.go │ │ └── snippet.go │ ├── xonsh │ │ ├── action.go │ │ ├── snippet.go │ │ └── style.go │ └── zsh │ │ ├── action.go │ │ ├── message.go │ │ ├── namedDirectory.go │ │ ├── snippet.go │ │ ├── special.sh │ │ └── zstyle.go └── spec │ ├── command.go │ └── spec.go ├── internalActions.go ├── invokedAction.go ├── invokedAction_test.go ├── log.go ├── pkg ├── cache │ ├── cache.go │ └── key │ │ └── cache.go ├── condition │ └── condition.go ├── execlog │ └── execlog.go ├── match │ └── match.go ├── ps │ └── ps.go ├── sandbox │ ├── sandbox.go │ └── sandbox_test.go ├── style │ ├── config.go │ ├── keyword.go │ ├── loglevel.go │ ├── path.go │ └── style.go ├── traverse │ ├── git.go │ ├── golang.go │ ├── os.go │ ├── traverse.go │ └── xdg.go ├── uid │ ├── path.go │ ├── uid.go │ └── uid_test.go ├── util │ └── util.go ├── x │ └── x.go └── xdg │ └── xdg.go ├── storage.go ├── storage_test.go ├── third_party ├── github.com │ ├── Valodim │ │ └── zsh-capture-completion │ │ │ ├── LICENSE │ │ │ └── capture.zsh │ ├── acarl005 │ │ └── stripansi │ │ │ ├── LICENSE │ │ │ └── stripansi.go │ ├── drone │ │ └── envsubst │ │ │ ├── LICENSE │ │ │ ├── eval.go │ │ │ ├── eval_test.go │ │ │ ├── funcs.go │ │ │ ├── funcs_test.go │ │ │ ├── parse │ │ │ ├── node.go │ │ │ ├── parse.go │ │ │ ├── scan.go │ │ │ └── scan_test.go │ │ │ ├── path │ │ │ └── match.go │ │ │ └── template.go │ ├── elves │ │ └── elvish │ │ │ ├── LICENSE │ │ │ └── pkg │ │ │ ├── cli │ │ │ └── lscolors │ │ │ │ ├── feature.go │ │ │ │ ├── lscolors.go │ │ │ │ ├── stat_notsolaris.go │ │ │ │ ├── stat_solaris.go │ │ │ │ ├── stat_unix.go │ │ │ │ ├── stat_windows.go │ │ │ │ └── util.go │ │ │ └── ui │ │ │ ├── color.go │ │ │ ├── parse_sgr.go │ │ │ ├── style.go │ │ │ └── styling.go │ ├── hexops │ │ └── gotextdiff │ │ │ ├── LICENSE │ │ │ ├── diff.go │ │ │ ├── myers │ │ │ └── diff.go │ │ │ ├── span │ │ │ ├── parse.go │ │ │ ├── span.go │ │ │ ├── token.go │ │ │ ├── token111.go │ │ │ ├── token112.go │ │ │ ├── uri.go │ │ │ └── utf16.go │ │ │ └── unified.go │ └── mitchellh │ │ └── go-ps │ │ ├── LICENSE.md │ │ ├── process.go │ │ ├── process_darwin.go │ │ ├── process_darwin_test.go │ │ ├── process_freebsd.go │ │ ├── process_linux.go │ │ ├── process_solaris.go │ │ ├── process_test.go │ │ ├── process_unix.go │ │ ├── process_unix_test.go │ │ └── process_windows.go └── golang.org │ └── x │ └── sys │ ├── LICENSE │ ├── PATENTS │ └── execabs │ └── execabs.go └── traverse.go /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carapace", 3 | "image": "ghcr.io/carapace-sh/dev", 4 | "settings": { 5 | "terminal.integrated.shell.linux": "/usr/local/bin/elvish" 6 | }, 7 | "extensions": [ 8 | "golang.Go" 9 | ], 10 | "containerEnv": { 11 | "TARGET": "/go/bin/example" 12 | }, 13 | "onCreateCommand": [ 14 | "sh", 15 | "-c", 16 | "cd example && go install ." 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !.dockerfile 3 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [rsteube] 4 | polar: carapace-sh 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/request.yaml: -------------------------------------------------------------------------------- 1 | name: Request 2 | description: Submit a request 3 | title: "" 4 | labels: [enhancement, fund] 5 | body: 6 | - type: textarea 7 | attributes: 8 | label: Request 9 | description: Describe the feature or problem you’d like to solve. 10 | validations: 11 | required: false 12 | - type: textarea 13 | attributes: 14 | label: Proposed solution 15 | description: How will it benefit the project and its users. 16 | validations: 17 | required: false 18 | - type: textarea 19 | attributes: 20 | label: Anything else? 21 | description: | 22 | Links? References? Anything that will give us more context about the request! 23 | 24 | Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. 25 | validations: 26 | required: false 27 | -------------------------------------------------------------------------------- /.github/codeql/codeql-config.yml: -------------------------------------------------------------------------------- 1 | paths-ignore: 2 | - third_party 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "gomod" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/golangci-lint.yml: -------------------------------------------------------------------------------- 1 | name: golangci-lint 2 | on: 3 | push: 4 | tags: 5 | - v* 6 | branches: 7 | - master 8 | pull_request: 9 | permissions: 10 | contents: read 11 | jobs: 12 | golangci: 13 | name: lint 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/setup-go@v5 17 | with: 18 | go-version: '1.22.0' 19 | cache: false 20 | - uses: actions/checkout@v4 21 | - name: golangci-lint 22 | uses: golangci/golangci-lint-action@v8 23 | -------------------------------------------------------------------------------- /.github/workflows/issue-labeler.yml: -------------------------------------------------------------------------------- 1 | name: Label Issues 2 | on: 3 | issues: 4 | types: [opened, edited] 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | label-component: 11 | runs-on: ubuntu-latest 12 | 13 | permissions: 14 | issues: write 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - name: Parse issue form 20 | uses: stefanbuck/github-issue-parser@v3 21 | id: issue-parser 22 | with: 23 | template-path: .github/ISSUE_TEMPLATE/bug_report.yaml 24 | 25 | - name: Set issue labels 26 | uses: redhat-plumbers-in-action/advanced-issue-labeler@v3 27 | with: 28 | issue-form: ${{ steps.issue-parser.outputs.jsonString }} 29 | token: ${{ secrets.GITHUB_TOKEN }} 30 | -------------------------------------------------------------------------------- /.github/workflows/vhs.env: -------------------------------------------------------------------------------- 1 | RC_NUSHELL_ENV="mkdir ~/.cache/\nexample _carapace nushell | save --force ~/.cache/example.nu" 2 | RC_NUSHELL="source ~/.cache/example.nu\n$$env.config.completions.external.completer = $$example_completer" 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | caraparse/caraparse 2 | .cover 3 | dist 4 | docs/book 5 | docs/src/development/vhs/*/out/*.gif 6 | example/cmd/_test_files/*.txt 7 | example/example 8 | example-nonposix/example-nonposix 9 | integration.cov 10 | unit.cov 11 | .vscode 12 | -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | linters: 3 | exclusions: 4 | paths: 5 | - third_party 6 | settings: 7 | errcheck: 8 | exclude-functions: 9 | - fmt.Fprint 10 | - fmt.Fprintf 11 | - fmt.Fprintln 12 | - (*os.File).Close 13 | - os.RemoveAll 14 | - os.Unsetenv 15 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | before: 4 | hooks: 5 | - go mod download 6 | 7 | builds: 8 | - id: example 9 | env: 10 | - CGO_ENABLED=0 11 | goos: 12 | - linux 13 | - windows 14 | - darwin 15 | main: ./example 16 | binary: example 17 | - id: example-nonposix 18 | env: 19 | - CGO_ENABLED=0 20 | goos: 21 | - linux 22 | - windows 23 | - darwin 24 | main: ./example-nonposix 25 | binary: example-nonposix 26 | 27 | archives: 28 | - name_template: 'example_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' 29 | format_overrides: 30 | - goos: windows 31 | format: zip 32 | 33 | release: 34 | prerelease: auto 35 | -------------------------------------------------------------------------------- /diff_test.go: -------------------------------------------------------------------------------- 1 | package carapace 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/carapace-sh/carapace/pkg/style" 7 | ) 8 | 9 | func TestDiff(t *testing.T) { 10 | original := ActionValues( 11 | "removed", 12 | "same", 13 | ) 14 | new := ActionValues( 15 | "same", 16 | "added", 17 | ) 18 | 19 | assertEqual(t, 20 | Diff(original, new).Invoke(NewContext()), 21 | ActionStyledValues( 22 | "removed", style.Red, 23 | "same", style.Dim, 24 | "added", style.Green, 25 | ).Invoke(NewContext()), 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /docs/asciinema/load.js: -------------------------------------------------------------------------------- 1 | window.addEventListener("load", function () { 2 | // <img src="./carapace-bin.cast" alt="" /> 3 | for (elem of Array.prototype.slice.call(document.getElementsByTagName("img")).reverse()) 4 | if (elem.src.endsWith(".cast")) { 5 | const newItem = document.createElement("div"); 6 | newItem.id = elem.src; 7 | elem.parentNode.replaceChild(newItem, elem); 8 | AsciinemaPlayer.create(newItem.id, newItem, {cols: 108, rows: 24}); 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /docs/book.toml: -------------------------------------------------------------------------------- 1 | [book] 2 | authors = ["rsteube"] 3 | language = "en" 4 | multilingual = false 5 | src = "src" 6 | title = "carapace" 7 | description = "A multi-shell completion library." 8 | 9 | [output.html] 10 | default-theme = "Latte" 11 | preferred-dark-theme = "Mocha" 12 | additional-css = ["asciinema/asciinema-player.css", "./theme/catppuccin.css"] 13 | additional-js = ["asciinema/asciinema-player.min.js", "asciinema/load.js"] 14 | git-repository-url = "https://github.com/carapace-sh/carapace" 15 | edit-url-template = "https://github.com/carapace-sh/carapace/edit/master/docs/{path}" 16 | 17 | [output.html.fold] 18 | enable = true 19 | 20 | [output.linkcheck] 21 | follow-web-links = true 22 | exclude = [ 'gnu\.org', '\./.+/out/.+\.gif', 'go\.dev', 'microsoft\.com', 'iridakos\.com'] 23 | -------------------------------------------------------------------------------- /docs/src/carapace.md: -------------------------------------------------------------------------------- 1 | # carapace 2 | 3 | [carapace] is a command-line completion generator for [spf13/cobra] with support for: 4 | 5 | - [Bash](https://www.gnu.org/software/bash/) 6 | - [Elvish](https://elv.sh/) 7 | - [Fish](https://fishshell.com/) 8 | - [Ion](https://doc.redox-os.org/ion-manual/) ([experimental](https://github.com/carapace-sh/carapace/issues/88)) 9 | - [Nushell](https://www.nushell.sh/) 10 | - [Oil](http://oils.pub/) 11 | - [Powershell](https://microsoft.com/powershell) 12 | - [Xonsh](https://xon.sh/) 13 | - [Zsh](https://www.zsh.org/) 14 | 15 | [carapace]:https://github.com/carapace-sh/carapace 16 | [spf13/cobra]:https://github.com/spf13/cobra 17 | -------------------------------------------------------------------------------- /docs/src/carapace/action.md: -------------------------------------------------------------------------------- 1 | # Action 2 | 3 | An [`Action`](https://pkg.go.dev/github.com/carapace-sh/carapace#Action) indicates how to complete a flag or a positional argument. 4 | 5 | -------------------------------------------------------------------------------- /docs/src/carapace/action/chdir.md: -------------------------------------------------------------------------------- 1 | # Chdir 2 | 3 | [`Chdir`] changes the working directory. 4 | 5 | ```go 6 | carapace.ActionFiles().Chdir("/tmp") 7 | ``` 8 | 9 | ![](./chdir.cast) 10 | 11 | [`Chdir`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Chdir 12 | -------------------------------------------------------------------------------- /docs/src/carapace/action/chdirF.md: -------------------------------------------------------------------------------- 1 | # ChdirF 2 | 3 | [`ChdirF`] is like [ChDir] but uses a function. 4 | 5 | ```go 6 | carapace.ActionFiles().ChdirF(traverse.GitWorkTree) 7 | ``` 8 | 9 | ![](./chdirF.cast) 10 | 11 | [Chdir]:./chdir.md 12 | [`ChdirF`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.ChdirF 13 | -------------------------------------------------------------------------------- /docs/src/carapace/action/filter.md: -------------------------------------------------------------------------------- 1 | # Filter 2 | 3 | [`Filter`] filters given values. 4 | 5 | ```go 6 | carapace.ActionValuesDescribed( 7 | "1", "one", 8 | "2", "two", 9 | "3", "three", 10 | "4", "four", 11 | ).Filter("2", "4") 12 | ``` 13 | 14 | ![](./filter.cast) 15 | 16 | [`Filter`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Filter 17 | -------------------------------------------------------------------------------- /docs/src/carapace/action/filterArgs.md: -------------------------------------------------------------------------------- 1 | # FilterArgs 2 | 3 | [`FilterArgs`] filters `Context.Args`. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | "three", 10 | ).FilterArgs() 11 | ``` 12 | 13 | ![](./filterArgs.cast) 14 | 15 | [`FilterArgs`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.FilterArgs 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/filterParts.md: -------------------------------------------------------------------------------- 1 | # FilterParts 2 | 3 | [`FilterParts`] filters `Context.Parts`. 4 | 5 | ```go 6 | carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action { 7 | return carapace.ActionValues( 8 | "one", 9 | "two", 10 | "three", 11 | ).FilterParts() 12 | }) 13 | ``` 14 | 15 | ![](./filterParts.cast) 16 | 17 | [`FilterParts`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.FilterParts 18 | -------------------------------------------------------------------------------- /docs/src/carapace/action/invoke.md: -------------------------------------------------------------------------------- 1 | # Invoke 2 | 3 | [`Invoke`] explicitly executes the [callback] of an [Action]. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | switch { 8 | case strings.HasPrefix(c.Value, "file://"): 9 | c.Value = strings.TrimPrefix(c.Value, "file://") 10 | case strings.HasPrefix("file://", c.Value): 11 | c.Value = "" 12 | default: 13 | return carapace.ActionValues() 14 | } 15 | return carapace.ActionFiles().Invoke(c).Prefix("file://").ToA() 16 | }) 17 | ``` 18 | 19 | ![](./invoke.cast) 20 | 21 | [callback]:../defaultActions/actionCallback.md 22 | [`Invoke`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Invoke 23 | [Action]:../action.md 24 | -------------------------------------------------------------------------------- /docs/src/carapace/action/list.md: -------------------------------------------------------------------------------- 1 | # List 2 | 3 | [`List`] creates a list with given divider. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | "three" 10 | ).List(",") 11 | ``` 12 | 13 | ![](./list.cast) 14 | 15 | [`List`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.List 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/multiParts.md: -------------------------------------------------------------------------------- 1 | # MultiParts 2 | 3 | [`MultiParts`] completes values splitted by given delimiter(s) separately. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "dir/subdir1/fileA.txt", 8 | "dir/subdir1/fileB.txt", 9 | "dir/subdir2/fileC.txt", 10 | ).MultiParts("/") 11 | ``` 12 | 13 | ![](./multiparts.cast) 14 | 15 | [`MultiParts`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Multiparts 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/noSpace.md: -------------------------------------------------------------------------------- 1 | # NoSpace 2 | 3 | [`NoSpace`] disables space suffix for given character(s). 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one,", 8 | "two/", 9 | "three", 10 | ).NoSpace(',', '/') 11 | ``` 12 | 13 | ![](./nospace.cast) 14 | 15 | [`NoSpace`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.NoSpace 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/prefix.md: -------------------------------------------------------------------------------- 1 | # Prefix 2 | 3 | [`Prefix`] adds a prefix to the inserted values. 4 | 5 | ```go 6 | carapace.ActionFiles().Prefix("file://") 7 | ``` 8 | 9 | ![](./prefix.cast) 10 | 11 | [`Prefix`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Prefix 12 | -------------------------------------------------------------------------------- /docs/src/carapace/action/retain.md: -------------------------------------------------------------------------------- 1 | # Retain 2 | 3 | [`Retain`] retains given values. 4 | 5 | ```go 6 | carapace.ActionValuesDescribed( 7 | "1", "one", 8 | "2", "two", 9 | "3", "three", 10 | "4", "four", 11 | ).Retain("2", "4") 12 | ``` 13 | 14 | ![](./retain.cast) 15 | 16 | [`Retain`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Retain 17 | -------------------------------------------------------------------------------- /docs/src/carapace/action/shift.md: -------------------------------------------------------------------------------- 1 | # Shift 2 | 3 | [`Shift`] shifts positional arguments left `n` times. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | return carapace.ActionMessage("%#v", c.Args) 8 | }).Shift(1) 9 | ``` 10 | 11 | ![](./shift.cast) 12 | 13 | [`Shift`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Shift 14 | -------------------------------------------------------------------------------- /docs/src/carapace/action/split.md: -------------------------------------------------------------------------------- 1 | # Split 2 | 3 | [`Split`] splits `Context.Value` [lexicographically] and replaces `Context.Args` with the tokens. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | cmd := &cobra.Command{} 8 | carapace.Gen(cmd).Standalone() 9 | cmd.Flags().BoolP("bool", "b", false, "bool flag") 10 | cmd.Flags().StringP("string", "s", "", "string flag") 11 | 12 | carapace.Gen(cmd).FlagCompletion(carapace.ActionMap{ 13 | "string": carapace.ActionValues("one", "two", "three"), 14 | }) 15 | 16 | carapace.Gen(cmd).PositionalCompletion( 17 | carapace.ActionValues("pos1", "positional1"), 18 | carapace.ActionFiles(), 19 | ) 20 | 21 | return carapace.ActionExecute(cmd) 22 | }).Split() 23 | ``` 24 | 25 | ![](./split.cast) 26 | 27 | [lexicographically]:https://github.com/carapace-sh/carapace-shlex 28 | [`Split`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Split 29 | -------------------------------------------------------------------------------- /docs/src/carapace/action/splitP.md: -------------------------------------------------------------------------------- 1 | # SplitP 2 | 3 | [`SplitP`] is like [Split] but supports pipelines. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | cmd := &cobra.Command{} 8 | carapace.Gen(cmd).Standalone() 9 | cmd.Flags().BoolP("bool", "b", false, "bool flag") 10 | cmd.Flags().StringP("string", "s", "", "string flag") 11 | 12 | carapace.Gen(cmd).FlagCompletion(carapace.ActionMap{ 13 | "string": carapace.ActionValues("one", "two", "three"), 14 | }) 15 | 16 | carapace.Gen(cmd).PositionalCompletion( 17 | carapace.ActionValues("pos1", "positional1"), 18 | carapace.ActionFiles(), 19 | ) 20 | 21 | return carapace.ActionExecute(cmd) 22 | }).SplitP() 23 | ``` 24 | 25 | ![](./splitP.cast) 26 | 27 | [Split]:./split.md 28 | [`SplitP`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.SplitP 29 | -------------------------------------------------------------------------------- /docs/src/carapace/action/style.md: -------------------------------------------------------------------------------- 1 | # Style 2 | 3 | [`Style`] sets the [style](https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/style) for all values. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | ).Style(style.Green) 10 | ``` 11 | 12 | ![](./style.cast) 13 | 14 | [`Style`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Style 15 | -------------------------------------------------------------------------------- /docs/src/carapace/action/styleF.md: -------------------------------------------------------------------------------- 1 | # StyleF 2 | 3 | [`StyleF`] sets the [style](https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/style) for all values using a function. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | "three", 10 | ).StyleF(func(s string, sc style.Context) string { 11 | switch s { 12 | case "one": 13 | return style.Green 14 | case "two": 15 | return style.Red 16 | default: 17 | return style.Default 18 | } 19 | }) 20 | ``` 21 | 22 | ![](./styleF.cast) 23 | 24 | [`StyleF`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.StyleF 25 | -------------------------------------------------------------------------------- /docs/src/carapace/action/styleR.md: -------------------------------------------------------------------------------- 1 | # StyleR 2 | 3 | [`StyleR`] sets the [style](https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/style) for all values using a reference. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | ).StyleR(&style.Carapace.KeywordAmbiguous) 10 | ``` 11 | 12 | ![](./styleR.cast) 13 | 14 | > Using a reference avoids having to wrap the [Action] in an [ActionCallback] as style configurations are not yet loaded 15 | > when registering the completion. 16 | 17 | [Action]:../action.md 18 | [ActionCallback]:../defaultActions/actionCallback.md 19 | [`StyleR`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.StyleR 20 | -------------------------------------------------------------------------------- /docs/src/carapace/action/suffix.md: -------------------------------------------------------------------------------- 1 | # Suffix 2 | 3 | [`Suffix`] adds a suffix to the inserted values. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "apple", 8 | "melon", 9 | "orange", 10 | ).Suffix("juice") 11 | ``` 12 | 13 | ![](./suffix.cast) 14 | 15 | [`Suffix`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Suffix 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/suppress.md: -------------------------------------------------------------------------------- 1 | # Suppress 2 | 3 | [`Suppress`] suppresses specific error messages using regular expressions. 4 | 5 | ```go 6 | carapace.Batch( 7 | carapace.ActionMessage("unexpected error"), 8 | carapace.ActionMessage("ignored error"), 9 | ).ToA().Suppress("ignored") 10 | ``` 11 | 12 | ![](./suppress.cast) 13 | 14 | [`Suppress`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Suppress 15 | -------------------------------------------------------------------------------- /docs/src/carapace/action/tag.md: -------------------------------------------------------------------------------- 1 | # Tag 2 | 3 | [`Tag`] sets the tag for all values. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "192.168.1.1", 8 | "127.0.0.1", 9 | ).Tag("interfaces") 10 | ``` 11 | 12 | ![](./tag.cast) 13 | 14 | [`Tag`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Tag 15 | -------------------------------------------------------------------------------- /docs/src/carapace/action/tagF.md: -------------------------------------------------------------------------------- 1 | # TagF 2 | 3 | [`TagF`] sets the tag using a function. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one.png", 8 | "two.gif", 9 | "three.txt", 10 | "four.md", 11 | ).StyleF(style.ForPathExt).TagF(func(s string) string { 12 | switch filepath.Ext(s) { 13 | case ".png", ".gif": 14 | return "images" 15 | case ".txt", ".md": 16 | return "documents" 17 | default: 18 | return "" 19 | } 20 | }) 21 | ``` 22 | 23 | ![](./tagF.cast) 24 | 25 | [`TagF`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.TagF 26 | -------------------------------------------------------------------------------- /docs/src/carapace/action/timeout.md: -------------------------------------------------------------------------------- 1 | # Timeout 2 | 3 | [`Timeout`] sets the maximum duration an [Action] may take to [invoke]. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | time.Sleep(3*time.Second) 8 | return carapace.ActionValues("within timeout") 9 | }).Timeout(2*time.Second, carapace.ActionMessage("timeout exceeded")) 10 | ``` 11 | 12 | ![](./timeout.cast) 13 | 14 | [Action]:../action.md 15 | [invoke]:./invoke.md 16 | [`Timeout`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Timeout 17 | -------------------------------------------------------------------------------- /docs/src/carapace/action/uniqueList.md: -------------------------------------------------------------------------------- 1 | # UniqueList 2 | 3 | [`UniqueList`] creates a unique list with given divider. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "one", 8 | "two", 9 | "three" 10 | ).UniqueList(",") 11 | ``` 12 | 13 | ![](./uniquelist.cast) 14 | 15 | [`UniqueList`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.UniqueList 16 | -------------------------------------------------------------------------------- /docs/src/carapace/action/uniqueListF.md: -------------------------------------------------------------------------------- 1 | # UniqueListF 2 | 3 | [`UniqueListF`] is like [UniqueList] but uses a function to transform values before filtering. 4 | 5 | ```go 6 | carapace.ActionMultiPartsN(":", 2, func(c carapace.Context) carapace.Action { 7 | switch len(c.Parts) { 8 | case 0: 9 | return carapace.ActionValues("one", "two", "three") 10 | default: 11 | return carapace.ActionValues("1", "2", "3") 12 | } 13 | }).UniqueListF(",", func(s string) string { 14 | return strings.SplitN(s, ":", 2)[0] 15 | }) 16 | ``` 17 | 18 | ![](./uniquelistF.cast) 19 | 20 | [UniqueList]:./uniqueList.md 21 | [`UniqueListF`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.UniqueListF 22 | -------------------------------------------------------------------------------- /docs/src/carapace/action/unless.md: -------------------------------------------------------------------------------- 1 | # Unless 2 | 3 | [`Unless`] skips invocation if given condition is `true`. 4 | 5 | ```go 6 | carapace.ActionMultiPartsN(":", 2, func(c carapace.Context) carapace.Action { 7 | switch len(c.Parts) { 8 | case 0: 9 | return carapace.ActionValues("true", "false").Suffix(":") 10 | default: 11 | return carapace.Batch( 12 | carapace.ActionValues( 13 | "yes", 14 | "positive", 15 | ).Unless(c.Parts[0] != "true"), 16 | carapace.ActionValues( 17 | "no", 18 | "negative", 19 | ).Unless(c.Parts[0] != "false"), 20 | ).ToA() 21 | } 22 | }) 23 | ``` 24 | 25 | ![](./unless.cast) 26 | 27 | [`Unless`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Unless 28 | -------------------------------------------------------------------------------- /docs/src/carapace/action/unlessF.md: -------------------------------------------------------------------------------- 1 | # UnlessF 2 | 3 | [`UnlessF`] skips invocation if given [condition] returns `true`. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "./local", 8 | "~/home", 9 | "/abs", 10 | "one", 11 | "two", 12 | "three", 13 | ).UnlessF(condition.CompletingPath) 14 | ``` 15 | 16 | ![](./unlessF.cast) 17 | 18 | [`UnlessF`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.UnlessF 19 | [condition]:https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/condition 20 | -------------------------------------------------------------------------------- /docs/src/carapace/action/usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | [`Usage`] sets the usage message. 4 | 5 | ```go 6 | carapace.ActionValues().Usage("explicit usage") 7 | ```` 8 | 9 | ![](./usage.cast) 10 | 11 | > It is implicitly set by default to [`Flag.Usage`] for flag and [`Command.Use`] for positional arguments. 12 | 13 | [`Usage`]: https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Usage 14 | [`Command.Use`]:https://pkg.go.dev/github.com/spf13/cobra#Command 15 | [`Flag.Usage`]:https://pkg.go.dev/github.com/spf13/pflag#Flag -------------------------------------------------------------------------------- /docs/src/carapace/action/usageF.md: -------------------------------------------------------------------------------- 1 | # UsageF 2 | -------------------------------------------------------------------------------- /docs/src/carapace/batch.md: -------------------------------------------------------------------------------- 1 | # Batch 2 | 3 | [`Batch`](https://pkg.go.dev/github.com/carapace-sh/carapace#Batch) bundles [callback actions](./defaultActions/actionCallback.md) so they can be [invoked] concurrently using goroutines. 4 | 5 | ```go 6 | carapace.ActionCallback(func(c carapace.Context) carapace.Action { 7 | return carapace.Batch( 8 | carapace.ActionValues("A", "B"), 9 | carapace.ActionValues("C", "D"), 10 | carapace.ActionValues("E", "F"), 11 | ).Invoke(c).Merge().ToA() 12 | }) 13 | ``` 14 | 15 | [invoked]:https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Invoke 16 | -------------------------------------------------------------------------------- /docs/src/carapace/batch/ToA.md: -------------------------------------------------------------------------------- 1 | # ToA 2 | -------------------------------------------------------------------------------- /docs/src/carapace/batch/invoke.md: -------------------------------------------------------------------------------- 1 | # Invoke 2 | -------------------------------------------------------------------------------- /docs/src/carapace/clearCache.md: -------------------------------------------------------------------------------- 1 | # ClearCache 2 | -------------------------------------------------------------------------------- /docs/src/carapace/command.md: -------------------------------------------------------------------------------- 1 | # Command 2 | -------------------------------------------------------------------------------- /docs/src/carapace/command/group.md: -------------------------------------------------------------------------------- 1 | # Group 2 | 3 | [Command Groups] are implicitly used as `tag` for commands. 4 | 5 | ```go 6 | groupCmd.AddGroup( 7 | &cobra.Group{ID: "main", Title: "Main Commands"}, 8 | &cobra.Group{ID: "setup", Title: "Setup Commands"}, 9 | ) 10 | 11 | run := func(cmd *cobra.Command, args []string) {} 12 | groupCmd.AddCommand( 13 | &cobra.Command{Use: "sub1", GroupID: "main", Run: run}, 14 | &cobra.Command{Use: "sub2", GroupID: "main", Run: run}, 15 | &cobra.Command{Use: "sub3", GroupID: "setup", Run: run}, 16 | &cobra.Command{Use: "sub4", GroupID: "setup", Run: run}, 17 | &cobra.Command{Use: "sub5", Run: run}, 18 | ) 19 | ``` 20 | 21 | ![](./group.cast) 22 | 23 | [Command Groups]:https://github.com/spf13/cobra/blob/main/site/content/user_guide.md#grouping-commands-in-help -------------------------------------------------------------------------------- /docs/src/carapace/commands.md: -------------------------------------------------------------------------------- 1 | # Commands 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/abs.md: -------------------------------------------------------------------------------- 1 | # Abs 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/command.md: -------------------------------------------------------------------------------- 1 | # Command 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/envSubst.md: -------------------------------------------------------------------------------- 1 | # Envsubst 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/getEnv.md: -------------------------------------------------------------------------------- 1 | # GetEnv 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/lookupEnv.md: -------------------------------------------------------------------------------- 1 | # LookupEnv 2 | -------------------------------------------------------------------------------- /docs/src/carapace/context/setEnv.md: -------------------------------------------------------------------------------- 1 | # SetEnv 2 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions.md: -------------------------------------------------------------------------------- 1 | # DefaultActions 2 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionCobra.md: -------------------------------------------------------------------------------- 1 | # ActionCobra 2 | 3 | [`ActionCobra`] bridges given cobra completion function. 4 | 5 | ```go 6 | carapace.ActionCobra(func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { 7 | return []string{"one", "two"}, cobra.ShellCompDirectiveNoSpace 8 | }) 9 | ``` 10 | 11 | ![](./actionCobra.cast) 12 | 13 | [`ActionCobra`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionCobra 14 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionCommands.md: -------------------------------------------------------------------------------- 1 | # ActionCommands 2 | 3 | [`ActionCommands`] completes (sub)commands of given command. 4 | 5 | > `Context.Args` is used to traverse the command tree further down. 6 | > Use [Shift](../action/shift.md) to avoid this. 7 | 8 | 9 | ```go 10 | carapace.Gen(helpCmd).PositionalAnyCompletion( 11 | carapace.ActionCommands(rootCmd), 12 | ) 13 | ``` 14 | 15 | ![](./actionCommands.cast) 16 | 17 | [`ActionCommands`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionCommands 18 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionDirectories.md: -------------------------------------------------------------------------------- 1 | # ActionDirectories 2 | 3 | [`ActionDirectories`] completes directories. 4 | 5 | ```go 6 | carapace.ActionDirectories() 7 | ``` 8 | 9 | ![](./actionDirectories.cast) 10 | 11 | [`ActionDirectories`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionDirectories 12 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionExecCommand.md: -------------------------------------------------------------------------------- 1 | # ActionExecCommand 2 | 3 | [`ActionExecCommand`] executes an external command. 4 | 5 | ```go 6 | carapace.ActionExecCommand("git", "remote")(func(output []byte) carapace.Action { 7 | lines := strings.Split(string(output), "\n") 8 | return carapace.ActionValues(lines[:len(lines)-1]...) 9 | }) 10 | ``` 11 | 12 | ![](./actionExecCommand.cast) 13 | 14 | [`ActionExecCommand`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionExecCommand 15 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionExecCommandE.md: -------------------------------------------------------------------------------- 1 | # ActionExecCommandE 2 | 3 | [`ActionExecCommandE`] is like [ActionExecCommand] but with custom error handling. 4 | 5 | ```go 6 | carapace.ActionExecCommandE("false")(func(output []byte, err error) carapace.Action { 7 | if err != nil { 8 | if exitErr, ok := err.(*exec.ExitError); ok { 9 | return carapace.ActionMessage("failed with %v", exitErr.ExitCode()) 10 | } 11 | return carapace.ActionMessage(err.Error()) 12 | } 13 | return carapace.ActionValues() 14 | }) 15 | ``` 16 | 17 | ![](./actionExecCommandE.cast) 18 | 19 | [ActionExecCommand]:./actionExecCommand.md 20 | [`ActionExecCommandE`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionExecCommandE 21 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionExecutables.md: -------------------------------------------------------------------------------- 1 | # ActionExecutables 2 | 3 | [`ActionExecutables`] completes executables either from [PATH] or given directories. 4 | 5 | ```go 6 | carapace.ActionExecutables() 7 | carapace.ActionExecutables("~/.local/bin") 8 | ``` 9 | 10 | ![](./actionExecutables.cast) 11 | 12 | 13 | [`ActionExecutables`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionExecutables 14 | [PATH]:https://en.wikipedia.org/wiki/PATH_(variable) 15 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionFiles.md: -------------------------------------------------------------------------------- 1 | # ActionFiles 2 | 3 | [`ActionFiles`] completes files with optional suffix filtering. 4 | 5 | ```go 6 | carapace.ActionFiles(".md", "go.mod", "go.sum"), 7 | ``` 8 | 9 | ![](./actionFiles.cast) 10 | 11 | 12 | [`ActionFiles`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionFiles 13 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionImport.md: -------------------------------------------------------------------------------- 1 | # ActionImport 2 | 3 | [`ActionImport`] parses the json generated by [Export] and imports it as [Action]. 4 | 5 | ```go 6 | carapace.ActionImport([]byte(` 7 | { 8 | "version": "unknown", 9 | "messages": [], 10 | "nospace": "", 11 | "usage": "", 12 | "values": [ 13 | { 14 | "value": "first", 15 | "display": "first" 16 | }, 17 | { 18 | "value": "second", 19 | "display": "second" 20 | }, 21 | { 22 | "value": "third", 23 | "display": "third" 24 | } 25 | ] 26 | } 27 | `)) 28 | ```` 29 | 30 | ![](./actionImport.cast) 31 | 32 | [Action]:../action.md 33 | [`ActionImport`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionImport 34 | [Export]:../export.md 35 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionMessage.md: -------------------------------------------------------------------------------- 1 | # ActionMessage 2 | 3 | [`ActionMessage`](https://pkg.go.dev/github.com/carapace-sh/carapace#ActionMessage) shows an error message. 4 | 5 | ```go 6 | carapace.ActionMessage("example message") 7 | ``` 8 | 9 | > In shells other than [Elvish] and [Zsh] the message is integrated in the values as `ERR{n}`. 10 | 11 | ![](./actionMessage.cast) 12 | 13 | [Elvish]:https://elv.sh/ 14 | [Zsh]:https://www.zsh.org/ 15 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionPositional.md: -------------------------------------------------------------------------------- 1 | # ActionPositional 2 | 3 | [`ActionPositional`] completes positional arguments for given command ignoring `--` (dash). 4 | 5 | ```go 6 | carapace.Gen(cmd).DashAnyCompletion( 7 | carapace.ActionPositional(cmd), 8 | ) 9 | ``` 10 | 11 | > It resets `Context.Args` to contain the full arguments and is meant as a means to continue positional completion on dash positions. 12 | 13 | ![](./actionPositional.cast) 14 | 15 | [`ActionPositional`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionPositional 16 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionStyleConfig.md: -------------------------------------------------------------------------------- 1 | # ActionStyleConfig 2 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionStyledValues.md: -------------------------------------------------------------------------------- 1 | # ActionStyledValues 2 | 3 | [`ActionStyledValues`] is like [ActionValues](./actionValues.md) but accepts an additional [style](https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/style). 4 | 5 | ```go 6 | carapace.ActionStyledValues( 7 | "first", style.Default, 8 | "second", style.Blue, 9 | "third", style.Of(style.BgBrightBlack, style.Magenta, style.Bold), 10 | ) 11 | ``` 12 | 13 | ![](./actionStyledValues.cast) 14 | 15 | [`ActionStyledValues`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionStyledValues 16 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionStyledValuesDescribed.md: -------------------------------------------------------------------------------- 1 | # ActionStyledValuesDescribed 2 | 3 | [`ActionStyledValuesDescribed`] is like [ActionValuesDescribed](./actionValuesDescribed.md) but accepts an additional [style](https://pkg.go.dev/github.com/carapace-sh/carapace/pkg/style). 4 | 5 | ```go 6 | carapace.ActionStyledValuesDescribed( 7 | "first", "description of first", style.Blink, 8 | "second", "description of second", style.Of("color210", style.Underlined), 9 | "third", "description of third", style.Of("#112233", style.Italic), 10 | ) 11 | ``` 12 | 13 | ![](./actionStyledValuesDescribed.cast) 14 | 15 | [`ActionStyledValuesDescribed`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionStyledValuesDescribed -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionStyles.md: -------------------------------------------------------------------------------- 1 | # ActionStyles 2 | 3 | [`ActionStyles`] completes styles. 4 | 5 | ![](./actionStyles.cast) 6 | 7 | 8 | [`ActionStyles`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionStyles 9 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionValues.md: -------------------------------------------------------------------------------- 1 | # ActionValues 2 | 3 | [`ActionValues`] completes values. 4 | 5 | ```go 6 | carapace.ActionValues( 7 | "first", 8 | "second", 9 | "third" 10 | ) 11 | ``` 12 | 13 | ![](./actionValues.cast) 14 | 15 | [`ActionValues`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionValues 16 | -------------------------------------------------------------------------------- /docs/src/carapace/defaultActions/actionValuesDescribed.md: -------------------------------------------------------------------------------- 1 | # ActionValuesDescribed 2 | 3 | [`ActionValuesDescribed`] completes values with a description. 4 | 5 | ```go 6 | carapace.ActionValuesDescribed( 7 | "first", "description of first", 8 | "second", "description of second", 9 | "third", "description of third", 10 | ) 11 | ``` 12 | 13 | ![](./actionValuesDescribed.cast) 14 | 15 | [`ActionValuesDescribed`]:https://pkg.go.dev/github.com/carapace-sh/carapace#ActionValuesDescribed 16 | -------------------------------------------------------------------------------- /docs/src/carapace/expect.md: -------------------------------------------------------------------------------- 1 | # Expect 2 | -------------------------------------------------------------------------------- /docs/src/carapace/expectNot.md: -------------------------------------------------------------------------------- 1 | # ExpectNot 2 | -------------------------------------------------------------------------------- /docs/src/carapace/files.md: -------------------------------------------------------------------------------- 1 | # Files 2 | -------------------------------------------------------------------------------- /docs/src/carapace/gen/dashAnyCompletion.md: -------------------------------------------------------------------------------- 1 | # DashAnyCompletion 2 | 3 | [`DashAnyCompletion`] defines completion for any positional arguments after `--` (dash) not already defined. 4 | 5 | ```go 6 | carapace.Gen(rootCmd).DashAnyCompletion( 7 | carapace.ActionValues("dAny", "dashAny"), 8 | ) 9 | ``` 10 | 11 | [`DashAnyCompletion`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.DashAnyCompletion 12 | -------------------------------------------------------------------------------- /docs/src/carapace/gen/dashCompletion.md: -------------------------------------------------------------------------------- 1 | # DashCompletion 2 | 3 | [`DashCompletion`] defines completion for positional arguments after `--` (dash). 4 | 5 | ```go 6 | carapace.Gen(rootCmd).DashCompletion( 7 | carapace.ActionValues("d1", "dash1"), 8 | carapace.ActionValues("d2", "dash2"), 9 | ) 10 | ``` 11 | 12 | [`DashCompletion`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.DashCompletion -------------------------------------------------------------------------------- /docs/src/carapace/gen/flagCompletion.md: -------------------------------------------------------------------------------- 1 | # FlagCompletion 2 | 3 | [`FlagCompletion`] defines completion for flags. 4 | 5 | ```go 6 | carapace.Gen(myCmd).FlagCompletion(carapace.ActionMap{ 7 | "flagName": carapace.ActionValues("a", "b", "c"), 8 | }) 9 | ``` 10 | 11 | ## Optional argument 12 | 13 | To mark a flag argument as optional (`--name=value`) the [`NoOptDefVal`] needs to be set to anything other than empty string. 14 | 15 | ```go 16 | rootCmd.Flag("optarg").NoOptDefVal = " " 17 | ``` 18 | 19 | [`FlagCompletion`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.FlagCompletion 20 | [`NoOptDefVal`]:https://pkg.go.dev/github.com/spf13/pflag#Flag 21 | -------------------------------------------------------------------------------- /docs/src/carapace/gen/positionalAnyCompletion.md: -------------------------------------------------------------------------------- 1 | # PositionalAnyCompletion 2 | 3 | [`PositionalAnyCompletion`] defines completion for any positional argument not already defined. 4 | 5 | ```go 6 | carapace.Gen(rootCmd).PositionalAnyCompletion( 7 | carapace.ActionValues("posAny", "positionalAny"), 8 | ) 9 | ``` 10 | 11 | [`PositionalAnyCompletion`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.PositionalAnyCompletion 12 | -------------------------------------------------------------------------------- /docs/src/carapace/gen/positionalCompletion.md: -------------------------------------------------------------------------------- 1 | # PositionalCompletion 2 | 3 | [`PositionalCompletion`] defines completion for positional arguments. 4 | 5 | 6 | ```go 7 | carapace.Gen(rootCmd).PositionalCompletion( 8 | carapace.ActionValues("pos1", "positional1"), 9 | carapace.ActionValues("pos2", "positional2"), 10 | ) 11 | ``` 12 | 13 | [`PositionalCompletion`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.PositionalCompletion -------------------------------------------------------------------------------- /docs/src/carapace/gen/preInvoke.md: -------------------------------------------------------------------------------- 1 | # PreInvoke 2 | 3 | [`PreInvoke`] is called after arguments are parsed and allows generic modification of an [Action] before it is invoked. 4 | 5 | ```go 6 | carapace.Gen(rootCmd).PreInvoke(func(cmd *cobra.Command, flag *pflag.Flag, action carapace.Action) carapace.Action { 7 | return action.Chdir(rootCmd.Flag("chdir").Value.String()) 8 | }) 9 | ``` 10 | 11 | ![](./preInvoke.cast) 12 | 13 | [Action]:../action.md 14 | [`PreInvoke`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.PreInvoke -------------------------------------------------------------------------------- /docs/src/carapace/gen/preRun.md: -------------------------------------------------------------------------------- 1 | # PreRun 2 | 3 | [`PreRun`] is called before arguments are parsed for the current command and allows modification of its structure. 4 | 5 | ```go 6 | carapace.Gen(rootCmd).PreRun(func(cmd *cobra.Command, args []string) { 7 | pluginCmd := &cobra.Command{ 8 | Use: "plugin", 9 | Short: "dynamic plugin command", 10 | GroupID: "plugin", 11 | Run: func(cmd *cobra.Command, args []string) {}, 12 | } 13 | 14 | carapace.Gen(pluginCmd).PositionalCompletion( 15 | carapace.ActionValues("pl1", "pluginArg1"), 16 | ) 17 | 18 | cmd.AddCommand(pluginCmd) 19 | }) 20 | ``` 21 | 22 | ![](./preRun.cast) 23 | 24 | [`PreRun`]:https://pkg.go.dev/github.com/carapace-sh/carapace#Carapace.PreRun -------------------------------------------------------------------------------- /docs/src/carapace/gen/snippet.md: -------------------------------------------------------------------------------- 1 | # Snippet 2 | -------------------------------------------------------------------------------- /docs/src/carapace/gen/standalone.md: -------------------------------------------------------------------------------- 1 | # Standalone 2 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction.md: -------------------------------------------------------------------------------- 1 | # InvokedAction 2 | 3 | [`InvokedAction`](https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction) is a logical alias for an [Action](./action.md) whose (nested) callback was [invoked](https://pkg.go.dev/github.com/carapace-sh/carapace#Action.Invoke) and thus contains static values (essentially this is now an [ActionValuesDescribed](./defaultActions/actionValuesDescribed.md)). 4 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/filter.md: -------------------------------------------------------------------------------- 1 | # Filter 2 | 3 | [`Filter`](https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.Filter) filters values within an [InvokedAction](../invokedAction.md). 4 | E.g. completing a unique list of values in an [ActionMultiParts](../defaultActions/actionMultiParts.md): 5 | 6 | ```go 7 | carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action { 8 | return carapace.ActionValues("one", "two", "three").Invoke(c).Filter(c.Parts...).ToA() 9 | } 10 | ``` 11 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/merge.md: -------------------------------------------------------------------------------- 1 | # Merge 2 | 3 | [`Merge`](https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.Merge) combines values of multiple [InvokedActions](../invokedAction.md). 4 | 5 | ```go 6 | carapace.ActionValues("one", "two").Invoke(c).Merge(carapace.ActionValues("three", "four").Invoke(c)).ToA() 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/prefix.md: -------------------------------------------------------------------------------- 1 | # Prefix 2 | 3 | [`Prefix`](https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.Prefix) adds a prefix to all values within an [InvokedAction](../invokedAction.md). 4 | 5 | ```go 6 | carapace.ActionValues("melon", "drop", "fall").Invoke(c).Prefix("water").ToA() 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/retain.md: -------------------------------------------------------------------------------- 1 | # Retain 2 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/suffix.md: -------------------------------------------------------------------------------- 1 | # Suffix 2 | 3 | [`Suffix`](https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.Suffix) adds a suffix to all values within an [InvokedAction](../invokedAction.md). 4 | 5 | ```go 6 | ActionUsers().Invoke(c).Suffix(":").ToA() 7 | ``` 8 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/toA.md: -------------------------------------------------------------------------------- 1 | # ToA 2 | 3 | [`ToA`] casts an [InvokedAction](../invokedAction.md) back to [Action](../action.md). 4 | 5 | ```go 6 | ActionValues().Invoke(c).ToA() 7 | ``` 8 | 9 | [`ToA`]:https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.ToA 10 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedAction/toMultiPartsA.md: -------------------------------------------------------------------------------- 1 | # ToMultiPartsA 2 | 3 | [`ToMultiPartsA`] creates an [ActionMultiParts](../defaultActions/actionMultiParts.md) from values containing a specific separator. 4 | E.g. completing the contents of a zip file (`dir/subdir/file`) by each path segment separately like [ActionFiles](../defaultActions/actionFiles.md): 5 | 6 | ```go 7 | func ActionZipFileContents(file string) carapace.Action { 8 | return carapace.ActionCallback(func(c carapace.Context) carapace.Action { 9 | if reader, err := zip.OpenReader(file); err != nil { 10 | return carapace.ActionMessage(err.Error()) 11 | } else { 12 | defer reader.Close() 13 | vals := make([]string, len(reader.File)) 14 | for index, f := range reader.File { 15 | vals[index] = f.Name 16 | } 17 | return carapace.ActionValues(vals...).Invoke(c).ToMultiPartsA("/") 18 | } 19 | }) 20 | } 21 | ``` 22 | 23 | [`ToMultiPartsA`]:https://pkg.go.dev/github.com/carapace-sh/carapace#InvokedAction.ToMultiPartsA 24 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedBatch.md: -------------------------------------------------------------------------------- 1 | # InvokedBatch 2 | -------------------------------------------------------------------------------- /docs/src/carapace/invokedBatch/merge.md: -------------------------------------------------------------------------------- 1 | # Merge 2 | -------------------------------------------------------------------------------- /docs/src/carapace/keep.md: -------------------------------------------------------------------------------- 1 | # Env 2 | -------------------------------------------------------------------------------- /docs/src/carapace/newContext.md: -------------------------------------------------------------------------------- 1 | # NewContext 2 | -------------------------------------------------------------------------------- /docs/src/carapace/output.md: -------------------------------------------------------------------------------- 1 | # Output 2 | -------------------------------------------------------------------------------- /docs/src/carapace/reply.md: -------------------------------------------------------------------------------- 1 | # Reply 2 | -------------------------------------------------------------------------------- /docs/src/carapace/reply/with.md: -------------------------------------------------------------------------------- 1 | # With 2 | -------------------------------------------------------------------------------- /docs/src/carapace/run.md: -------------------------------------------------------------------------------- 1 | # Run 2 | -------------------------------------------------------------------------------- /docs/src/carapace/sandbox.md: -------------------------------------------------------------------------------- 1 | # Sandbox 2 | -------------------------------------------------------------------------------- /docs/src/carapace/standalone.md: -------------------------------------------------------------------------------- 1 | # Standalone 2 | -------------------------------------------------------------------------------- /docs/src/carapace/standalone/carapace-parse.md: -------------------------------------------------------------------------------- 1 | # carapace-parse 2 | 3 | [carapace-parse] is a helper tool that uses regex to parse gnu help pages. Due to strong inconsistencies between these the results may differ but generally give a good head start. 4 | 5 | ```sh 6 | docker node update --help | carapace-parse -n update -p node -s "Update a node" 7 | ``` 8 | 9 | 10 | [carapace-parse]:https://github.com/carapace-sh/carapace-bin/tree/master/cmd/carapace-parse 11 | -------------------------------------------------------------------------------- /docs/src/carapace/standalone/pflag.md: -------------------------------------------------------------------------------- 1 | # pflag 2 | -------------------------------------------------------------------------------- /docs/src/development.md: -------------------------------------------------------------------------------- 1 | # development 2 | 3 | > WIP 4 | -------------------------------------------------------------------------------- /docs/src/development/asciinema.md: -------------------------------------------------------------------------------- 1 | # Asciinema 2 | 3 | Asciicasts are recorded within a resized tmux window for consistency. 4 | 5 | ```sh 6 | tmux 7 | tmux resize-window -x 108 -y 24 8 | ``` 9 | 10 | They can be embedded using the image syntax. 11 | 12 | ```md 13 | ![](./recording.cast) 14 | ```` 15 | -------------------------------------------------------------------------------- /docs/src/development/shells.md: -------------------------------------------------------------------------------- 1 | # Shells 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/bash.md: -------------------------------------------------------------------------------- 1 | # Bash 2 | 3 | | | | 4 | | - | - | 5 | | strings | `''\'''` `"\""` | 6 | | escape characer | `\` | 7 | | output capture | `$()` `` `<()` | 8 | | line continuation | `\` | 9 | | brace expansion | `{}` | 10 | | redirection | `<` `>` | 11 | -------------------------------------------------------------------------------- /docs/src/development/shells/elvish.md: -------------------------------------------------------------------------------- 1 | # Elvish 2 | 3 | | | | 4 | | - | - | 5 | | strings | `''''` `"\""` | 6 | | escape characer | none | 7 | | output capture | `()` | 8 | | line continuation | `^` | 9 | | brace expansion | `{}` | 10 | | redirection | `<` `>` | 11 | -------------------------------------------------------------------------------- /docs/src/development/shells/fish.md: -------------------------------------------------------------------------------- 1 | # Fish 2 | 3 | | | | 4 | | - | - | 5 | | strings | `''` `""` | 6 | | escape characer | `\` | 7 | | output capture | `()` | 8 | | line continuation | `\` | 9 | | brace expansion | `{}` | 10 | | redirection | `<` `>` | 11 | -------------------------------------------------------------------------------- /docs/src/development/shells/ion.md: -------------------------------------------------------------------------------- 1 | # Ion 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/nushell.md: -------------------------------------------------------------------------------- 1 | # Nushell 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/oil.md: -------------------------------------------------------------------------------- 1 | # Oil 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/powershell.md: -------------------------------------------------------------------------------- 1 | # Powershell 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/tcsh.md: -------------------------------------------------------------------------------- 1 | # Tcsh 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/xonsh.md: -------------------------------------------------------------------------------- 1 | # Xonsh 2 | -------------------------------------------------------------------------------- /docs/src/development/shells/zsh.md: -------------------------------------------------------------------------------- 1 | # Zsh 2 | -------------------------------------------------------------------------------- /docs/src/development/testing.md: -------------------------------------------------------------------------------- 1 | # Testing 2 | 3 | Since callbacks are simply invocations of the program they can be tested directly. 4 | ```sh 5 | example _carapace bash example condition --required '' 6 | valid 7 | invalid 8 | 9 | example _carapace elvish example condition --required '' 10 | [{"Value":"valid","Display":"valid"},{"Value":"invalid","Display":"invalid"}] 11 | 12 | example _carapace fish example condition --required '' 13 | valid 14 | invalid 15 | 16 | example _carapace powershell example condition --required '' 17 | [{"CompletionText":"valid","ListItemText":"valid","ToolTip":" "},{"CompletionText":"invalid","ListItemText":"invalid","ToolTip":" "}] 18 | 19 | example _carapace xonsh example condition --required '' 20 | [{"Value":"valid","Display":"valid","Description":""},{"Value":"invalid","Display":"invalid","Description":""}] 21 | 22 | example _carapace zsh example condition --required '' 23 | valid valid 24 | invalid invalid 25 | ``` 26 | -------------------------------------------------------------------------------- /docs/src/development/vhs.md: -------------------------------------------------------------------------------- 1 | # VHS 2 | -------------------------------------------------------------------------------- /docs/src/development/vhs/bash.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "bash" 11 | 12 | Hide 13 | Type@10ms "source <(example _carapace bash)" Enter 14 | Type@10ms "clear" Enter 15 | Show 16 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote.md: -------------------------------------------------------------------------------- 1 | # Double Quote 2 | 3 | - bash 4 | ![](./doubleQuote/out/doubleQuote.bash.gif) 5 | - elvish 6 | ![](./doubleQuote/out/doubleQuote.elvish.gif) 7 | - fish 8 | ![](./doubleQuote/out/doubleQuote.fish.gif) 9 | - nushell 10 | ![](./doubleQuote/out/doubleQuote.nushell.gif) 11 | - oil 12 | ![](./doubleQuote/out/doubleQuote.oil.gif) 13 | - powershell 14 | ![](./doubleQuote/out/doubleQuote.powershell.gif) 15 | - xonsh 16 | ![](./doubleQuote/out/doubleQuote.xonsh.gif) 17 | - zsh 18 | ![](./doubleQuote/out/doubleQuote.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/doubleQuote.bash.gif 4 | Output out/doubleQuote.bash.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/doubleQuote.elvish.gif 4 | Output out/doubleQuote.elvish.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/doubleQuote.fish.gif 4 | Output out/doubleQuote.fish.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/doubleQuote.nushell.gif 4 | Output out/doubleQuote.nushell.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/doubleQuote.oil.gif 4 | Output out/doubleQuote.oil.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/doubleQuote.powershell.gif 4 | Output out/doubleQuote.powershell.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/doubleQuote.xonsh.gif 4 | Output out/doubleQuote.xonsh.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/doubleQuote.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/doubleQuote.zsh.gif 4 | Output out/doubleQuote.zsh.ascii 5 | 6 | Type `example "ac"` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example "action" 26 | COMPLETING argument 27 | action (action example) 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example "action" 34 | COMPLETING argument 35 | action (action example) 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example "action" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example "action" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example "ac" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example "ac" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | action 27 | action example 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | action 35 | action example 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuote/out/doubleQuote.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example "ac" 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example "ac" 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example "action" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example "action" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen.md: -------------------------------------------------------------------------------- 1 | # Double Quote Open 2 | 3 | - bash 4 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.bash.gif) 5 | - elvish 6 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.elvish.gif) 7 | - fish 8 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.fish.gif) 9 | - nushell 10 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.nushell.gif) 11 | - oil 12 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.oil.gif) 13 | - powershell 14 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.powershell.gif) 15 | - xonsh 16 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.xonsh.gif) 17 | - zsh 18 | ![](./doubleQuoteOpen/out/doubleQuoteOpen.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/doubleQuoteOpen.bash.gif 4 | Output out/doubleQuoteOpen.bash.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/doubleQuoteOpen.elvish.gif 4 | Output out/doubleQuoteOpen.elvish.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/doubleQuoteOpen.fish.gif 4 | Output out/doubleQuoteOpen.fish.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/doubleQuoteOpen.nushell.gif 4 | Output out/doubleQuoteOpen.nushell.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/doubleQuoteOpen.oil.gif 4 | Output out/doubleQuoteOpen.oil.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/doubleQuoteOpen.powershell.gif 4 | Output out/doubleQuoteOpen.powershell.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/doubleQuoteOpen.xonsh.gif 4 | Output out/doubleQuoteOpen.xonsh.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/doubleQuoteOpen.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/doubleQuoteOpen.zsh.gif 4 | Output out/doubleQuoteOpen.zsh.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuoteOpen/out/doubleQuoteOpen.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial.md: -------------------------------------------------------------------------------- 1 | # Double Quote Partial 2 | 3 | - bash 4 | ![](./doubleQuotePartial/out/doubleQuotePartial.bash.gif) 5 | - elvish 6 | ![](./doubleQuotePartial/out/doubleQuotePartial.elvish.gif) 7 | - fish 8 | ![](./doubleQuotePartial/out/doubleQuotePartial.fish.gif) 9 | - nushell 10 | ![](./doubleQuotePartial/out/doubleQuotePartial.nushell.gif) 11 | - oil 12 | ![](./doubleQuotePartial/out/doubleQuotePartial.oil.gif) 13 | - powershell 14 | ![](./doubleQuotePartial/out/doubleQuotePartial.powershell.gif) 15 | - xonsh 16 | ![](./doubleQuotePartial/out/doubleQuotePartial.xonsh.gif) 17 | - zsh 18 | ![](./doubleQuotePartial/out/doubleQuotePartial.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/doubleQuotePartial.bash.gif 4 | Output out/doubleQuotePartial.bash.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/doubleQuotePartial.elvish.gif 4 | Output out/doubleQuotePartial.elvish.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/doubleQuotePartial.fish.gif 4 | Output out/doubleQuotePartial.fish.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/doubleQuotePartial.nushell.gif 4 | Output out/doubleQuotePartial.nushell.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/doubleQuotePartial.oil.gif 4 | Output out/doubleQuotePartial.oil.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/doubleQuotePartial.powershell.gif 4 | Output out/doubleQuotePartial.powershell.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/doubleQuotePartial.xonsh.gif 4 | Output out/doubleQuotePartial.xonsh.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/doubleQuotePartial.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/doubleQuotePartial.zsh.gif 4 | Output out/doubleQuotePartial.zsh.ascii 5 | 6 | Type `example action embeddedP1 "embeddedP2 w"i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuoteOpen.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2\ with\ space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2\ with\ space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | COMPLETING argument 27 | embeddedP2 with space 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | COMPLETING argument 35 | embeddedP2 with space 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 w"ith\ space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 w"ith\ space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2 with space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2 with space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 w"i 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 w"i 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/doubleQuotePartial/out/doubleQuotePartial.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 "embeddedP2 w"i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 "embeddedP2 w"i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/elvish.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "elvish" 11 | 12 | Hide 13 | Type@10ms "eval (example _carapace elvish|slurp)" Enter 14 | Type@10ms "clear" Enter 15 | Show 16 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape.md: -------------------------------------------------------------------------------- 1 | # Escape 2 | 3 | - bash 4 | ![](./escape/out/escape.bash.gif) 5 | - elvish 6 | ![](./escape/out/escape.elvish.gif) 7 | - fish 8 | ![](./escape/out/escape.fish.gif) 9 | - nushell 10 | ![](./escape/out/escape.nushell.gif) 11 | - oil 12 | ![](./escape/out/escape.oil.gif) 13 | - powershell 14 | ![](./escape/out/escape.powershell.gif) 15 | - xonsh 16 | ![](./escape/out/escape.xonsh.gif) 17 | - zsh 18 | ![](./escape/out/escape.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/escape.bash.gif 4 | Output out/escape.bash.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/escape.elvish.gif 4 | Output out/escape.elvish.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2" "with" "` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/escape.fish.gif 4 | Output out/escape.fish.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/escape.nushell.gif 4 | Output out/escape.nushell.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/escape.oil.gif 4 | Output out/escape.oil.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/escape.powershell.gif 4 | Output out/escape.powershell.ascii 5 | 6 | Type "example action embeddedP1 embeddedP2` with` " Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/escape.xonsh.gif 4 | Output out/escape.xonsh.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/escape.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/escape.zsh.gif 4 | Output out/escape.zsh.ascii 5 | 6 | Type `example action embeddedP1 embeddedP2\ with\ ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2" "with" " 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2" "with" " 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | COMPLETING argument 27 | embeddedP2 with space 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | COMPLETING argument 35 | embeddedP2 with space 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2\ with\ space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2\ with\ space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > | example action embeddedP1 embeddedP2\ with\ 26 | NO RECORDS FOUND 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > | example action embeddedP1 embeddedP2\ with\ 34 | NO RECORDS FOUND 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2 with space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2 with space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2` with` 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2` with` 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2` with` 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2` with` 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2\ with\ 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2\ with\ 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/escape/out/escape.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 embeddedP2\ with\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 embeddedP2\ with\ 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2\ with\ space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2\ with\ space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/fish.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "fish" 11 | 12 | Hide 13 | Type@10ms "example _carapace fish | source" Enter 14 | Type@10ms "clear" Enter 15 | Show 16 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace.md: -------------------------------------------------------------------------------- 1 | # Nospace 2 | 3 | - bash 4 | ![](./nospace/out/nospace.bash.gif) 5 | - elvish 6 | ![](./nospace/out/nospace.elvish.gif) 7 | - fish 8 | ![](./nospace/out/nospace.fish.gif) 9 | - nushell 10 | ![](./nospace/out/nospace.nushell.gif) 11 | - oil 12 | ![](./nospace/out/nospace.oil.gif) 13 | - powershell 14 | ![](./nospace/out/nospace.powershell.gif) 15 | - xonsh 16 | ![](./nospace/out/nospace.xonsh.gif) 17 | - zsh 18 | ![](./nospace/out/nospace.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/nospace.bash.gif 4 | Output out/nospace.bash.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/nospace.elvish.gif 4 | Output out/nospace.elvish.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/nospace.fish.gif 4 | Output out/nospace.fish.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/nospace.nushell.gif 4 | Output out/nospace.nushell.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/nospace.oil.gif 4 | Output out/nospace.oil.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/nospace.powershell.gif 4 | Output out/nospace.powershell.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/nospace.xonsh.gif 4 | Output out/nospace.xonsh.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/nospace.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/nospace.zsh.gif 4 | Output out/nospace.zsh.ascii 5 | 6 | Type "example modifier --nospace o" Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace 'one,' 26 | COMPLETING argument 27 | one, 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace 'one,' 34 | COMPLETING argument 35 | one, 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace 'one,' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace 'one,' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nospace/out/nospace.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example modifier --nospace o 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example modifier --nospace o 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example modifier --nospace one, 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example modifier --nospace one, 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/nushell.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "nu" 11 | 12 | Hide 13 | Type@10ms "example _carapace nushell | save --force /tmp/example.nu" Enter 14 | Type@10ms "source /tmp/example.nu" Enter 15 | Type@10ms "$env.config.completions.external.completer = $example_completer" Enter 16 | Type@10ms "clear" Enter 17 | Show 18 | -------------------------------------------------------------------------------- /docs/src/development/vhs/oil.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "osh" 11 | 12 | Hide 13 | Type@10ms "source <(example _carapace oil)" Enter 14 | Type@10ms "clear" Enter 15 | Show 16 | 17 | -------------------------------------------------------------------------------- /docs/src/development/vhs/powershell.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "pwsh" 11 | 12 | Hide 13 | Type@10ms 'Set-PSReadLineOption -Colors @{ "Selection" = "`e[7m" }' Enter 14 | Type@10ms "Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete" Enter 15 | Type@10ms "example _carapace powershell | Out-String | Invoke-Expression" Enter 16 | Type@10ms "clear" Enter 17 | Show 18 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect.md: -------------------------------------------------------------------------------- 1 | # Redirect 2 | 3 | - bash 4 | ![](./redirect/out/redirect.bash.gif) 5 | - elvish 6 | ![](./redirect/out/redirect.elvish.gif) 7 | - fish 8 | ![](./redirect/out/redirect.fish.gif) 9 | - nushell 10 | ![](./redirect/out/redirect.nushell.gif) 11 | - oil 12 | ![](./redirect/out/redirect.oil.gif) 13 | - powershell 14 | ![](./redirect/out/redirect.powershell.gif) 15 | - xonsh 16 | ![](./redirect/out/redirect.xonsh.gif) 17 | - zsh 18 | ![](./redirect/out/redirect.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/out/redirect.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example >/dev/null 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example >/dev/null 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example >/dev/null 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example >/dev/null 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/out/redirect.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example >/dev/null 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example >/dev/null 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > | example >/dev/null 26 | NO RECORDS FOUND 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example >/dev/null 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | > > example >/dev/null 42 | 43 | 44 | 45 | 46 | 47 | 48 | ──────────────────────────────────────────────────────────────────────────────── 49 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/out/redirect.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example >/dev/null 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example >/dev/null 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example >/dev/null 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example >/dev/null 34 | > 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | > example >/dev/null 42 | > 43 | 44 | 45 | 46 | 47 | 48 | ──────────────────────────────────────────────────────────────────────────────── 49 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/redirect.bash.gif 4 | Output out/redirect.bash.ascii 5 | 6 | Type "example >/dev/null " Sleep 1 Tab@1 2 7 | Type "q" # exit `more` 8 | Type "ac" Sleep 1 Tab@1 9 | 10 | Sleep 2 11 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/redirect.elvish.gif 4 | Output out/redirect.elvish.ascii 5 | 6 | Type "example >/dev/null " 7 | Sleep 1 Tab@1 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/redirect.fish.gif 4 | Output out/redirect.fish.ascii 5 | 6 | Type "example >/dev/null " Sleep 1 Tab@1 3 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/redirect.nushell.gif 4 | Output out/redirect.nushell.ascii 5 | 6 | Type "example >/dev/null " 7 | Sleep 1 Tab@1 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/redirect.oil.gif 4 | Output out/redirect.oil.ascii 5 | 6 | Type "example >/dev/null " Sleep 1 Tab@1 2 7 | Type "ac" Sleep 1 Tab@1 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/redirect.powershell.gif 4 | Output out/redirect.powershell.ascii 5 | 6 | Type "example >/dev/null " Sleep 1 Tab@1 7 | Type "ac" Sleep 1 Tab@1 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/redirect.xonsh.gif 4 | Output out/redirect.xonsh.ascii 5 | 6 | Type "example >/dev/null " 7 | Sleep 1 Tab@1 2 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/redirect/redirect.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/redirect.zsh.gif 4 | Output out/redirect.zsh.ascii 5 | 6 | Type "example >/dev/null " 7 | Sleep 1 Tab@1 2 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote.md: -------------------------------------------------------------------------------- 1 | # Single Quote 2 | 3 | - bash 4 | ![](./singleQuote/out/singleQuote.bash.gif) 5 | - elvish 6 | ![](./singleQuote/out/singleQuote.elvish.gif) 7 | - fish 8 | ![](./singleQuote/out/singleQuote.fish.gif) 9 | - nushell 10 | ![](./singleQuote/out/singleQuote.nushell.gif) 11 | - oil 12 | ![](./singleQuote/out/singleQuote.oil.gif) 13 | - powershell 14 | ![](./singleQuote/out/singleQuote.powershell.gif) 15 | - xonsh 16 | ![](./singleQuote/out/singleQuote.xonsh.gif) 17 | - zsh 18 | ![](./singleQuote/out/singleQuote.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example 'action' 26 | COMPLETING argument 27 | action (action example) 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example 'action' 34 | COMPLETING argument 35 | action (action example) 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example 'action' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example 'action' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action 26 | action 27 | action example 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action 34 | action 35 | action example 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/out/singleQuote.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example 'ac' 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example 'ac' 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example 'action' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example 'action' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/singleQuote.bash.gif 4 | Output out/singleQuote.bash.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/singleQuote.elvish.gif 4 | Output out/singleQuote.elvish.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/singleQuote.fish.gif 4 | Output out/singleQuote.fish.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/singleQuote.nushell.gif 4 | Output out/singleQuote.nushell.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/singleQuote.oil.gif 4 | Output out/singleQuote.oil.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/singleQuote.powershell.gif 4 | Output out/singleQuote.powershell.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/singleQuote.xonsh.gif 4 | Output out/singleQuote.xonsh.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuote/singleQuote.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/singleQuote.zsh.gif 4 | Output out/singleQuote.zsh.ascii 5 | 6 | Type `example 'ac'` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen.md: -------------------------------------------------------------------------------- 1 | # Single Quote Open 2 | 3 | - bash 4 | ![](./singleQuoteOpen/out/singleQuoteOpen.bash.gif) 5 | - elvish 6 | ![](./singleQuoteOpen/out/singleQuoteOpen.elvish.gif) 7 | - fish 8 | ![](./singleQuoteOpen/out/singleQuoteOpen.fish.gif) 9 | - nushell 10 | ![](./singleQuoteOpen/out/singleQuoteOpen.nushell.gif) 11 | - oil 12 | ![](./singleQuoteOpen/out/singleQuoteOpen.oil.gif) 13 | - powershell 14 | ![](./singleQuoteOpen/out/singleQuoteOpen.powershell.gif) 15 | - xonsh 16 | ![](./singleQuoteOpen/out/singleQuoteOpen.xonsh.gif) 17 | - zsh 18 | ![](./singleQuoteOpen/out/singleQuoteOpen.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 '"embeddedP2 with space"' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 '"embeddedP2 with space"' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.xonsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/out/singleQuoteOpen.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 with 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 with 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/singleQuoteOpen.bash.gif 4 | Output out/singleQuoteOpen.bash.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/singleQuoteOpen.elvish.gif 4 | Output out/singleQuoteOpen.elvish.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/singleQuoteOpen.fish.gif 4 | Output out/singleQuoteOpen.fish.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/singleQuoteOpen.nushell.gif 4 | Output out/singleQuoteOpen.nushell.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/singleQuoteOpen.oil.gif 4 | Output out/singleQuoteOpen.oil.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/singleQuoteOpen.powershell.gif 4 | Output out/singleQuoteOpen.powershell.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/singleQuoteOpen.xonsh.gif 4 | Output out/singleQuoteOpen.xonsh.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuoteOpen/singleQuoteOpen.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/singleQuoteOpen.zsh.gif 4 | Output out/singleQuoteOpen.zsh.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 with ` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial.md: -------------------------------------------------------------------------------- 1 | # Single Quote Partial 2 | 3 | - bash 4 | ![](./singleQuotePartial/out/singleQuotePartial.bash.gif) 5 | - elvish 6 | ![](./singleQuotePartial/out/singleQuotePartial.elvish.gif) 7 | - fish 8 | ![](./singleQuotePartial/out/singleQuotePartial.fish.gif) 9 | - nushell 10 | ![](./singleQuotePartial/out/singleQuotePartial.nushell.gif) 11 | - oil 12 | ![](./singleQuotePartial/out/singleQuotePartial.oil.gif) 13 | - powershell 14 | ![](./singleQuotePartial/out/singleQuotePartial.powershell.gif) 15 | - xonsh 16 | ![](./singleQuotePartial/out/singleQuotePartial.xonsh.gif) 17 | - zsh 18 | ![](./singleQuotePartial/out/singleQuotePartial.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.bash.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.elvish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | COMPLETING argument 27 | embeddedP2 with space 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | COMPLETING argument 35 | embeddedP2 with space 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.fish.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 w'ith\ space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 w'ith\ space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.nushell.ascii: -------------------------------------------------------------------------------- 1 | > > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > > example action embeddedP1 "embeddedP2 with space" 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > > example action embeddedP1 "embeddedP2 with space" 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 embeddedP2 with space 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 embeddedP2 with space 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 w'i 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 w'i 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/out/singleQuotePartial.zsh.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example action embeddedP1 'embeddedP2 w'i 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example action embeddedP1 'embeddedP2 w'i 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example action embeddedP1 'embeddedP2 with space' 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example action embeddedP1 'embeddedP2 with space' 34 | 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/singleQuotePartial.bash.gif 4 | Output out/singleQuotePartial.bash.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/singleQuotePartial.elvish.gif 4 | Output out/singleQuotePartial.elvish.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/singleQuotePartial.fish.gif 4 | Output out/singleQuotePartial.fish.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/singleQuotePartial.nushell.gif 4 | Output out/singleQuotePartial.nushell.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/singleQuotePartial.oil.gif 4 | Output out/singleQuotePartial.oil.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/singleQuotePartial.powershell.gif 4 | Output out/singleQuotePartial.powershell.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/singleQuotePartial.xonsh.gif 4 | Output out/singleQuotePartial.xonsh.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/singleQuotePartial/singleQuotePartial.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/singleQuotePartial.zsh.gif 4 | Output out/singleQuotePartial.zsh.ascii 5 | 6 | Type `example action embeddedP1 'embeddedP2 w'i` Sleep 1 Tab@1 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special.md: -------------------------------------------------------------------------------- 1 | # Special 2 | 3 | - bash 4 | ![](./special/out/special.bash.gif) 5 | - elvish 6 | ![](./special/out/special.elvish.gif) 7 | - fish 8 | ![](./special/out/special.fish.gif) 9 | - nushell 10 | ![](./special/out/special.nushell.gif) 11 | - oil 12 | ![](./special/out/special.oil.gif) 13 | - powershell 14 | ![](./special/out/special.powershell.gif) 15 | - xonsh 16 | ![](./special/out/special.xonsh.gif) 17 | - zsh 18 | ![](./special/out/special.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/special.bash.gif 4 | Output out/special.bash.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/special.elvish.gif 4 | Output out/special.elvish.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/special.fish.gif 4 | Output out/special.fish.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/special.nushell.gif 4 | Output out/special.nushell.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/special.oil.gif 4 | Output out/special.oil.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/special.powershell.gif 4 | Output out/special.powershell.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/special.xonsh.gif 4 | Output out/special.xonsh.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/special/special.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/special.zsh.gif 4 | Output out/special.zsh.ascii 5 | 6 | Type `example special p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote.md: -------------------------------------------------------------------------------- 1 | # Special Double Quote 2 | 3 | - bash 4 | ![](./specialDoubleQuote/out/specialDoubleQuote.bash.gif) 5 | - elvish 6 | ![](./specialDoubleQuote/out/specialDoubleQuote.elvish.gif) 7 | - fish 8 | ![](./specialDoubleQuote/out/specialDoubleQuote.fish.gif) 9 | - nushell 10 | ![](./specialDoubleQuote/out/specialDoubleQuote.nushell.gif) 11 | - oil 12 | ![](./specialDoubleQuote/out/specialDoubleQuote.oil.gif) 13 | - powershell 14 | ![](./specialDoubleQuote/out/specialDoubleQuote.powershell.gif) 15 | - xonsh 16 | ![](./specialDoubleQuote/out/specialDoubleQuote.xonsh.gif) 17 | - zsh 18 | ![](./specialDoubleQuote/out/specialDoubleQuote.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/out/specialDoubleQuote.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example special "p 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example special "p 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example special "p 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example special "p 34 | > 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | > example special "p 42 | > 43 | 44 | 45 | 46 | 47 | 48 | ──────────────────────────────────────────────────────────────────────────────── 49 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/out/specialDoubleQuote.powershell.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example special "p 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example special "p 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example special "p 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example special "p 34 | >> 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | > example special "p 42 | >> 43 | 44 | 45 | 46 | 47 | 48 | ──────────────────────────────────────────────────────────────────────────────── 49 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/specialDoubleQuote.bash.gif 4 | Output out/specialDoubleQuote.bash.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/specialDoubleQuote.elvish.gif 4 | Output out/specialDoubleQuote.elvish.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/specialDoubleQuote.fish.gif 4 | Output out/specialDoubleQuote.fish.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/specialDoubleQuote.nushell.gif 4 | Output out/specialDoubleQuote.nushell.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/specialDoubleQuote.oil.gif 4 | Output out/specialDoubleQuote.oil.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/specialDoubleQuote.powershell.gif 4 | Output out/specialDoubleQuote.powershell.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/specialDoubleQuote.xonsh.gif 4 | Output out/specialDoubleQuote.xonsh.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialDoubleQuote/specialDoubleQuote.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/specialDoubleQuote.zsh.gif 4 | Output out/specialDoubleQuote.zsh.ascii 5 | 6 | Type `example special "p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote.md: -------------------------------------------------------------------------------- 1 | # Special Single Quote 2 | 3 | - bash 4 | ![](./specialSingleQuote/out/specialSingleQuote.bash.gif) 5 | - elvish 6 | ![](./specialSingleQuote/out/specialSingleQuote.elvish.gif) 7 | - fish 8 | ![](./specialSingleQuote/out/specialSingleQuote.fish.gif) 9 | - nushell 10 | ![](./specialSingleQuote/out/specialSingleQuote.nushell.gif) 11 | - oil 12 | ![](./specialSingleQuote/out/specialSingleQuote.oil.gif) 13 | - powershell 14 | ![](./specialSingleQuote/out/specialSingleQuote.powershell.gif) 15 | - xonsh 16 | ![](./specialSingleQuote/out/specialSingleQuote.xonsh.gif) 17 | - zsh 18 | ![](./specialSingleQuote/out/specialSingleQuote.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/out/specialSingleQuote.oil.ascii: -------------------------------------------------------------------------------- 1 | > 2 | 3 | 4 | 5 | 6 | 7 | 8 | ──────────────────────────────────────────────────────────────────────────────── 9 | > example special 'p 10 | 11 | 12 | 13 | 14 | 15 | 16 | ──────────────────────────────────────────────────────────────────────────────── 17 | > example special 'p 18 | 19 | 20 | 21 | 22 | 23 | 24 | ──────────────────────────────────────────────────────────────────────────────── 25 | > example special 'p 26 | 27 | 28 | 29 | 30 | 31 | 32 | ──────────────────────────────────────────────────────────────────────────────── 33 | > example special 'p 34 | > 35 | 36 | 37 | 38 | 39 | 40 | ──────────────────────────────────────────────────────────────────────────────── 41 | > example special 'p 42 | > 43 | 44 | 45 | 46 | 47 | 48 | ──────────────────────────────────────────────────────────────────────────────── 49 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/specialSingleQuote.bash.gif 4 | Output out/specialSingleQuote.bash.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/specialSingleQuote.elvish.gif 4 | Output out/specialSingleQuote.elvish.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/specialSingleQuote.fish.gif 4 | Output out/specialSingleQuote.fish.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/specialSingleQuote.nushell.gif 4 | Output out/specialSingleQuote.nushell.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/specialSingleQuote.oil.gif 4 | Output out/specialSingleQuote.oil.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/specialSingleQuote.powershell.gif 4 | Output out/specialSingleQuote.powershell.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/specialSingleQuote.xonsh.gif 4 | Output out/specialSingleQuote.xonsh.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/specialSingleQuote/specialSingleQuote.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/specialSingleQuote.zsh.gif 4 | Output out/specialSingleQuote.zsh.ascii 5 | 6 | Type `example special 'p` Sleep 1 Tab@1 7 | Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word.md: -------------------------------------------------------------------------------- 1 | # Word 2 | 3 | - bash 4 | ![](./word/out/word.bash.gif) 5 | - elvish 6 | ![](./word/out/word.elvish.gif) 7 | - fish 8 | ![](./word/out/word.fish.gif) 9 | - nushell 10 | ![](./word/out/word.nushell.gif) 11 | - oil 12 | ![](./word/out/word.oil.gif) 13 | - powershell 14 | ![](./word/out/word.powershell.gif) 15 | - xonsh 16 | ![](./word/out/word.xonsh.gif) 17 | - zsh 18 | ![](./word/out/word.zsh.gif) 19 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.bash.tape: -------------------------------------------------------------------------------- 1 | Source ../bash.tape 2 | 3 | Output out/word.bash.gif 4 | Output out/word.bash.ascii 5 | 6 | Type "example " Sleep 1 Tab@1 2 7 | Type "q" # exit `more` 8 | Type "ac" Sleep 1 Tab@1 9 | 10 | Sleep 2 11 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.elvish.tape: -------------------------------------------------------------------------------- 1 | Source ../elvish.tape 2 | 3 | Output out/word.elvish.gif 4 | Output out/word.elvish.ascii 5 | 6 | Type "example " 7 | Sleep 1 Tab@1 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.fish.tape: -------------------------------------------------------------------------------- 1 | Source ../fish.tape 2 | 3 | Output out/word.fish.gif 4 | Output out/word.fish.ascii 5 | 6 | Type "example " Sleep 1 Tab@1 3 7 | 8 | Sleep 2 9 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.nushell.tape: -------------------------------------------------------------------------------- 1 | Source ../nushell.tape 2 | 3 | Output out/word.nushell.gif 4 | Output out/word.nushell.ascii 5 | 6 | Type "example " 7 | Sleep 1 Tab@1 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.oil.tape: -------------------------------------------------------------------------------- 1 | Source ../oil.tape 2 | 3 | Output out/word.oil.gif 4 | Output out/word.oil.ascii 5 | 6 | Type "example " Sleep 1 Tab@1 2 7 | Type "ac" Sleep 1 Tab@1 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.powershell.tape: -------------------------------------------------------------------------------- 1 | Source ../powershell.tape 2 | 3 | Output out/word.powershell.gif 4 | Output out/word.powershell.ascii 5 | 6 | Type "example " Sleep 1 Tab@1 7 | Type "ac" Sleep 1 Tab@1 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.xonsh.tape: -------------------------------------------------------------------------------- 1 | Source ../xonsh.tape 2 | 3 | Output out/word.xonsh.gif 4 | Output out/word.xonsh.ascii 5 | 6 | Type "example " 7 | Sleep 1 Tab@1 2 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/word/word.zsh.tape: -------------------------------------------------------------------------------- 1 | Source ../zsh.tape 2 | 3 | Output out/word.zsh.gif 4 | Output out/word.zsh.ascii 5 | 6 | Type "example " 7 | Sleep 1 Tab@1 2 Enter 8 | 9 | Sleep 2 10 | -------------------------------------------------------------------------------- /docs/src/development/vhs/xonsh.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "xonsh" 11 | 12 | Hide 13 | Type@10ms "exec($(example _carapace xonsh))" Enter 14 | Type@10ms "clear" Enter 15 | Show 16 | -------------------------------------------------------------------------------- /docs/src/development/vhs/zsh.tape: -------------------------------------------------------------------------------- 1 | Require example 2 | 3 | Set Theme "Snazzy" 4 | Set FontFamily "JetBrains Mono" 5 | Set FontSize 30 6 | Set Width 1400 7 | Set Height 300 8 | Set Padding 0 9 | 10 | Set Shell "zsh" 11 | 12 | Hide 13 | Type@10ms "autoload -U compinit && compinit" Enter 14 | Type@10ms "zstyle ':completion:*' menu select" Enter 15 | Type@10ms "zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'" Enter 16 | Type@10ms "source <(example _carapace zsh)" Enter 17 | Type@10ms "clear" Enter 18 | Show 19 | -------------------------------------------------------------------------------- /example-nonposix/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/carapace-sh/carapace/example-nonposix 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/carapace-sh/carapace v0.50.3-0.20240311124258-a5adf91d8b8f 7 | github.com/spf13/cobra v1.8.0 8 | github.com/spf13/pflag v1.0.5 9 | ) 10 | 11 | replace github.com/carapace-sh/carapace => ../ 12 | 13 | replace github.com/spf13/pflag => github.com/carapace-sh/carapace-pflag v1.0.0 14 | -------------------------------------------------------------------------------- /example-nonposix/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace/example-nonposix/cmd" 5 | ) 6 | 7 | func main() { 8 | _ = cmd.Execute() 9 | } 10 | -------------------------------------------------------------------------------- /example/cmd/_test/cmd-clink.lua: -------------------------------------------------------------------------------- 1 | local function example_completion(word, word_index, line_state, match_builder) 2 | local compline = string.sub(line_state:getline(), 1, line_state:getcursor()) 3 | 4 | local output = io.popen("env CARAPACE_COMPLINE=" .. string.format("%q", compline) .. " example _carapace cmd-clink \"\""):read("*a") 5 | for line in string.gmatch(output, '[^\r\n]+') do 6 | local matches = {} 7 | for m in string.gmatch(line, '[^\t]+') do 8 | table.insert(matches, m) 9 | end 10 | match_builder:addmatch({ 11 | match = matches[1], 12 | display = matches[2], 13 | description = matches[3], 14 | type = "word", 15 | appendchar = matches[4], 16 | suppressappend = false 17 | }) 18 | end 19 | return true 20 | end 21 | 22 | clink.argmatcher("example"):addarg({nowordbreakchars="'‵+;,", example_completion}):loop(1) 23 | 24 | -------------------------------------------------------------------------------- /example/cmd/_test/elvish.elv: -------------------------------------------------------------------------------- 1 | set edit:completion:arg-completer[example] = {|@arg| 2 | example _carapace elvish (all $arg) | from-json | each {|completion| 3 | put $completion[Messages] | all (one) | each {|m| 4 | edit:notify (styled "error: " red)$m 5 | } 6 | if (not-eq $completion[Usage] "") { 7 | edit:notify (styled "usage: " $completion[DescriptionStyle])$completion[Usage] 8 | } 9 | put $completion[Candidates] | all (one) | peach {|c| 10 | if (eq $c[Description] "") { 11 | edit:complex-candidate $c[Value] &display=(styled $c[Display] $c[Style]) &code-suffix=$c[CodeSuffix] 12 | } else { 13 | edit:complex-candidate $c[Value] &display=(styled $c[Display] $c[Style])(styled " " $completion[DescriptionStyle]" bg-default")(styled "("$c[Description]")" $completion[DescriptionStyle]) &code-suffix=$c[CodeSuffix] 14 | } 15 | } 16 | } 17 | } 18 | 19 | -------------------------------------------------------------------------------- /example/cmd/_test/fish.fish: -------------------------------------------------------------------------------- 1 | function _example_quote_suffix 2 | if not commandline -cp | xargs echo 2>/dev/null >/dev/null 3 | if commandline -cp | sed 's/$/"/'| xargs echo 2>/dev/null >/dev/null 4 | echo '"' 5 | else if commandline -cp | sed "s/\$/'/"| xargs echo 2>/dev/null >/dev/null 6 | echo "'" 7 | end 8 | else 9 | echo "" 10 | end 11 | end 12 | 13 | function _example_callback 14 | commandline -cp | sed "s/\$/"(_example_quote_suffix)"/" | sed "s/ \$/ ''/" | xargs example _carapace fish 15 | end 16 | 17 | complete -e 'example' 18 | complete -c 'example' -f -a '(_example_callback)' -r 19 | 20 | -------------------------------------------------------------------------------- /example/cmd/_test/nushell.nu: -------------------------------------------------------------------------------- 1 | let example_completer = {|spans| 2 | example _carapace nushell ...$spans | from json 3 | } 4 | -------------------------------------------------------------------------------- /example/cmd/_test/oil.sh: -------------------------------------------------------------------------------- 1 | #!/bin/osh 2 | _example_completion() { 3 | local compline="${COMP_LINE:0:${COMP_POINT}}" 4 | local IFS=$'\n' 5 | mapfile -t COMPREPLY < <(echo "$compline" | sed -e "s/ \$/ ''/" -e 's/"/\"/g' | xargs example _carapace oil) 6 | [[ "${COMPREPLY[@]}" == "" ]] && COMPREPLY=() # fix for mapfile creating a non-empty array from empty command output 7 | [[ ${COMPREPLY[0]} == *[/=@:.,$'\001'] ]] && compopt -o nospace 8 | # TODO use mapfile 9 | # shellcheck disable=SC2206 10 | [[ ${#COMPREPLY[@]} -eq 1 ]] && COMPREPLY=(${COMPREPLY[@]%$'\001'}) 11 | } 12 | 13 | complete -F _example_completion example 14 | 15 | -------------------------------------------------------------------------------- /example/cmd/_test_files/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/carapace-sh/carapace/example/_test_files 2 | 3 | go 1.16 4 | 5 | // fix go mod invalid char error: https://github.com/golang/go/issues/26672 6 | -------------------------------------------------------------------------------- /example/cmd/compat_sub.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var compat_subCmd = &cobra.Command{ 9 | Use: "sub", 10 | Short: "", 11 | Run: func(cmd *cobra.Command, args []string) {}, 12 | } 13 | 14 | func init() { 15 | carapace.Gen(compat_subCmd).Standalone() 16 | 17 | compatCmd.AddCommand(compat_subCmd) 18 | } 19 | -------------------------------------------------------------------------------- /example/cmd/flag_disabled.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var flag_disabledCmd = &cobra.Command{ 9 | Use: "disabled", 10 | Short: "flag parsing disabled", 11 | DisableFlagParsing: true, 12 | Run: func(cmd *cobra.Command, args []string) {}, 13 | } 14 | 15 | func init() { 16 | carapace.Gen(flag_disabledCmd).Standalone() 17 | 18 | flagCmd.AddCommand(flag_disabledCmd) 19 | 20 | carapace.Gen(flag_disabledCmd).PositionalCompletion( 21 | carapace.ActionValues("-p1", "positional1"), 22 | carapace.ActionValues("p2", "--positional2"), 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /example/cmd/flag_disabled_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/carapace-sh/carapace" 7 | "github.com/carapace-sh/carapace/pkg/sandbox" 8 | ) 9 | 10 | func TestFlagDisabled(t *testing.T) { 11 | sandbox.Package(t, "github.com/carapace-sh/carapace/example")(func(s *sandbox.Sandbox) { 12 | s.Run("flag", "disabled", ""). 13 | Expect(carapace.ActionValues( 14 | "-p1", 15 | "positional1", 16 | )) 17 | 18 | s.Run("flag", "disabled", "-p1", ""). 19 | Expect(carapace.ActionValues( 20 | "p2", 21 | "--positional2", 22 | )) 23 | 24 | s.Run("flag", "disabled", "-p1", "p2", ""). 25 | Expect(carapace.ActionValues()) 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /example/cmd/group.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var groupCmd = &cobra.Command{ 9 | Use: "group", 10 | Short: "group example", 11 | Run: func(cmd *cobra.Command, args []string) {}, 12 | } 13 | 14 | func init() { 15 | carapace.Gen(groupCmd).Standalone() 16 | 17 | rootCmd.AddCommand(groupCmd) 18 | 19 | groupCmd.AddGroup( 20 | &cobra.Group{ID: "main", Title: "Main Commands"}, 21 | &cobra.Group{ID: "setup", Title: "Setup Commands"}, 22 | ) 23 | 24 | run := func(cmd *cobra.Command, args []string) {} 25 | groupCmd.AddCommand( 26 | &cobra.Command{Use: "sub1", GroupID: "main", Run: run}, 27 | &cobra.Command{Use: "sub2", GroupID: "main", Run: run}, 28 | &cobra.Command{Use: "sub3", GroupID: "setup", Run: run}, 29 | &cobra.Command{Use: "sub4", GroupID: "setup", Run: run}, 30 | &cobra.Command{Use: "sub5", Run: run}, 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /example/cmd/help_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/carapace-sh/carapace" 7 | "github.com/carapace-sh/carapace/pkg/sandbox" 8 | "github.com/carapace-sh/carapace/pkg/style" 9 | ) 10 | 11 | func TestHelp(t *testing.T) { 12 | sandbox.Package(t, "github.com/carapace-sh/carapace/example")(func(s *sandbox.Sandbox) { 13 | s.Run("help", "a"). 14 | Expect(carapace.ActionValuesDescribed( 15 | "action", "action example", 16 | "alias", "action example", 17 | ).Style(style.Blue).Tag("main commands"). 18 | Usage("help [command]")) 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /example/cmd/special_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/carapace-sh/carapace" 7 | "github.com/carapace-sh/carapace/pkg/sandbox" 8 | ) 9 | 10 | func TestMutuallyExclusive(t *testing.T) { 11 | sandbox.Package(t, "github.com/carapace-sh/carapace/example")(func(s *sandbox.Sandbox) { 12 | s.Run("special", "--e"). 13 | Expect(carapace.ActionValuesDescribed( 14 | "--exclusive", "mutually exclusive flag", 15 | "--exclusiveRepeatable", "mutually exclusive repeatable flag", 16 | ).NoSpace('.'). 17 | Tag("longhand flags")) 18 | 19 | s.Run("special", "--exclusive", "--e"). 20 | Expect(carapace.ActionValues().NoSpace('.')) 21 | 22 | s.Run("special", "--exclusiveRepeatable", "--e"). 23 | Expect(carapace.ActionValuesDescribed( 24 | "--exclusiveRepeatable", "mutually exclusive repeatable flag", 25 | ).NoSpace('.'). 26 | Tag("longhand flags")) 27 | 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /example/cmd/subcommand.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var subcommandCmd = &cobra.Command{ 9 | Use: "subcommand", 10 | Short: "subcommand example", 11 | Run: func(cmd *cobra.Command, args []string) {}, 12 | } 13 | 14 | func init() { 15 | carapace.Gen(subcommandCmd).Standalone() 16 | 17 | subcommandCmd.AddGroup( 18 | &cobra.Group{ID: "group", Title: ""}, 19 | ) 20 | 21 | rootCmd.AddCommand(subcommandCmd) 22 | } 23 | -------------------------------------------------------------------------------- /example/cmd/subcommand_alias.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var subcommand_aliasCmd = &cobra.Command{ 9 | Use: "alias", 10 | Short: "subcommand with alias", 11 | Aliases: []string{"a1", "a2"}, 12 | Run: func(cmd *cobra.Command, args []string) {}, 13 | } 14 | 15 | func init() { 16 | carapace.Gen(subcommand_aliasCmd).Standalone() 17 | 18 | subcommandCmd.AddCommand(subcommand_aliasCmd) 19 | } 20 | -------------------------------------------------------------------------------- /example/cmd/subcommand_group.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var subcommand_groupCmd = &cobra.Command{ 9 | Use: "group", 10 | Short: "subcommand with group", 11 | GroupID: "group", 12 | Run: func(cmd *cobra.Command, args []string) {}, 13 | } 14 | 15 | func init() { 16 | carapace.Gen(subcommand_groupCmd).Standalone() 17 | 18 | subcommandCmd.AddCommand(subcommand_groupCmd) 19 | } 20 | -------------------------------------------------------------------------------- /example/cmd/subcommand_hidden.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var subcommand_hiddenCmd = &cobra.Command{ 9 | Use: "hidden", 10 | Short: "hidden subcommand", 11 | Hidden: true, 12 | Run: func(cmd *cobra.Command, args []string) {}, 13 | } 14 | 15 | func init() { 16 | carapace.Gen(subcommand_hiddenCmd).Standalone() 17 | 18 | subcommandCmd.AddCommand(subcommand_hiddenCmd) 19 | } 20 | -------------------------------------------------------------------------------- /example/cmd/subcommand_hidden_visible.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | var subcommand_hidden_visibleCmd = &cobra.Command{ 9 | Use: "visible", 10 | Short: "visible subcommand of a hidden command", 11 | Run: func(cmd *cobra.Command, args []string) {}, 12 | } 13 | 14 | func init() { 15 | carapace.Gen(subcommand_hidden_visibleCmd).Standalone() 16 | 17 | subcommand_hiddenCmd.AddCommand(subcommand_hidden_visibleCmd) 18 | } 19 | -------------------------------------------------------------------------------- /example/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/carapace-sh/carapace/example/cmd" 5 | ) 6 | 7 | func main() { 8 | _ = cmd.Execute() 9 | } 10 | -------------------------------------------------------------------------------- /experimental.go: -------------------------------------------------------------------------------- 1 | package carapace 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/carapace-sh/carapace/internal/config" 7 | "github.com/carapace-sh/carapace/internal/export" 8 | "github.com/carapace-sh/carapace/pkg/x" 9 | "github.com/spf13/cobra" 10 | ) 11 | 12 | func init() { 13 | x.ClearStorage = func() { 14 | storage = make(_storage) 15 | } 16 | 17 | x.Complete = func(cmd *cobra.Command, args ...string) (*export.Export, error) { 18 | initHelpCompletion(cmd) 19 | action, context := traverse(cmd, args[2:]) 20 | 21 | if err := config.Load(); err != nil { 22 | return nil, err 23 | } 24 | 25 | output := action.Invoke(context).value("export", "") 26 | var e export.Export 27 | if err := json.Unmarshal([]byte(output), &e); err != nil { 28 | return nil, err 29 | } 30 | return &e, nil 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/carapace-sh/carapace 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/carapace-sh/carapace-shlex v1.0.1 7 | github.com/spf13/cobra v1.9.1 8 | github.com/spf13/pflag v1.0.6 9 | gopkg.in/yaml.v3 v3.0.1 10 | ) 11 | -------------------------------------------------------------------------------- /go.work: -------------------------------------------------------------------------------- 1 | go 1.19 2 | 3 | use ( 4 | . 5 | ./example-nonposix 6 | ) 7 | -------------------------------------------------------------------------------- /go.work.sum: -------------------------------------------------------------------------------- 1 | github.com/carapace-sh/carapace-shlex v1.0.0/go.mod h1:lJ4ZsdxytE0wHJ8Ta9S7Qq0XpjgjU0mdfCqiI2FHx7M= 2 | github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= 3 | github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= 4 | -------------------------------------------------------------------------------- /internal/common/dash.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import "github.com/spf13/cobra" 4 | 5 | // IsDash checks if command contains a dash disabling flag parsing 6 | // 7 | // example action positional1 -- dash1 dash2 8 | func IsDash(cmd *cobra.Command) bool { 9 | return cmd.ArgsLenAtDash() != -1 10 | } 11 | -------------------------------------------------------------------------------- /internal/common/dash_test.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | func TestIsDash(t *testing.T) { 10 | cmd := &cobra.Command{} 11 | 12 | if IsDash(cmd) { 13 | t.Error("IsDash should be false") 14 | } 15 | 16 | _ = cmd.Flags().Parse([]string{"--", ""}) 17 | 18 | if !IsDash(cmd) { 19 | t.Error("IsDash should be true") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /internal/common/group.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/carapace-sh/carapace/pkg/style" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | type Group struct { 11 | Cmd *cobra.Command 12 | } 13 | 14 | func (g Group) Tag() string { 15 | id := strings.ToLower(g.Cmd.GroupID) 16 | switch { 17 | case strings.HasSuffix(id, " commands"): 18 | return id 19 | case id != "": 20 | return id + " commands" 21 | case len(g.Cmd.Parent().Groups()) != 0: 22 | return "other commands" 23 | default: 24 | return "commands" 25 | } 26 | } 27 | 28 | func (g Group) Style() string { 29 | if g.Cmd.Parent() == nil || g.Cmd.Parent().Groups() == nil { 30 | return style.Default 31 | } 32 | 33 | for index, group := range g.Cmd.Parent().Groups() { 34 | if group.ID == g.Cmd.GroupID { 35 | return style.Carapace.Highlight(index) 36 | } 37 | } 38 | return style.Default 39 | } 40 | -------------------------------------------------------------------------------- /internal/common/meta.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | type Meta struct { 4 | Messages Messages `json:"messages"` 5 | Nospace SuffixMatcher `json:"nospace"` 6 | Usage string `json:"usage"` 7 | } 8 | 9 | func (m *Meta) Merge(other Meta) { 10 | if other.Usage != "" { 11 | m.Usage = other.Usage 12 | } 13 | m.Nospace.Merge(other.Nospace) 14 | m.Messages.Merge(other.Messages) 15 | } 16 | -------------------------------------------------------------------------------- /internal/common/suffix_test.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import "testing" 4 | 5 | func TestSuffixMatcherAdd(t *testing.T) { 6 | sm := SuffixMatcher{""} 7 | 8 | sm.Add('*') 9 | if sm.string != "*" { 10 | t.Errorf(`should be "*" [was: "%v"]`, sm) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /internal/export/export.go: -------------------------------------------------------------------------------- 1 | package export 2 | 3 | import ( 4 | "encoding/json" 5 | "runtime/debug" 6 | "sort" 7 | 8 | "github.com/carapace-sh/carapace/internal/common" 9 | ) 10 | 11 | type Export struct { 12 | Version string `json:"version"` 13 | common.Meta 14 | Values common.RawValues `json:"values"` 15 | } 16 | 17 | func (e Export) MarshalJSON() ([]byte, error) { 18 | sort.Sort(common.ByValue(e.Values)) 19 | return json.Marshal(&struct { 20 | Version string `json:"version"` 21 | common.Meta 22 | Values common.RawValues `json:"values"` 23 | }{ 24 | Version: version(), 25 | Meta: e.Meta, 26 | Values: e.Values, 27 | }) 28 | } 29 | 30 | func version() string { 31 | if info, ok := debug.ReadBuildInfo(); ok { 32 | for _, dep := range info.Deps { 33 | if dep.Path == "github.com/carapace-sh/carapace" { 34 | return dep.Version 35 | } 36 | } 37 | } 38 | return "unknown" 39 | } 40 | -------------------------------------------------------------------------------- /internal/log/log.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "log" 7 | "os" 8 | 9 | "github.com/carapace-sh/carapace/internal/env" 10 | 11 | "github.com/carapace-sh/carapace/pkg/ps" 12 | "github.com/carapace-sh/carapace/pkg/uid" 13 | ) 14 | 15 | var LOG = log.New(io.Discard, "", log.Flags()) 16 | 17 | func init() { 18 | if !env.Log() { 19 | return 20 | } 21 | 22 | tmpdir := fmt.Sprintf("%v/carapace", os.TempDir()) 23 | if err := os.MkdirAll(tmpdir, os.ModePerm); err != nil { 24 | log.Fatal(err.Error()) 25 | } 26 | 27 | file := fmt.Sprintf("%v/%v.log", tmpdir, uid.Executable()) 28 | if logfileWriter, err := os.OpenFile(file, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0o666); err != nil { 29 | log.Fatal(err.Error()) 30 | } else { 31 | LOG = log.New(logfileWriter, ps.DetermineShell()+" ", log.Flags()|log.Lmsgprefix|log.Lmicroseconds) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /internal/man/man.go: -------------------------------------------------------------------------------- 1 | package man 2 | 3 | import ( 4 | "regexp" 5 | "strings" 6 | 7 | "github.com/carapace-sh/carapace/third_party/golang.org/x/sys/execabs" 8 | ) 9 | 10 | // Descriptions returns manpage descriptions for commands matching given prefix. 11 | func Descriptions(s string) (descriptions map[string]string) { 12 | descriptions = make(map[string]string) 13 | if strings.HasPrefix(s, ".") || strings.HasPrefix(s, "~") || strings.HasPrefix(s, "/") { 14 | return 15 | } 16 | 17 | output, err := execabs.Command("man", "--names-only", "-k", "^"+s).Output() 18 | if err != nil { 19 | return 20 | } 21 | 22 | r := regexp.MustCompile(`^(?P<name>[^ ]+) [^-]+- (?P<description>.*)$`) 23 | lines := strings.Split(string(output), "\n") 24 | for _, line := range lines { 25 | if matches := r.FindStringSubmatch(line); len(matches) > 2 { 26 | descriptions[matches[1]] = matches[2] 27 | } 28 | } 29 | return 30 | } 31 | -------------------------------------------------------------------------------- /internal/shell/bash_ble/action.go: -------------------------------------------------------------------------------- 1 | package bash_ble 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | 7 | "github.com/carapace-sh/carapace/internal/common" 8 | ) 9 | 10 | // ActionRawValues formats values for bash_ble. 11 | func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { 12 | vals := make([]string, len(values)) 13 | for index, val := range values { 14 | suffix := " " 15 | if meta.Nospace.Matches(val.Value) { 16 | suffix = "" 17 | } 18 | vals[index] = fmt.Sprintf("%v\t%v\x1c%v\x1c%v\x1c%v", val.Value, val.Display, "", suffix, val.TrimmedDescription()) 19 | } 20 | return strings.Join(vals, "\n") 21 | } 22 | -------------------------------------------------------------------------------- /internal/shell/cmd_clink/action.go: -------------------------------------------------------------------------------- 1 | package cmd_clink 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/carapace-sh/carapace/internal/common" 7 | ) 8 | 9 | var sanitizer = strings.NewReplacer( 10 | "\n", ``, 11 | "\r", ``, 12 | "\t", ``, 13 | ) 14 | 15 | func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { 16 | vals := make([]string, len(values)) 17 | for index, val := range values { 18 | appendChar := " " 19 | if meta.Nospace.Matches(val.Value) { 20 | appendChar = "" 21 | } 22 | vals[index] = strings.Join([]string{ 23 | sanitizer.Replace(val.Value), 24 | sanitizer.Replace(val.Display), 25 | sanitizer.Replace(val.TrimmedDescription()), 26 | appendChar, 27 | }, "\t") 28 | } 29 | return strings.Join(vals, "\n") 30 | } 31 | -------------------------------------------------------------------------------- /internal/shell/cmd_clink/patch.go: -------------------------------------------------------------------------------- 1 | package cmd_clink 2 | 3 | import ( 4 | "os" 5 | 6 | shlex "github.com/carapace-sh/carapace-shlex" 7 | ) 8 | 9 | func Patch(args []string) ([]string, error) { 10 | compline, ok := os.LookupEnv("CARAPACE_COMPLINE") 11 | if !ok { 12 | return args, nil 13 | } 14 | os.Unsetenv("CARAPACE_COMPLINE") 15 | 16 | if compline == "" { 17 | return args, nil 18 | } 19 | 20 | tokens, err := shlex.Split(compline) 21 | if err != nil { 22 | return nil, err 23 | } 24 | args = append(args[:1], tokens.CurrentPipeline().FilterRedirects().Words().Strings()...) 25 | return args, nil 26 | } 27 | -------------------------------------------------------------------------------- /internal/shell/export/action.go: -------------------------------------------------------------------------------- 1 | package export 2 | 3 | import ( 4 | "encoding/json" 5 | 6 | "github.com/carapace-sh/carapace/internal/common" 7 | "github.com/carapace-sh/carapace/internal/export" 8 | ) 9 | 10 | func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { 11 | m, _ := json.Marshal(export.Export{ 12 | Meta: meta, 13 | Values: values, 14 | }) 15 | return string(m) 16 | } 17 | -------------------------------------------------------------------------------- /internal/shell/fish/action.go: -------------------------------------------------------------------------------- 1 | package fish 2 | 3 | import ( 4 | "fmt" 5 | "github.com/carapace-sh/carapace/internal/common" 6 | "strings" 7 | ) 8 | 9 | var sanitizer = strings.NewReplacer( 10 | "\n", ``, 11 | "\r", ``, 12 | "\t", ``, 13 | ) 14 | 15 | // ActionRawValues formats values for fish. 16 | func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { 17 | vals := make([]string, len(values)) 18 | for index, val := range values { 19 | vals[index] = fmt.Sprintf("%v\t%v", sanitizer.Replace(val.Value), sanitizer.Replace(val.TrimmedDescription())) 20 | } 21 | return strings.Join(vals, "\n") 22 | } 23 | -------------------------------------------------------------------------------- /internal/shell/fish/snippet.go: -------------------------------------------------------------------------------- 1 | // Package fish provides fish completion 2 | package fish 3 | 4 | import ( 5 | "fmt" 6 | 7 | "github.com/carapace-sh/carapace/pkg/uid" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | // Snippet creates the fish completion script. 12 | func Snippet(cmd *cobra.Command) string { 13 | return fmt.Sprintf(`function _%v_quote_suffix 14 | if not commandline -cp | xargs echo 2>/dev/null >/dev/null 15 | if commandline -cp | sed 's/$/"/'| xargs echo 2>/dev/null >/dev/null 16 | echo '"' 17 | else if commandline -cp | sed "s/\$/'/"| xargs echo 2>/dev/null >/dev/null 18 | echo "'" 19 | end 20 | else 21 | echo "" 22 | end 23 | end 24 | 25 | function _%v_callback 26 | commandline -cp | sed "s/\$/"(_%v_quote_suffix)"/" | sed "s/ \$/ ''/" | xargs %v _carapace fish 27 | end 28 | 29 | complete -e '%v' 30 | complete -c '%v' -f -a '(_%v_callback)' -r 31 | `, cmd.Name(), cmd.Name(), cmd.Name(), uid.Executable(), cmd.Name(), cmd.Name(), cmd.Name()) 32 | } 33 | -------------------------------------------------------------------------------- /internal/shell/ion/snippet.go: -------------------------------------------------------------------------------- 1 | // Package ion provides Ion completion 2 | package ion 3 | 4 | import ( 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | // Snippet creates the ion completion script. 9 | func Snippet(cmd *cobra.Command) string { 10 | return "" 11 | } 12 | -------------------------------------------------------------------------------- /internal/shell/nushell/patch.go: -------------------------------------------------------------------------------- 1 | package nushell 2 | 3 | import ( 4 | "strings" 5 | 6 | shlex "github.com/carapace-sh/carapace-shlex" 7 | ) 8 | 9 | // Patch uses the lexer to parse and patch given arguments which 10 | // are currently passed unprocessed to the completion function. 11 | // 12 | // see https://www.nushell.sh/book/working_with_strings.html 13 | func Patch(args []string) []string { 14 | // TODO 15 | for index, arg := range args { 16 | if len(arg) == 0 { 17 | continue 18 | } 19 | 20 | switch arg[0] { 21 | case '"', "'"[0]: 22 | if tokens, err := shlex.Split(arg); err == nil { 23 | args[index] = tokens[0].Value 24 | } 25 | case '`': 26 | args[index] = strings.Trim(arg, "`") 27 | } 28 | } 29 | return args 30 | } 31 | -------------------------------------------------------------------------------- /internal/shell/nushell/snippet.go: -------------------------------------------------------------------------------- 1 | // Package nushell provides Nushell completion 2 | package nushell 3 | 4 | import ( 5 | "fmt" 6 | 7 | "github.com/carapace-sh/carapace/pkg/uid" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | // Snippet creates the nushell completion script. 12 | func Snippet(cmd *cobra.Command) string { 13 | return fmt.Sprintf(`let %v_completer = {|spans| 14 | %v _carapace nushell ...$spans | from json 15 | }`, cmd.Name(), uid.Executable()) 16 | } 17 | -------------------------------------------------------------------------------- /internal/shell/oil/action.go: -------------------------------------------------------------------------------- 1 | package oil 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | 7 | "github.com/carapace-sh/carapace/internal/common" 8 | ) 9 | 10 | var sanitizer = strings.NewReplacer( 11 | "\n", ``, 12 | "\t", ``, 13 | ) 14 | 15 | const nospaceIndicator = "\001" 16 | 17 | // ActionRawValues formats values for oil. 18 | func ActionRawValues(currentWord string, meta common.Meta, values common.RawValues) string { 19 | vals := make([]string, len(values)) 20 | for index, val := range values { 21 | if meta.Nospace.Matches(val.Value) { 22 | val.Value = val.Value + nospaceIndicator 23 | } 24 | 25 | if len(values) == 1 { 26 | formattedVal := sanitizer.Replace(val.Value) 27 | vals[index] = formattedVal 28 | } else { 29 | if val.Description != "" { 30 | vals[index] = fmt.Sprintf("%v (%v)", val.Value, sanitizer.Replace(val.TrimmedDescription())) 31 | } else { 32 | vals[index] = val.Value 33 | } 34 | } 35 | } 36 | return strings.Join(vals, "\n") 37 | } 38 | -------------------------------------------------------------------------------- /internal/shell/tcsh/snippet.go: -------------------------------------------------------------------------------- 1 | // Package tcsh provides tcsh completion 2 | package tcsh 3 | 4 | import ( 5 | "fmt" 6 | 7 | "github.com/carapace-sh/carapace/pkg/uid" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | // Snippet creates the tcsh completion script. 12 | func Snippet(cmd *cobra.Command) string { 13 | // TODO initial version - needs to handle open quotes 14 | return fmt.Sprintf("complete \"%v\" 'p@*@`echo \"$COMMAND_LINE'\"''\"'\" | xargs %v _carapace tcsh `@@' ;", cmd.Name(), uid.Executable()) 15 | } 16 | -------------------------------------------------------------------------------- /internal/shell/zsh/special.sh: -------------------------------------------------------------------------------- 1 | #compdef special 2 | function _special_completion { 3 | local -a subcmds 4 | subcmds=('p1 & < > '"'"' " { } $ # | ? ( ) ; [ ] * \\ $() ${} ` ``:description for c command' 'd:description for d command') 5 | _describe 'command' subcmds 6 | } 7 | compquote '' 2>/dev/null && _special_completion 8 | compdef _special_completion special 9 | -------------------------------------------------------------------------------- /log.go: -------------------------------------------------------------------------------- 1 | package carapace 2 | 3 | import "github.com/carapace-sh/carapace/internal/log" 4 | 5 | var LOG = log.LOG 6 | -------------------------------------------------------------------------------- /pkg/cache/cache.go: -------------------------------------------------------------------------------- 1 | package cache 2 | 3 | import ( 4 | "runtime" 5 | "time" 6 | 7 | "github.com/carapace-sh/carapace/internal/cache" 8 | "github.com/carapace-sh/carapace/pkg/cache/key" 9 | ) 10 | 11 | // Cache caches a function for given duration and keys. 12 | func Cache(timeout time.Duration, keys ...key.Key) func(f func() ([]byte, error)) ([]byte, error) { 13 | return func(f func() ([]byte, error)) ([]byte, error) { 14 | _, file, line, _ := runtime.Caller(1) 15 | cacheFile, err := cache.File(file, line, keys...) 16 | if err != nil { 17 | return nil, err 18 | } 19 | 20 | content, err := cache.Load(cacheFile, timeout) 21 | if err != nil { 22 | content, err = f() 23 | if err != nil { 24 | return nil, err 25 | } 26 | return content, cache.Write(cacheFile, content) 27 | } 28 | return content, nil 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /pkg/style/loglevel.go: -------------------------------------------------------------------------------- 1 | package style 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | // ForLogLevel returns the style for given log level. 8 | func ForLogLevel(s string, _ Context) string { 9 | return map[string]string{ 10 | "trace": Carapace.LogLevelTrace, 11 | "debug": Carapace.LogLevelDebug, 12 | "vdebug": Carapace.LogLevelDebug, 13 | "info": Carapace.LogLevelInfo, 14 | "warn": Carapace.LogLevelWarning, 15 | "warning": Carapace.LogLevelWarning, 16 | "err": Carapace.LogLevelError, 17 | "error": Carapace.LogLevelError, 18 | "crit": Carapace.LogLevelCritical, 19 | "critical": Carapace.LogLevelCritical, 20 | "fatal": Carapace.LogLevelFatal, 21 | "panic": Carapace.LogLevelFatal, 22 | }[strings.ToLower(s)] 23 | } 24 | -------------------------------------------------------------------------------- /pkg/traverse/git.go: -------------------------------------------------------------------------------- 1 | package traverse 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | // GitDir returns the location of the .git folder. 8 | func GitDir(tc Context) (string, error) { 9 | if dir, ok := tc.LookupEnv("GIT_DIR"); ok { 10 | return filepath.ToSlash(dir), nil 11 | } 12 | dir, err := GitWorkTree(tc) 13 | if err == nil { 14 | dir += "/.git" 15 | } 16 | return dir, err 17 | } 18 | 19 | // GitWorkTree returns the location of the root of the working directory for a non-bare repository. 20 | func GitWorkTree(tc Context) (string, error) { 21 | if dir, ok := tc.LookupEnv("GIT_WORK_TREE"); ok { 22 | return filepath.ToSlash(dir), nil 23 | } 24 | return Parent(".git")(tc) 25 | } 26 | -------------------------------------------------------------------------------- /pkg/traverse/golang.go: -------------------------------------------------------------------------------- 1 | package traverse 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | "strings" 7 | ) 8 | 9 | // GoBinDir TODO experimental 10 | func GoBinDir(tc Context) (dir string, err error) { 11 | if path, ok := tc.LookupEnv("GOBIN"); ok { 12 | return filepath.ToSlash(path), nil 13 | } 14 | 15 | if path, ok := tc.LookupEnv("GOPATH"); ok { 16 | dir = strings.Split(path, string(os.PathListSeparator))[0] 17 | } 18 | 19 | if dir == "" { 20 | if dir, err = UserHomeDir(tc); err != nil { 21 | return "", err 22 | } 23 | dir = filepath.Join(dir, "go") 24 | } 25 | 26 | return filepath.ToSlash(filepath.Join(dir, "bin")), nil 27 | } 28 | -------------------------------------------------------------------------------- /pkg/traverse/os.go: -------------------------------------------------------------------------------- 1 | package traverse 2 | 3 | import "os" 4 | 5 | // UserHomeDir returns the current user's home directory. 6 | func UserHomeDir(tc Context) (string, error) { 7 | return os.UserHomeDir() 8 | } 9 | 10 | // UserCacheDir returns the default root directory to use for user-specific cached data. 11 | func UserCacheDir(tc Context) (string, error) { 12 | return os.UserCacheDir() 13 | } 14 | 15 | // UserConfigDir returns the default root directory to use for user-specific configuration data. 16 | func UserConfigDir(tc Context) (string, error) { 17 | return os.UserConfigDir() 18 | } 19 | 20 | // TempDir returns the default directory to use for temporary files. 21 | func TempDir(tc Context) (string, error) { 22 | return os.TempDir(), nil 23 | } 24 | -------------------------------------------------------------------------------- /pkg/traverse/xdg.go: -------------------------------------------------------------------------------- 1 | package traverse 2 | 3 | import ( 4 | "path/filepath" 5 | ) 6 | 7 | // XdgCacheHome returns the cache directory (fallback to UserCacheDir). 8 | func XdgCacheHome(tc Context) (dir string, err error) { 9 | if dir = tc.Getenv("XDG_CACHE_HOME"); dir == "" { 10 | dir, err = UserCacheDir(tc) 11 | } 12 | dir = filepath.ToSlash(dir) 13 | return 14 | } 15 | 16 | // XdgConfigHome returns the home directory (fallback to UserConfigDir). 17 | func XdgConfigHome(tc Context) (dir string, err error) { 18 | if dir = tc.Getenv("XDG_CONFIG_HOME"); dir == "" { 19 | dir, err = UserConfigDir(tc) 20 | } 21 | dir = filepath.ToSlash(dir) 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /pkg/uid/path.go: -------------------------------------------------------------------------------- 1 | package uid 2 | 3 | import ( 4 | "net/url" 5 | "strings" 6 | ) 7 | 8 | // PathEscape is like url.PathEscape but keeps '/'. 9 | func PathEscape(s string) string { 10 | segments := strings.Split(s, "/") 11 | for index, segment := range segments { 12 | segments[index] = url.PathEscape(segment) 13 | } 14 | return strings.Join(segments, "/") 15 | } 16 | -------------------------------------------------------------------------------- /pkg/uid/uid_test.go: -------------------------------------------------------------------------------- 1 | package uid 2 | 3 | import ( 4 | "strings" 5 | "testing" 6 | 7 | "github.com/carapace-sh/carapace/internal/assert" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func TestUidCommand(t *testing.T) { 12 | root := &cobra.Command{ 13 | Use: "root", 14 | } 15 | sub1 := &cobra.Command{ 16 | Use: "sub1", 17 | } 18 | sub2 := &cobra.Command{ 19 | Use: "sub2", 20 | } 21 | 22 | root.AddCommand(sub1) 23 | sub1.AddCommand(sub2) 24 | 25 | assert.Equal(t, "cmd://root", Command(root).String()) 26 | assert.Equal(t, "cmd://root/sub1", Command(sub1).String()) 27 | assert.Equal(t, "cmd://root/sub1/sub2", Command(sub2).String()) 28 | } 29 | 30 | func TestExecutable(t *testing.T) { 31 | if !strings.HasSuffix(Executable(), ".test") { 32 | t.Fail() 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /pkg/x/x.go: -------------------------------------------------------------------------------- 1 | // Package x contains experimental functions 2 | package x 3 | 4 | import ( 5 | "github.com/carapace-sh/carapace/internal/export" 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | var ClearStorage func() 10 | var Complete func(cmd *cobra.Command, args ...string) (*export.Export, error) 11 | -------------------------------------------------------------------------------- /third_party/github.com/acarl005/stripansi/stripansi.go: -------------------------------------------------------------------------------- 1 | package stripansi 2 | 3 | import ( 4 | "regexp" 5 | ) 6 | 7 | const ansi = "[\u001B\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))" 8 | 9 | var re = regexp.MustCompile(ansi) 10 | 11 | func Strip(str string) string { 12 | return re.ReplaceAllString(str, "") 13 | } 14 | -------------------------------------------------------------------------------- /third_party/github.com/drone/envsubst/eval.go: -------------------------------------------------------------------------------- 1 | package envsubst 2 | 3 | import "os" 4 | 5 | // Eval replaces ${var} in the string based on the mapping function. 6 | func Eval(s string, mapping func(string) string) (string, error) { 7 | t, err := Parse(s) 8 | if err != nil { 9 | return s, err 10 | } 11 | return t.Execute(mapping) 12 | } 13 | 14 | // EvalEnv replaces ${var} in the string according to the values of the 15 | // current environment variables. References to undefined variables are 16 | // replaced by the empty string. 17 | func EvalEnv(s string) (string, error) { 18 | return Eval(s, os.Getenv) 19 | } 20 | -------------------------------------------------------------------------------- /third_party/github.com/drone/envsubst/parse/scan_test.go: -------------------------------------------------------------------------------- 1 | package parse 2 | -------------------------------------------------------------------------------- /third_party/github.com/elves/elvish/pkg/cli/lscolors/stat_notsolaris.go: -------------------------------------------------------------------------------- 1 | //go:build !solaris 2 | // +build !solaris 3 | 4 | package lscolors 5 | 6 | import "os" 7 | 8 | func isDoor(info os.FileInfo) bool { 9 | // Doors are only supported on Solaris. 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /third_party/github.com/elves/elvish/pkg/cli/lscolors/stat_solaris.go: -------------------------------------------------------------------------------- 1 | package lscolors 2 | 3 | import ( 4 | "os" 5 | "syscall" 6 | ) 7 | 8 | // Taken from Illumos header file. 9 | const sIFDOOR = 0xD000 10 | 11 | func isDoor(info os.FileInfo) bool { 12 | return info.Sys().(*syscall.Stat_t).Mode&sIFDOOR == sIFDOOR 13 | } 14 | -------------------------------------------------------------------------------- /third_party/github.com/elves/elvish/pkg/cli/lscolors/stat_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows && !plan9 2 | // +build !windows,!plan9 3 | 4 | package lscolors 5 | 6 | import ( 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func isMultiHardlink(info os.FileInfo) bool { 12 | return info.Sys().(*syscall.Stat_t).Nlink > 1 13 | } 14 | -------------------------------------------------------------------------------- /third_party/github.com/elves/elvish/pkg/cli/lscolors/stat_windows.go: -------------------------------------------------------------------------------- 1 | package lscolors 2 | 3 | import "os" 4 | 5 | func isMultiHardlink(info os.FileInfo) bool { 6 | // Windows supports hardlinks, but it is not exposed directly. We omit the 7 | // implementation for now. 8 | // TODO: Maybe implement it? 9 | return false 10 | } 11 | -------------------------------------------------------------------------------- /third_party/github.com/elves/elvish/pkg/cli/lscolors/util.go: -------------------------------------------------------------------------------- 1 | package lscolors 2 | 3 | import "os" 4 | 5 | // IsExecutable returns whether the FileInfo refers to an executable file. 6 | // 7 | // This is determined by permission bits on UNIX, and by file name on Windows. 8 | func IsExecutable(stat os.FileInfo) bool { 9 | return isExecutable(stat) 10 | } 11 | 12 | func isExecutable(stat os.FileInfo) bool { 13 | return !stat.IsDir() && stat.Mode()&0o111 != 0 14 | } 15 | -------------------------------------------------------------------------------- /third_party/github.com/hexops/gotextdiff/span/token112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.12 6 | // +build go1.12 7 | 8 | package span 9 | 10 | import ( 11 | "go/token" 12 | ) 13 | 14 | // TODO(rstambler): Delete this file when we no longer support Go 1.11. 15 | func lineStart(f *token.File, line int) token.Pos { 16 | return f.LineStart(line) 17 | } 18 | -------------------------------------------------------------------------------- /third_party/github.com/mitchellh/go-ps/process_darwin_test.go: -------------------------------------------------------------------------------- 1 | //go:build darwin 2 | // +build darwin 3 | 4 | package ps 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestDarwinProcess_impl(t *testing.T) { 11 | var _ Process = new(DarwinProcess) 12 | } 13 | -------------------------------------------------------------------------------- /third_party/github.com/mitchellh/go-ps/process_linux.go: -------------------------------------------------------------------------------- 1 | //go:build linux 2 | // +build linux 3 | 4 | package ps 5 | 6 | import ( 7 | "fmt" 8 | "os" 9 | "strings" 10 | ) 11 | 12 | // Refresh reloads all the data associated with this process. 13 | func (p *UnixProcess) Refresh() error { 14 | statPath := fmt.Sprintf("/proc/%d/stat", p.pid) 15 | dataBytes, err := os.ReadFile(statPath) 16 | if err != nil { 17 | return err 18 | } 19 | 20 | // First, parse out the image name 21 | data := string(dataBytes) 22 | binStart := strings.IndexRune(data, '(') + 1 23 | binEnd := strings.IndexRune(data[binStart:], ')') 24 | p.binary = data[binStart : binStart+binEnd] 25 | 26 | // Move past the image name and start parsing the rest 27 | data = data[binStart+binEnd+2:] 28 | _, err = fmt.Sscanf(data, 29 | "%c %d %d %d", 30 | &p.state, 31 | &p.ppid, 32 | &p.pgrp, 33 | &p.sid) 34 | 35 | return err 36 | } 37 | -------------------------------------------------------------------------------- /third_party/github.com/mitchellh/go-ps/process_test.go: -------------------------------------------------------------------------------- 1 | package ps 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | ) 7 | 8 | func TestFindProcess(t *testing.T) { 9 | p, err := FindProcess(os.Getpid()) 10 | if err != nil { 11 | t.Fatalf("err: %s", err) 12 | } 13 | if p == nil { 14 | t.Fatal("should have process") 15 | } 16 | 17 | if p.Pid() != os.Getpid() { 18 | t.Fatalf("bad: %#v", p.Pid()) 19 | } 20 | } 21 | 22 | func TestProcesses(t *testing.T) { 23 | // This test works because there will always be SOME processes 24 | // running. 25 | p, err := Processes() 26 | if err != nil { 27 | t.Fatalf("err: %s", err) 28 | } 29 | 30 | if len(p) <= 0 { 31 | t.Fatal("should have processes") 32 | } 33 | 34 | found := false 35 | for _, p1 := range p { 36 | if p1.Executable() == "go" || p1.Executable() == "go.exe" { 37 | found = true 38 | break 39 | } 40 | } 41 | 42 | if !found { 43 | t.Fatal("should have Go") 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /third_party/github.com/mitchellh/go-ps/process_unix_test.go: -------------------------------------------------------------------------------- 1 | //go:build linux || solaris 2 | // +build linux solaris 3 | 4 | package ps 5 | 6 | import ( 7 | "testing" 8 | ) 9 | 10 | func TestUnixProcess_impl(t *testing.T) { 11 | var _ Process = new(UnixProcess) 12 | } 13 | --------------------------------------------------------------------------------