Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
konoui committed Mar 28, 2023
1 parent bffca3b commit 84b7c1f
Show file tree
Hide file tree
Showing 10 changed files with 127 additions and 101 deletions.
9 changes: 9 additions & 0 deletions cmd/testdata/output-archey-with-pflag-with-fuzzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"autocomplete": "-p linux archey",
"valid": false
},
{
"title": "archivemount",
"subtitle": "Platforms: [linux]",
"icon": {
"path": "candidate.png"
},
"autocomplete": "-p linux archivemount",
"valid": false
},
{
"title": "git archive",
"subtitle": "Platforms: [common]",
Expand Down
9 changes: 9 additions & 0 deletions cmd/testdata/output-archey-without-pflag-fuzzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"autocomplete": "archey",
"valid": false
},
{
"title": "archivemount",
"subtitle": "Platforms: [linux]",
"icon": {
"path": "candidate.png"
},
"autocomplete": "-p linux archivemount",
"valid": false
},
{
"title": "git archive",
"subtitle": "Platforms: [common]",
Expand Down
9 changes: 9 additions & 0 deletions cmd/testdata/output-git-checkout-with-fuzzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
},
"autocomplete": "git cherry pick",
"valid": false
},
{
"title": "grub script check",
"subtitle": "Platforms: [linux]",
"icon": {
"path": "candidate.png"
},
"autocomplete": "-p linux grub script check",
"valid": false
}
]
}
8 changes: 4 additions & 4 deletions cmd/testdata/output-git-checkout.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
"arg": "git checkout ."
},
{
"title": "git checkout {filename}",
"title": "git checkout {path/to/file}",
"subtitle": "Discard unstaged changes to a given file:",
"arg": "git checkout {filename}"
"arg": "git checkout {path/to/file}"
},
{
"title": "git checkout {branch_name} -- {filename}",
"title": "git checkout {branch_name} -- {path/to/file}",
"subtitle": "Replace a file in the current directory with the version of it committed in a given branch:",
"arg": "git checkout {branch_name} -- {filename}"
"arg": "git checkout {branch_name} -- {path/to/file}"
}
]
}
32 changes: 16 additions & 16 deletions cmd/testdata/output-tar-with-ctrl-mod-key.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@
}
},
{
"title": "tar cf {target.tar} {file1} {file2} {file3}",
"title": "tar cf {path/to/target.tar} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate an archive and write it to a [f]ile:",
"arg": "tar cf {target.tar} {file1} {file2} {file3}"
"arg": "tar cf {path/to/target.tar} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar czf {target.tar.gz} {file1} {file2} {file3}",
"title": "tar czf {path/to/target.tar.gz} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate a g[z]ipped archive and write it to a [f]ile:",
"arg": "tar czf {target.tar.gz} {file1} {file2} {file3}"
"arg": "tar czf {path/to/target.tar.gz} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar czf {target.tar.gz} --directory={path/to/directory} .",
"title": "tar czf {path/to/target.tar.gz} --directory={path/to/directory} .",
"subtitle": "[c]reate a g[z]ipped archive from a directory using relative paths:",
"arg": "tar czf {target.tar.gz} --directory={path/to/directory} ."
"arg": "tar czf {path/to/target.tar.gz} --directory={path/to/directory} ."
},
{
"title": "tar xvf {source.tar[.gz|.bz2|.xz]}",
"title": "tar xvf {path/to/source.tar[.gz|.bz2|.xz]}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:",
"arg": "tar xvf {source.tar[.gz|.bz2|.xz]}"
"arg": "tar xvf {path/to/source.tar[.gz|.bz2|.xz]}"
},
{
"title": "tar xf {source.tar[.gz|.bz2|.xz]} --directory={directory}",
"title": "tar xf {path/to/source.tar[.gz|.bz2|.xz]} --directory={path/to/directory}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the target directory:",
"arg": "tar xf {source.tar[.gz|.bz2|.xz]} --directory={directory}"
"arg": "tar xf {path/to/source.tar[.gz|.bz2|.xz]} --directory={path/to/directory}"
},
{
"title": "tar caf {target.tar.xz} {file1} {file2} {file3}",
"title": "tar caf {path/to/target.tar.xz} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:",
"arg": "tar caf {target.tar.xz} {file1} {file2} {file3}"
"arg": "tar caf {path/to/target.tar.xz} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar tvf {source.tar}",
"title": "tar tvf {path/to/source.tar}",
"subtitle": "Lis[t] the contents of a tar [f]ile [v]erbosely:",
"arg": "tar tvf {source.tar}"
"arg": "tar tvf {path/to/source.tar}"
},
{
"title": "tar xf {source.tar} --wildcards \"{*.html}\"",
"title": "tar xf {path/to/source.tar} --wildcards \"{*.html}\"",
"subtitle": "E[x]tract files matching a pattern from an archive [f]ile:",
"arg": "tar xf {source.tar} --wildcards \"{*.html}\""
"arg": "tar xf {path/to/source.tar} --wildcards \"{*.html}\""
}
]
}
32 changes: 16 additions & 16 deletions cmd/testdata/output-tar-with-original-format.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@
}
},
{
"title": "tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}",
"title": "tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}",
"subtitle": "[c]reate an archive and write it to a [f]ile:",
"arg": "tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}"
"arg": "tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}"
},
{
"title": "tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}",
"title": "tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}",
"subtitle": "[c]reate a g[z]ipped archive and write it to a [f]ile:",
"arg": "tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}"
"arg": "tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}"
},
{
"title": "tar czf {{target.tar.gz}} --directory={{path/to/directory}} .",
"title": "tar czf {{path/to/target.tar.gz}} --directory={{path/to/directory}} .",
"subtitle": "[c]reate a g[z]ipped archive from a directory using relative paths:",
"arg": "tar czf {{target.tar.gz}} --directory={{path/to/directory}} ."
"arg": "tar czf {{path/to/target.tar.gz}} --directory={{path/to/directory}} ."
},
{
"title": "tar xvf {{source.tar[.gz|.bz2|.xz]}}",
"title": "tar xvf {{path/to/source.tar[.gz|.bz2|.xz]}}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:",
"arg": "tar xvf {{source.tar[.gz|.bz2|.xz]}}"
"arg": "tar xvf {{path/to/source.tar[.gz|.bz2|.xz]}}"
},
{
"title": "tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}",
"title": "tar xf {{path/to/source.tar[.gz|.bz2|.xz]}} --directory={{path/to/directory}}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the target directory:",
"arg": "tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}"
"arg": "tar xf {{path/to/source.tar[.gz|.bz2|.xz]}} --directory={{path/to/directory}}"
},
{
"title": "tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}",
"title": "tar caf {{path/to/target.tar.xz}} {{path/to/file1 path/to/file2 ...}}",
"subtitle": "[c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:",
"arg": "tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}"
"arg": "tar caf {{path/to/target.tar.xz}} {{path/to/file1 path/to/file2 ...}}"
},
{
"title": "tar tvf {{source.tar}}",
"title": "tar tvf {{path/to/source.tar}}",
"subtitle": "Lis[t] the contents of a tar [f]ile [v]erbosely:",
"arg": "tar tvf {{source.tar}}"
"arg": "tar tvf {{path/to/source.tar}}"
},
{
"title": "tar xf {{source.tar}} --wildcards \"{{*.html}}\"",
"title": "tar xf {{path/to/source.tar}} --wildcards \"{{*.html}}\"",
"subtitle": "E[x]tract files matching a pattern from an archive [f]ile:",
"arg": "tar xf {{source.tar}} --wildcards \"{{*.html}}\""
"arg": "tar xf {{path/to/source.tar}} --wildcards \"{{*.html}}\""
}
]
}
32 changes: 16 additions & 16 deletions cmd/testdata/output-tar-with-remove-format.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@
}
},
{
"title": "tar cf target.tar file1 file2 file3",
"title": "tar cf path/to/target.tar path/to/file1 path/to/file2 ...",
"subtitle": "[c]reate an archive and write it to a [f]ile:",
"arg": "tar cf target.tar file1 file2 file3"
"arg": "tar cf path/to/target.tar path/to/file1 path/to/file2 ..."
},
{
"title": "tar czf target.tar.gz file1 file2 file3",
"title": "tar czf path/to/target.tar.gz path/to/file1 path/to/file2 ...",
"subtitle": "[c]reate a g[z]ipped archive and write it to a [f]ile:",
"arg": "tar czf target.tar.gz file1 file2 file3"
"arg": "tar czf path/to/target.tar.gz path/to/file1 path/to/file2 ..."
},
{
"title": "tar czf target.tar.gz --directory=path/to/directory .",
"title": "tar czf path/to/target.tar.gz --directory=path/to/directory .",
"subtitle": "[c]reate a g[z]ipped archive from a directory using relative paths:",
"arg": "tar czf target.tar.gz --directory=path/to/directory ."
"arg": "tar czf path/to/target.tar.gz --directory=path/to/directory ."
},
{
"title": "tar xvf source.tar[.gz|.bz2|.xz]",
"title": "tar xvf path/to/source.tar[.gz|.bz2|.xz]",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:",
"arg": "tar xvf source.tar[.gz|.bz2|.xz]"
"arg": "tar xvf path/to/source.tar[.gz|.bz2|.xz]"
},
{
"title": "tar xf source.tar[.gz|.bz2|.xz] --directory=directory",
"title": "tar xf path/to/source.tar[.gz|.bz2|.xz] --directory=path/to/directory",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the target directory:",
"arg": "tar xf source.tar[.gz|.bz2|.xz] --directory=directory"
"arg": "tar xf path/to/source.tar[.gz|.bz2|.xz] --directory=path/to/directory"
},
{
"title": "tar caf target.tar.xz file1 file2 file3",
"title": "tar caf path/to/target.tar.xz path/to/file1 path/to/file2 ...",
"subtitle": "[c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:",
"arg": "tar caf target.tar.xz file1 file2 file3"
"arg": "tar caf path/to/target.tar.xz path/to/file1 path/to/file2 ..."
},
{
"title": "tar tvf source.tar",
"title": "tar tvf path/to/source.tar",
"subtitle": "Lis[t] the contents of a tar [f]ile [v]erbosely:",
"arg": "tar tvf source.tar"
"arg": "tar tvf path/to/source.tar"
},
{
"title": "tar xf source.tar --wildcards \"*.html\"",
"title": "tar xf path/to/source.tar --wildcards \"*.html\"",
"subtitle": "E[x]tract files matching a pattern from an archive [f]ile:",
"arg": "tar xf source.tar --wildcards \"*.html\""
"arg": "tar xf path/to/source.tar --wildcards \"*.html\""
}
]
}
32 changes: 16 additions & 16 deletions cmd/testdata/output-tar-with-single-format.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@
}
},
{
"title": "tar cf {target.tar} {file1} {file2} {file3}",
"title": "tar cf {path/to/target.tar} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate an archive and write it to a [f]ile:",
"arg": "tar cf {target.tar} {file1} {file2} {file3}"
"arg": "tar cf {path/to/target.tar} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar czf {target.tar.gz} {file1} {file2} {file3}",
"title": "tar czf {path/to/target.tar.gz} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate a g[z]ipped archive and write it to a [f]ile:",
"arg": "tar czf {target.tar.gz} {file1} {file2} {file3}"
"arg": "tar czf {path/to/target.tar.gz} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar czf {target.tar.gz} --directory={path/to/directory} .",
"title": "tar czf {path/to/target.tar.gz} --directory={path/to/directory} .",
"subtitle": "[c]reate a g[z]ipped archive from a directory using relative paths:",
"arg": "tar czf {target.tar.gz} --directory={path/to/directory} ."
"arg": "tar czf {path/to/target.tar.gz} --directory={path/to/directory} ."
},
{
"title": "tar xvf {source.tar[.gz|.bz2|.xz]}",
"title": "tar xvf {path/to/source.tar[.gz|.bz2|.xz]}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:",
"arg": "tar xvf {source.tar[.gz|.bz2|.xz]}"
"arg": "tar xvf {path/to/source.tar[.gz|.bz2|.xz]}"
},
{
"title": "tar xf {source.tar[.gz|.bz2|.xz]} --directory={directory}",
"title": "tar xf {path/to/source.tar[.gz|.bz2|.xz]} --directory={path/to/directory}",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the target directory:",
"arg": "tar xf {source.tar[.gz|.bz2|.xz]} --directory={directory}"
"arg": "tar xf {path/to/source.tar[.gz|.bz2|.xz]} --directory={path/to/directory}"
},
{
"title": "tar caf {target.tar.xz} {file1} {file2} {file3}",
"title": "tar caf {path/to/target.tar.xz} {path/to/file1 path/to/file2 ...}",
"subtitle": "[c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:",
"arg": "tar caf {target.tar.xz} {file1} {file2} {file3}"
"arg": "tar caf {path/to/target.tar.xz} {path/to/file1 path/to/file2 ...}"
},
{
"title": "tar tvf {source.tar}",
"title": "tar tvf {path/to/source.tar}",
"subtitle": "Lis[t] the contents of a tar [f]ile [v]erbosely:",
"arg": "tar tvf {source.tar}"
"arg": "tar tvf {path/to/source.tar}"
},
{
"title": "tar xf {source.tar} --wildcards \"{*.html}\"",
"title": "tar xf {path/to/source.tar} --wildcards \"{*.html}\"",
"subtitle": "E[x]tract files matching a pattern from an archive [f]ile:",
"arg": "tar xf {source.tar} --wildcards \"{*.html}\""
"arg": "tar xf {path/to/source.tar} --wildcards \"{*.html}\""
}
]
}
32 changes: 16 additions & 16 deletions cmd/testdata/output-tar-with-uppercase-format.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@
}
},
{
"title": "tar cf TARGET.TAR FILE1 FILE2 FILE3",
"title": "tar cf PATH/TO/TARGET.TAR PATH/TO/FILE1 PATH/TO/FILE2 ...",
"subtitle": "[c]reate an archive and write it to a [f]ile:",
"arg": "tar cf TARGET.TAR FILE1 FILE2 FILE3"
"arg": "tar cf PATH/TO/TARGET.TAR PATH/TO/FILE1 PATH/TO/FILE2 ..."
},
{
"title": "tar czf TARGET.TAR.GZ FILE1 FILE2 FILE3",
"title": "tar czf PATH/TO/TARGET.TAR.GZ PATH/TO/FILE1 PATH/TO/FILE2 ...",
"subtitle": "[c]reate a g[z]ipped archive and write it to a [f]ile:",
"arg": "tar czf TARGET.TAR.GZ FILE1 FILE2 FILE3"
"arg": "tar czf PATH/TO/TARGET.TAR.GZ PATH/TO/FILE1 PATH/TO/FILE2 ..."
},
{
"title": "tar czf TARGET.TAR.GZ --directory=PATH/TO/DIRECTORY .",
"title": "tar czf PATH/TO/TARGET.TAR.GZ --directory=PATH/TO/DIRECTORY .",
"subtitle": "[c]reate a g[z]ipped archive from a directory using relative paths:",
"arg": "tar czf TARGET.TAR.GZ --directory=PATH/TO/DIRECTORY ."
"arg": "tar czf PATH/TO/TARGET.TAR.GZ --directory=PATH/TO/DIRECTORY ."
},
{
"title": "tar xvf SOURCE.TAR[.GZ|.BZ2|.XZ]",
"title": "tar xvf PATH/TO/SOURCE.TAR[.GZ|.BZ2|.XZ]",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely:",
"arg": "tar xvf SOURCE.TAR[.GZ|.BZ2|.XZ]"
"arg": "tar xvf PATH/TO/SOURCE.TAR[.GZ|.BZ2|.XZ]"
},
{
"title": "tar xf SOURCE.TAR[.GZ|.BZ2|.XZ] --directory=DIRECTORY",
"title": "tar xf PATH/TO/SOURCE.TAR[.GZ|.BZ2|.XZ] --directory=PATH/TO/DIRECTORY",
"subtitle": "E[x]tract a (compressed) archive [f]ile into the target directory:",
"arg": "tar xf SOURCE.TAR[.GZ|.BZ2|.XZ] --directory=DIRECTORY"
"arg": "tar xf PATH/TO/SOURCE.TAR[.GZ|.BZ2|.XZ] --directory=PATH/TO/DIRECTORY"
},
{
"title": "tar caf TARGET.TAR.XZ FILE1 FILE2 FILE3",
"title": "tar caf PATH/TO/TARGET.TAR.XZ PATH/TO/FILE1 PATH/TO/FILE2 ...",
"subtitle": "[c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program:",
"arg": "tar caf TARGET.TAR.XZ FILE1 FILE2 FILE3"
"arg": "tar caf PATH/TO/TARGET.TAR.XZ PATH/TO/FILE1 PATH/TO/FILE2 ..."
},
{
"title": "tar tvf SOURCE.TAR",
"title": "tar tvf PATH/TO/SOURCE.TAR",
"subtitle": "Lis[t] the contents of a tar [f]ile [v]erbosely:",
"arg": "tar tvf SOURCE.TAR"
"arg": "tar tvf PATH/TO/SOURCE.TAR"
},
{
"title": "tar xf SOURCE.TAR --wildcards \"*.HTML\"",
"title": "tar xf PATH/TO/SOURCE.TAR --wildcards \"*.HTML\"",
"subtitle": "E[x]tract files matching a pattern from an archive [f]ile:",
"arg": "tar xf SOURCE.TAR --wildcards \"*.HTML\""
"arg": "tar xf PATH/TO/SOURCE.TAR --wildcards \"*.HTML\""
}
]
}

0 comments on commit 84b7c1f

Please sign in to comment.