This commit is contained in:
Austen Adler 2022-09-03 02:02:44 -04:00
parent 94ad2dc4ef
commit 37a0066acf
3 changed files with 9 additions and 1 deletions

View File

@ -76,6 +76,7 @@ fn main() {
return; return;
} }
// This will be required for all subcommands from here on
if get_var("kak_command_fifo") if get_var("kak_command_fifo")
.and(get_var("kak_response_fifo")) .and(get_var("kak_response_fifo"))
.is_err() .is_err()

View File

@ -289,6 +289,10 @@ fn to_ordered_counts(options: &Options, sels: Vec<Selection>) -> LinkedHashMap<S
ret ret
} }
/// Performs an `Operation` on some set of keys
/// * `operation` - The operation to perform
/// * `left_keys` - The set on the left side of the operator
/// * `right_keys` - The set on the right side of the operator
fn key_set_operation<'a>( fn key_set_operation<'a>(
operation: &Operation, operation: &Operation,
left_keys: &LinkedHashSet<&'a Selection>, left_keys: &LinkedHashSet<&'a Selection>,
@ -317,6 +321,9 @@ fn key_set_operation<'a>(
} }
} }
/// Parses the arguments used for set manipulation
///
/// Arguments can be given like `a-b`, `a - b`
fn parse_arguments(args: &[String]) -> Result<(Register, Operation, Register), KakError> { fn parse_arguments(args: &[String]) -> Result<(Register, Operation, Register), KakError> {
let args = if args.len() == 1 { let args = if args.len() == 1 {
// They gave us something like "a-b" or "c?d" // They gave us something like "a-b" or "c?d"