shellshot 0.5.0

Transform your command-line output into clean, shareable images with a single command.
Documentation
1
2
3
4
5
6
7
8
9
pub const TAB_WIDTH: usize = 8;

pub fn tabulate(pos: usize, n: usize) -> usize {
    pos + (TAB_WIDTH * n - pos % TAB_WIDTH)
}

pub fn tabulate_back(pos: usize, n: usize) -> usize {
    pos.saturating_sub(pos % TAB_WIDTH + TAB_WIDTH * (n - 1))
}