mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-01-15 05:01:56 +00:00
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
22 lines
431 B
Nu
22 lines
431 B
Nu
def "nu-complete ps" [] {
|
|
ps -l | each {|x| { value: $"($x.pid)", description: $x.command } }
|
|
}
|
|
|
|
# after <pid> {|| do something ... }
|
|
export def main [
|
|
pid: string@"nu-complete ps"
|
|
action
|
|
] {
|
|
do -i { tail --pid $pid -f /dev/null }
|
|
do $action
|
|
}
|
|
|
|
# before {|| do something ... } <pid>
|
|
export def before [
|
|
action
|
|
pid: string@"nu-complete ps"
|
|
] {
|
|
do -i { tail --pid $pid -f /dev/null }
|
|
do $action
|
|
}
|