Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Show the command behind the shortcut #22

Open
alex9099 opened this issue Jan 22, 2017 · 4 comments
Open

Feature Request: Show the command behind the shortcut #22

alex9099 opened this issue Jan 22, 2017 · 4 comments

Comments

@alex9099
Copy link

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> "

@adtac
Copy link
Owner

adtac commented Jan 22, 2017

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 :)

@alex9099
Copy link
Author

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

@adtac
Copy link
Owner

adtac commented Jan 23, 2017

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!

@luffah
Copy link

luffah commented May 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants