-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1151 from rsteube/tmux-choosebuffer
tmux: choosebuffer
- Loading branch information
Showing
3 changed files
with
38 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/tmux" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var chooseBufferCmd = &cobra.Command{ | ||
Use: "choose-buffer", | ||
Short: "put a pane into buffer choice mode", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(chooseBufferCmd).Standalone() | ||
|
||
chooseBufferCmd.Flags().StringS("F", "F", "", "specify format for each list item") | ||
chooseBufferCmd.Flags().StringS("K", "K", "", "specify format for each shortcut key") | ||
chooseBufferCmd.Flags().BoolS("N", "N", false, "start without the preview") | ||
chooseBufferCmd.Flags().StringS("O", "O", "", "initial sort order") | ||
chooseBufferCmd.Flags().BoolS("Z", "Z", false, "zoom the pane") | ||
chooseBufferCmd.Flags().StringS("f", "f", "", "filter items") | ||
chooseBufferCmd.Flags().BoolS("r", "r", false, "reverse sort order") | ||
chooseBufferCmd.Flags().StringS("t", "t", "", "specify target window") | ||
rootCmd.AddCommand(chooseBufferCmd) | ||
|
||
// TODO formats | ||
carapace.Gen(chooseBufferCmd).FlagCompletion(carapace.ActionMap{ | ||
"O": carapace.ActionValues("time", "name", "size"), | ||
"t": tmux.ActionWindows(), | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters