List of examples to demonstrates how to use luneta.
echo "hello\nworld\nluneta" | luneta
function ik {
local pname
pname=$(ps -e -o comm 2> /dev/null | luneta) && pkill "${pname}"
}
function jump {
local dir
dir=$(find ${1:-.} -type d 2> /dev/null | luneta) && cd "${dir}"
}
Search and open files with vim.
function of {
local f
f=$(find ${1:-.} -type f 2> /dev/null | luneta) && vim "${f}"
}
git branch 2> /dev/null | luneta | sed "s/.* //" | awk '{print $1}' | xargs git checkout
Stop container
function docker-stop {
local id
id=$(docker ps 2> /dev/null | sed 1d | luneta) \
&& echo "${id}" | awk '{print $1}' | xargs docker stop
}