3

Carapace: A multi-shell completion library and binary

 3 weeks ago
source link: https://carapace.sh/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Carapace

A multi-shell completion library and binary.

                                                                                                            carapace-bin on ๎‚  master [!] via ๐Ÿน v1.19.2                                                                  esh โฏ gh issue list --repo rsteube/carapace --label bash                                                     COMPLETING argument                                                                                        bash                                                        spec                                            bash-ble                                                    tcsh                                            bug (Something isn't working)                               windows                                         dependencies (Pull requests that update a dependency file)  wontfix (This will not be worked on)            documentation (Improvements or additions to documentation)  xonsh                                           duplicate (This issue or pull request already exists)       zsh                                             elvish                                                                                                      enhancement (New feature or request)                                                                        fish                                                                                                        good first issue (Good for newcomers)                                                                       help wanted (Extra attention is needed)                                                                     invalid (This doesn't seem right)                                                                           ion                                                                                                         linux                                                                                                       nushell                                                                                                     oil                                                                                                         osx                                                                                                         powershell                                                                                                  question (Further information is requested)                                                                                                                                                                             
00:00

Install and Setup

Vibrant

Highlight in different Styles.

~                                                                               esh โฏ carapace --style 'carapace.Description=bg-black'                           COMPLETING argument                                                            bg-black           bg-bright-white   bg-yellow     bright-green    green        bg-blue            bg-bright-yellow  black         bright-magenta  inverse      bg-bright-black    bg-color          blink         bright-red      italic       bg-bright-blue     bg-cyan           blue          bright-white    magenta      bg-bright-cyan     bg-green          bold          bright-yellow   red          bg-bright-green    bg-magenta        bright-black  color           underlined   bg-bright-magenta  bg-red            bright-blue   cyan            white        bg-bright-red      bg-white          bright-cyan   dim             yellow                                                                                       
00:00

Group by Tags.

zsh โฏ git sh                                                                    Completing main commands                                                        shortlog  -- Summarize 'git log' output                                         show      -- show branches and their commits                                    Completing interrogator commands                                                show-branch  -- Show branches and their commits                                 Completing low-level helper commands                                            sh-i18n   -- Git's i18n setup code for shell scripts                            sh-setup  -- Common Git shell script setup code                                 Completing low-level interrogator commands                                      show-index  -- Show packed archive index                                        show-ref    -- List references in a local repository                            
00:00

Give feedback with Messages.

~                                                                               zsh โฏ docker image inspect                                                      Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?                                                               inspect [OPTIONS] IMAGE [IMAGE...]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
00:00

Fast

Export in milliseconds.

ile if it is inaccessible","tag":"flags"},{"value":"--sleep-interval","display":"--sleep-interval","description":"with -f, sleep for approximately N seconds","style":"blue","tag":"flags"},{"value":"--verbose","display":"--verbose","description":"always output headers giving file names","tag":"flags"},{"value":"--version","display":"--version","description":"output version information and exit","tag":"flags"},{"value":"--zero-terminated","display":"--zero-terminated","description":"line delimiter is NUL, not newline","tag":"flags"}]}                      ~                                                                               esh โฏ time { carapace tail export tail -- >/dev/null }                          9.945354ms                                                                      ~                                                                               esh โฏ                                                                           
00:00

Cache slow completions.

~                                                                               esh โฏ time { carapace winetricks export winetricks "" > /dev/null }             3.125745498s                                                                    ~                                                                               esh โฏ time { carapace winetricks export winetricks "" > /dev/null }             15.955457ms                                                                     ~                                                                               esh โฏ                                                                                                                                                                                                                                                                                                                                                                                                           
00:00

