From dc5f94e1d784a223b5058f75d416929565df5e24 Mon Sep 17 00:00:00 2001
From: khaneliman
Each set of channels are written to
-$XDG_CONFIG_HOME/television/NAME-channels.toml
See https://github.com/alexpasmantier/television/blob/main/docs/channels.md
+$XDG_CONFIG_HOME/television/cable/NAME.toml
See https://alexpasmantier.github.io/television/docs/Users/channels for options
Type: @@ -67210,22 +67210,38 @@ attribute set of (TOML value)
{ }
Example:
{
- my-custom = {
- cable_channel = [
- {
- name = "git-log";
- source_command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\"";
- preview_command = "git show -p --stat --pretty=fuller --color=always {0}";
- }
- {
- name = "git-log";
- source_command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\"";
- preview_command = "git show -p --stat --pretty=fuller --color=always {0}";
- }
- ];
+ git-diff = {
+ metadata = {
+ description = "A channel to select files from git diff commands";
+ name = "git-diff";
+ requirements = [
+ "git"
+ ];
+ };
+ preview = {
+ command = "git diff HEAD --color=always -- '{}'";
+ };
+ source = {
+ command = "git diff --name-only HEAD";
+ };
+ };
+ git-log = {
+ metadata = {
+ description = "A channel to select from git log entries";
+ name = "git-log";
+ requirements = [
+ "git"
+ ];
+ };
+ preview = {
+ command = "git show -p --stat --pretty=fuller --color=always '{0}'";
+ };
+ source = {
+ command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\"";
+ output = "{split: :0}";
+ };
};
}
-
Declared by: