/srv/irclogs.ubuntu.com/2021/12/29/#ubuntustudio-devel.txt

EickmeyerOvenWerks: You should be able to test for the location of a command in $PATH using "command -v". Don't use 'which', it's being depricated.19:25
OvenWerksEickmeyer: I was already assuming python has a better way to do this :)19:29
EickmeyerOh, yeah, I don't know about that, but I know you can query python for the output of a command.19:32
OvenWerksEickmeyer: you will never guess what the python method is... shutil.which()19:32
EickmeyerLMAO That's hilarious.19:32
OvenWerksLong Live Which19:32
OvenWerks :)19:32
EickmeyerYeah, but I doubt it's using the actual "which" command as a backend.19:33
OvenWerkswhy people would depricate something simple like which to something no one has heard of sounds dumb.19:33
OvenWerkscommand should be changed so that if parameter 0 is which it acts that way.19:35
OvenWerks(ie. a link called which that points to command should just work... otherwise bug19:35
OvenWerksbasic unix commands should always continue to work19:37
EickmeyerRight, not sure why it's depricated, but probably because it was duplicating the work of "command -v".19:41
OvenWerksexcept any book that teaches unix commands teaches which19:42
EickmeyerYeah, again, I have no idea why, but remember, GNU's Not Unix (tm).19:43
OvenWerksno but gnu has created almost all the commandline tools unix depends on. The gnu commandline tools are effectively the standard commandline tools.19:44
EickmeyerI mean, I agree, but which in 22.04 was giving the error that it was being depricated in favor of "command -v". The release team reverted that for now since it's an LTS and nobody wants that going bad yet.19:46
OvenWerkscommand is a part of bash it seems.19:48
OvenWerksdoes sh include command as well? seems to... except I think our sh->bash :P19:49
OvenWerksone wonders about ash and csh too.19:50
OvenWerksor for that matter any shell script that is not run from bash.19:51
EickmeyerYeah, no clue. I just know it was saying "This version of which is depricated. Use 'command -v' instead in scripts."20:00
OvenWerksAnyway, python has which ;)20:12
Eickmeyer:)20:14

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!