Invoke concurrent Batch.

  31   โ”‚ 2023/12/27 17:27:32.520620 elvish executing "/usr/bin/git stash list"    32   โ”‚ 2023/12/27 17:27:32.520727 elvish executing "/usr/bin/git branch --remo       โ”‚ te --format %(refname:short)\n%(subject)"                                33   โ”‚ 2023/12/27 17:27:32.520738 elvish executing "/usr/bin/git branch --form       โ”‚ at %(refname:short)\n%(subject)"                                         34   โ”‚ 2023/12/27 17:27:32.520800 elvish executing "/usr/bin/git log --no-note       โ”‚ s --first-parent --pretty=tformat:%h   %<(64,trunc)%s --max-count 1"     35   โ”‚ 2023/12/27 17:27:32.520850 elvish executing "/usr/bin/git tag --format        โ”‚ %(refname)\n%(subject)"                                                  36   โ”‚ {"Usage":"","Messages":[],"DescriptionStyle":"dim","Candidates":[{"Valu       โ”‚ e":"HEAD~","Display":"HEAD~","Description":"","CodeSuffix":"","Style":":                                                                               
00:00

Complex

Add Plugins and change Workdir.

carapace-bin on ๎‚  master via ๐Ÿน v1.21.5                                          esh โฏ git -C ../carapace show HEAD~                                              COMPLETING argument                                                            HEAD~                                                     actionexeccommand-erroabsolute-path-backup (tmp)                                actionsubcommands-publaction-chdirf (added Action.ChdirF)                       add-actionmultipartsn action-filter (action: added FilterArgs and FilterParts)  add-actionpositional (action-filterf (Action: added FilterF)                    add-config (added confaction-prefix (action: prefix - fix value handling)       add-nargs (support naraction-typo (actions: fix typo)                           add-test-file (added tactionFlags-switch (actionflags: use switch)              added-keywords (style:   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
00:00

Embed continuously.

~                                                                               esh โฏ sudo --group wheel gum spin --spinner.background 1                         COMPLETING argument                                                            0 (Black (SYSTEM))    105 (LightSlateBlue)   112 (Chartreuse2)      12 (Blue (SY1 (Maroon (SYSTEM))   106 (Yellow4)          113 (DarkOliveGreen3)  120 (LightGr10 (Lime (SYSTEM))    107 (DarkOliveGreen3)  114 (PaleGreen3)       121 (PaleGre100 (Yellow4)         108 (DarkSeaGreen)     115 (DarkSeaGreen3)    122 (Aquamar101 (Wheat4)          109 (LightSkyBlue3)    116 (DarkSlateGray3)   123 (DarkSla102 (Grey53)          11 (Yellow (SYSTEM))   117 (SkyBlue1)         124 (Red3)  103 (LightSlateGrey)  110 (LightSkyBlue3)    118 (Chartreuse1)      125 (DeepPin104 (MediumPurple)    111 (SkyBlue2)         119 (LightGreen)       126 (MediumV          โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
00:00

Complete as MultiParts.

carapace on ๎‚  master via ๐Ÿน v1.21.5                                              esh โฏ git show action-filter~26~35:.devcontainer/                                COMPLETING argument                                                            .devcontainer/   README.md         compat.go               docs/              in.dockerfile/     action.go         compat_test.go          example-nonposix/  in.dockerignore    action_test.go    complete.go             example/           in.github/         batch.go          context.go              go.mod             lo.gitignore       batch_test.go     context_test.go         go.sum             pk.goreleaser.yml  carapace.go       defaultActions.go       go.work            stDockerfile       carapace_test.go  defaultActions_test.go  go.work.sum        stLICENSE.txt      command.go        docker-compose.yml      internal/          th                                                                              โ”โ”
00:00

Versatile

Write custom Specs.

    1  name: custom                                                                 2  flags:                                                                       3    --bool: bool flag                                                          4    -s, --string=: string flag                                                 5  completion:                                                                  6    flag                                                                       ~                                                                                                                                                                                                                                                                                                                            INS   .config/carapace/specs/custom.yaml [+]                        1 sel  6:7                                                                                 
00:00

Leverage existing Macros.

~                                                                               esh โฏ carapace --macro ps.KillSignals ABRT                                       COMPLETING argument                                                            ABRT (Abnormal termination)                    INT (Interrupt from keyboard)    ALRM (Virtual alarm clock)                     KILL (Kill, unblockable)         BUS (BUS error)                                PIPE (Broken pipe)               CHLD (Child status has changed)                POLL (Pollable event occurred)   CONT (Continue stopped process)                PROF (Profiling alarm clock timerFPE (Floating-point exception)                 PWR (Power failure restart)      HUP (Hangup detected on controlling terminal)  QUIT (Quit from keyboard)        ILL (Illegal instruction)                      SEGV (Segmentation violation)                                             โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
00:00

Bridge other frameworks.

~                                                                               esh โฏ carapace-bridge argcomplete                                                COMPLETING argument                                                            argcomplete (bridges https://github.com/kislyuk/argcomplete)   fish (bridges combash (bridges completions registered in bash)                  help (Help about carapace (bridges https://github.com/rsteube/carapace)         inshellisense (brcarapace-bin (bridges completions registered in carapace-bin)  kingpin (bridges clap (bridges https://github.com/clap-rs/clap)                 powershell (bridgclick (bridges https://github.com/pallets/click)               urfavecli (bridgecobra (bridges https://github.com/spf13/cobra)                 yargs (bridges htcomplete (bridges https://github.com/posener/complete)         zsh (bridges comp                                                                                
00:00

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK