I'm trying to replace vlc with the more intuitive watch command.
desired functionality
Autocompletion
watch /path/to/mo Tab --> watch /path/to/movie.avi
Execute vlc
watch /path/to/movie.avi Enter # this should run `vlc /path/to/movie.avi
Currently I'm using an alias todo above :
~/.bashrc
...
alias watch='vlc'
...
This meets execute vlc
above, but doesn't give the correct autocompletion
[ 1 ]
current behaviour
$ vlc /path/to/mo Tab --> vlc /path/to/movie.avi ( successfully completing )
$ watch /path/to/mo Tab --> watch /path/to/mo ( not autocompleting.. )
As @GUIDO mentions, watch
is an inbuilt command.
This is somehow affecting the autocomplete. Changing to play
works, but would like to understand why this doesnt work, and how to fix..
note
similar to How do I get bash completion to work with aliases?
but defining the function wrap_alias ( in my ~/.bashrc ) and calling
wrap_alias watch vlc ''
doesn't fix the autocomplete issue