Bug? 'nice time' disables $PATH search With ~/bin at the beginning of my $PATH, I still have to name the directory if I put 'nice time' in front of the filename.  Also, 'which' doesn't find it yet it still runs if I invoke it without 'nice time bin/'.  This was not the case at some time in the recent past.  Is it a bug introduced recently, or a "feature" that Apple failed to support until recently?  

MBP:~ user$ nice time copy_websites
copy_websites: No such file or directory
        0.00 real         0.00 user         0.00 sys
MBP:~ user$ echo $PATH
~/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
MBP:~ user$ which copy_websites
MBP:~ user$ which bash
/bin/bash
MBP:~ user$ head -1 bin/copy_websites 
#!/bin/bash
MBP:~ user$ ls -lat@e bin/co*
-rwx------@ 1 user  staff  747 Mar 10 13:36 bin/copy_websites
    com.apple.TextEncoding   15 
    com.apple.metadata:kMDLabel_zla7g6mgqwkmgzlaez4j64ql5q   89
The problem here is that the handling of ~ differs between the shell and the macOS kernel. If you run your command directly from the prompt, PATH expansion is handled by the shell which knows how to expand ~. If you run your command through nice, the command is passed to the macOS kernel for path expansion:

pse@Mithos:~$ mkdir foo
pse@Mithos:~$ cat &gt;foo/foo.sh
#!/bin/sh
echo foo here
pse@Mithos:~$ chmod +x foo/foo.sh
pse@Mithos:~$ foo/foo.sh
foo here
pse@Mithos:~$ PATH='~/foo':$PATH
pse@Mithos:~$ echo $PATH
~/foo:/Users/pse/.bin/script:/Users/pse/.bin/i386:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin
pse@Mithos:~$ foo.sh
foo here
pse@Mithos:~$ time foo.sh
foo here

real    0m0.007s
user    0m0.002s
sys 0m0.002s
pse@Mithos:~$ nice time foo.sh
foo.sh: No such file or directory
        0.00 real         0.00 user         0.00 sys
pse@Mithos:~$ nice foo.sh
nice: foo.sh: No such file or directory
pse@Mithos:~$ 


To avoid this, always make sure that your assigned PATH contains neither ~ nor any nonexpanded variables.

PS: Additionally there are different time commands called for time foo and nice time foo.  To get the same output format in both cases, use /usr/bin/time foo instead.