8

While reviewing existing tags (I was looking for Incident Response/Investigation related subjects) I came across the tag. Without a wiki definition I had to look at questions already tagged and assume it refers to expansion of the shell history, which will vary greatly depending on WHICH shell is the focus.

Is there value having a tag to distinguish this subject from ?

12
  • Or, maybe I'm just too pedantic today? ;)
    – 0xSheepdog
    Commented May 9, 2019 at 18:26
  • 1
    I'm failing to find the previous discussion I'm thinking of, it my opinion at this point is to consider whether we'd have a set of history-expansion experts that are distinct from $SHELL experts who would follow the tag. I'm not sure it's worthwhile. I would recommend $SHELL + command-history.
    – Jeff Schaller Mod
    Commented May 9, 2019 at 20:36
  • 2
    Of course I find it after commenting: unix.meta.stackexchange.com/a/1234/117549
    – Jeff Schaller Mod
    Commented May 9, 2019 at 20:38
  • 3
    I think it's a bit pedantic, yes. We also have brace-expansion (brace-expansion works differently in different shells), and variable-substitution (again, different in different shells). On the other hand, we have the very specific bash-expansion for whatever reason. Command history is something (relatively) completely different. Command history questions generally deals with the history as a whole, e.g. saving it, viewing it etc., while history expansion are more about how to interactively work with shortcuts for recalling specific commands.
    – Kusalananda Mod
    Commented May 9, 2019 at 21:00
  • 2
    @Kusalananda that is what meta is for I suppose. :)
    – 0xSheepdog
    Commented May 9, 2019 at 22:32
  • I like the existence of this tag. I suspect this tag could be applied to many more questions, currently there's only 37. I would create a explanation stating that the use of this tag is for question that cover the expansion of history commands that is a feature provided by many shells.
    – slm Mod
    Commented May 10, 2019 at 1:45
  • @Kusalananda No, "history expansion/substitution" is not about "shortcuts for recalling specific commands". As explained in the bash, zsh and csh manpages, it specifically refers to a specific shell syntax where ! (which could be changed to another character in bash or zsh) is interpreted in a special way (being replaced with whole or parts of previous commands). It's not about interactive shortcuts like Ctrl-P, Ctrl-N Ctrl-R in bash (when in emacs editing mode).
    – user313992
    Commented May 10, 2019 at 6:39
  • + a form of command expansion also starts by ^, and both ! and ^ are also configurable in csh. sorry.
    – user313992
    Commented May 10, 2019 at 6:55
  • 4
    This seems to be one of those tags which only make sense if you already know the answer (as in, if the question author knows it’s called “history expansion”, they’d probably be able to answer their question; and by extension, editors shouldn’t add that tag to the question), or for questions about esoteric aspects of history expansion... Commented May 10, 2019 at 7:58
  • @StephenKitt I suggest that the tag name should be changed to modifier-failed in order to be sure that nobody is using it by mistake ;-)
    – user313992
    Commented May 10, 2019 at 8:21
  • @mosvy Well, I would call event designators "shortcuts" as they are used to avoid typing a full command (or part of a longer command).
    – Kusalananda Mod
    Commented May 10, 2019 at 8:58
  • I agree with @StephenKitt: Typically, bash users get strange error messages due to the broken implementation and will never guess that history expansion is the reason
    – Philippos
    Commented May 14, 2019 at 15:03

1 Answer 1

1

There is a lot of good discussion and clarification of the idea(s) in the comments. I suppose that makes this a "successful" post for Meta-

At this point I believe there IS a distinct subject this tag addresses that provides value. The cause of the ambiguity for me was the lack of a concise description or wiki entry.

I would be happy to author one myself, but with my limited experience in this topic it is probably best for someone else to provide guidance on what represents.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .