rupa / z

z - jump around
Do What The F*ck You Want To Public License
16.17k stars 1.16k forks source link

Run `date` with `command` to bypass aliases. #323

Closed iandunn closed 6 months ago

iandunn commented 1 year ago

I have an alias for date in my ~/.bash_aliases file:

alias date='gdate "+%b %e %Y %l:%M:%S %P"'

When I run z, I get an error:

> z deve
gdate: extra operand ‘+%s’
Try 'gdate --help' for more information.

That's because z uses the aliased date, and ends up trying to run gdate "+%b %e %Y %l:%M:%S %P" +%s instead of date +%s

This PR updates the references to date to use command, so that it bypasses the alias and executes /bin/date directly.

iandunn commented 1 year ago

Related #264