Skip to main content
14 events
when toggle format what by license comment
Jan 24, 2022 at 11:05 history closed Gilles 'SO- stop being evil' bash Duplicate of Why not use "which"? What to use then?
Jan 24, 2022 at 9:22 history edited Gulzar CC BY-SA 4.0
edited body
Jan 23, 2022 at 16:25 history became hot network question
Jan 23, 2022 at 10:40 comment added Edward The reason I couldn't reproduce was that the which command itself was aliased on my machine (CentOS 8). Look at this: alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'. Running /usr/bin/which python without the command flags confirmed the behaviour you saw. The answer by @ilkkachu is correct.
Jan 23, 2022 at 10:16 history edited Gulzar CC BY-SA 4.0
added 204 characters in body
Jan 23, 2022 at 10:02 vote accept Gulzar
Jan 23, 2022 at 10:01 history edited Gulzar CC BY-SA 4.0
deleted 97 characters in body
Jan 23, 2022 at 9:50 answer added ilkkachu timeline score: 16
Jan 23, 2022 at 9:46 comment added Gulzar @Edward it shows nothing, see edit.
Jan 23, 2022 at 9:44 history edited Gulzar CC BY-SA 4.0
added 795 characters in body
Jan 23, 2022 at 9:26 comment added Paul_Pedant Aliases are only applied to the command itself. Here, which is the command: python is merely an argument to a command. you really do not want an alias to be a global replace to everything you type on the command line.
Jan 23, 2022 at 8:51 comment added Edward I can't reproduce this. Which OS are you on? What does the command alias|grep python show?
S Jan 23, 2022 at 8:24 review First questions
Jan 23, 2022 at 9:34
S Jan 23, 2022 at 8:24 history asked Gulzar CC BY-SA 4.0