climate
climate copied to clipboard
Feature Request: Show the command behind the shortcut
Hi, i would like to see what command is executed when a shortcut runs
For example climate download-file <file>
should show something like The command you just executed was a shortcut to "wget <file> "
Yep, this is possible already. When you install, you'll be asked a question Show commands before execution?
. Just say yes and you'll get the run commands every time. Lemme know if that works :)
It does not show the command, at least with some that i tryed (ports, memory, overview, trash-size, public ip, etc).
also ports give a lsof error (not found), i'm using arch linux
Oh yeah, I've implemented it only for some commands. Didn't get around to finishing it for the whole list of commands. Will do it soon though :) Thanks for reminding me!
hello ! i think this probably the most important feature. /sharing knowledge/ in order to ease the task i suggest to use a tricky function like this
logexec() {
if [ "${SHOW_COMMAND:-}" ]; then
printf "+ %s\n" "$@"
fi
eval $@ & spinner $!
}
# example
logexec 'echo a lot of things | sed "s/lot/couple/"'
the result is similar to set -x; eval $@ ; set +x
but independant to the bash configuration