From ArchWiki
Revision as of 21:30, 29 December 2013 by Lahwaacz (talk | contribs) (Is the extract function still correct?: add link)
Jump to navigation Jump to search

Invocation and config files

Right now the overview and sourcing order of config files is combined in a confusing way. I've tried to merge a redundant section called startup files from further down the page. Here is what I envision:

Bash#Configuration file overview
Give a description of what kind of things these config files can be used for.
Bash#Configuration file sourcing order
Explain how the different files are sourced.

I also think a Bash#Invocation section properly defining login vs interactive shells and legacy mode would be nice to have before these ideas are used. --Emiralle

I'm using the confusing manual, as I don't know much myself. If anyone who knows more is interested in helping this along I'd be much obliged. | Emiralle 03:10, 8 October 2011 (EDT)
I proposed a few clarifications on the Forum in Configuration file sourcing order at startup - confusing, please discuss. --Mloskot (talk) 21:40, 9 June 2012 (UTC)


I first put "complete -cf sudo" in my .bashrc and much later installed bash-completion. This combination makes the completion go insane, for example "sudo cp <tab>" lists all files and folders in the current directory and several thousand things in my PATH. Should a warning be included in the article in the section about bash-completion to remove/comment "complete ..." lines from .bashrc? -Markus00000 08:36, 9 November 2011 (EST)

This was done a while ago. Closing.
-- Jstjohn (talk) 03:08, 9 December 2013 (UTC)

Colors for "command not found"

Some time ago I simplified Bash#The "command not found" hook removing the colors and using standard code templates, also backed by Help:Style#HTML tags: [1].

Recently User:Grufo restored the colors with [2] and the following summary:

"discouraged" doesn't mean "forbidden": HTML tags here are useful to emphasize the difference between the two packages, also about colors. See the Color Bash Prompt page to be convinced.

Color Bash Prompt has to use colors because colors are the main topic of the article that gives it its reason to exist. This doesn't happen to the Bash#The "command not found" hook section, whose purpose is to mention the existence of those hooks, not to attempt providing "screenshots". Moreover, the red color used in the alternative hook is purely aesthetic and doesn't carry any particular meaning for the user, who can safely ignore it (not to mention the colors in the prompts).

Besides Grufo's reply, it would be interesting to also read the opinion of other users. -- Kynikos (talk) 02:58, 4 December 2013 (UTC)

I wrote my opinion… it's just an opinion. Let's see what do the other users say…! --Grufo [ contribs | talk ] 13:06, 4 December 2013 (UTC)
I have to agree with Kynikos - why not just keep it simple? The colors in the relevant section are mainly for the fancy prompt, the red "abiword" could be (and was in the previous revision) highlighted in bold instead. By your arguments every command on ArchWiki could have a fancy colored prompt - this conflicts with the current style conventions. If you want to propose changes to the conventions or some template like Template:hc, refer to the relevant talk page. -- Lahwaacz (talk) 15:20, 4 December 2013 (UTC)
It is not just about style. The complex HTML code also make it hard for future update and translation. I think no other users could edit this section anymore. --Fengchao (talk) 12:57, 8 December 2013 (UTC)
Absolutely true. I think we've collected enough arguments in favour of the simple style, I've reverted the edit. -- Kynikos (talk) 03:34, 9 December 2013 (UTC)


Sorry, but this wiki page feels cluttered. Should we clean it up by reducing the code examples? Or we move the "Tips" section to a new page like "Prompt Customization". Then could move some examples of the "Color Prompt" article there, too. PS2-PS4 is missing: | T.ask (talk) 23:31, 17 December 2013 (UTC)

What do you mean by reducing code examples? The code is what's important in this article. Can you give us some example of code example that could be reduced?
Of course feel free to add any missing information, though we prefer links to an external documentation and manpages, especially when they are good, instead of duplicating them.
-- Lahwaacz (talk) 18:53, 18 December 2013 (UTC)

Is the extract function still correct?

I copied it word for word and I'm getting this error. Am I the only one?

source .bashrc

bash: .bashrc: line 104: syntax error near unexpected token `('

bash: .bashrc: line 104: ` *.t@(gz|lz|xz|b@(2|z?(2))|a@(z|r?(.@(Z|bz?

Lelele (talk) 21:21, 29 December 2013 (UTC)

Did you enable extglob? See the note in Bash#Extract below the function. -- Lahwaacz (talk) 21:29, 29 December 2013 (UTC)