Compare commits
2 commits
7ef1a00db0
...
1ec6aee797
Author | SHA1 | Date | |
---|---|---|---|
Sanchayan Maity | 1ec6aee797 | ||
Sanchayan Maity | 1b96983efa |
13
fish/.config/fish/functions/lo.fish
Normal file
13
fish/.config/fish/functions/lo.fish
Normal file
|
@ -0,0 +1,13 @@
|
|||
function lo --description 'Open a .log file in /tmp or given path'
|
||||
if count $argv >/dev/null
|
||||
set logpath "$argv"
|
||||
else
|
||||
set logpath /tmp
|
||||
end
|
||||
|
||||
find $logpath -maxdepth 1 -regextype posix-extended -regex ".*\.(log)" -printf '%T@ %p\n' | sort -k 1 -n -r | fzf --bind "ctrl-d:half-page-down,ctrl-u:half-page-up" | awk -F' ' '{print $2}' | read -l result
|
||||
|
||||
if test -n "$result"
|
||||
nvim "$result"
|
||||
end
|
||||
end
|
|
@ -1,4 +1,5 @@
|
|||
vim.bo.textwidth = 0
|
||||
vim.bo.textwidth = 0
|
||||
vim.wo.conceallevel = 2
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
buffer = 0,
|
||||
|
|
Loading…
Reference in a new issue