Skip to content

Latest commit

 

History

History
34 lines (33 loc) · 756 Bytes

File metadata and controls

34 lines (33 loc) · 756 Bytes

Aliasing

Examples

Make ! run in a terminal

require('cmdline-hl.scripts').Bang_command({ 
    -- wether !cmd should be echoed before running the command 
    -- might cause issues because it's echoed like this
    -- echo 'cmd'
    -- if cmd misses a quote you get an unmatched quote error
    echo = true
})
cmdline_hl.setup({
    custom_types = {
        ['Bang'] = { icon = "!", lang = "bash", show_cmd = false }
    },
    aliases = {
        ['!'] = { str = 'Bang ' }
    }
})

requires treesitter bash parser

Make cd act as zoxide

require('cmdline-hl.scripts').Cd_command()
cmdline_hl.setup({
    custom_types = {
        ['Cd'] = { show_cmd = true }
    },
    aliases = {
        ['cd'] = { str = 'Cd' }
    }
})