summaryrefslogtreecommitdiffstats
path: root/atuin-client/src/import/mod.rs
blob: 0b21d6052969a9067bb9a8c4c70a74847cdfd309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::fs::File;
use std::io::{BufRead, BufReader, Seek, SeekFrom};

use eyre::Result;

pub mod bash;
pub mod resh;
pub mod zsh;

// this could probably be sped up
fn count_lines(buf: &mut BufReader<File>) -> Result<usize> {
    let lines = buf.lines().count();
    buf.seek(SeekFrom::Start(0))?;

    Ok(lines)
}