blacknon / hwatch

A modern alternative to the watch command, records the differences in execution results and can check this differences at after.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't resolve shell aliases

pythops opened this issue · comments

commented

Seems that the hwatch can not resolve shell aliases.
For example:

$ alias l="ls -l"
$ hwatch l
sh: line 1: l: command not found 

Os: Arch linux
Shell: zsh

Is there a way to fix this ?
Thanks

Since hwatch executes the command in another process, it seems that it is necessary to execute it on the command line when hwatch is executed in order to execute alias.
In my environment, ll etc. could be executed, but l was not expanded due to a problem with the command line parser.

In order to deal with this problem, it seems necessary to change the processing at the time of periodic command execution and separate the current method or the new method as an option.

@pythops

confirmed.
When using zsh alias, it seems that you need to add the -x option when declaring alias, such as alias -g xxx ='command ...'.