Completion of Man Pages in bash [SOLVED]

Sorry to post such a trivial topic, but the irc channel was unfortunately less than helpful.
I would like to have man pages tab complete, e.g. 'man pac\t' -> 'man pacman'.
I do NOT want bash-completion. It is bloated, unnecessary, and contrary to my notion of the Arch Way. Unfortunately, documentation for the completion mechanism itself is scarce, and usually only shows how to do filetype completion. Google has not helpful, this forum recommends the bash-completion package. I have looked at the package itself to look for the pertinent function or command. Grepping for man, manpage, manual was unsuccessful, and the pertinent command is not readily apparent.
Last edited by egan (2010-02-07 23:13:25)

File completion should be good enough an example as you're replacing the list of files with a list of man pages - which are files in (below) a specific directory. Basically you need to write a function that returns the list of possibilities - which will be a list of man pages in this case.
There's a good example (of the general mechanism) at this page http://www.debian-administration.org/ar … ion_part_2 as well as in books like "Learning The Bash Shell" by O'reilly. The man page also covers it (search for "Programmable Completion").

Similar Messages

  • [SOLVED] Weird characters in man pages

    Hi,
    I remember I had read a similar thread, but I can't find it anymore.
    My problem is that man pages show strange characters and it's quite difficult to read at times. Here is an example:
    The traditional protocol for writing to someone is that the string <80><98>-o', either at the end of a line or on a line by itself, means that it's the other person's turn to talk.   The  string
           <80><98>oo' means that the person believes the conversation to be over.
    How do I fix this?
    Thanks.
    Last edited by finferflu (2008-02-27 17:53:23)

    Hello
    Here is a post on that problem if you can read french : http://forums.archlinuxfr.org/viewtopic.php?id=1084
    The members suggested to replace
    export LESSCHARSET="utf8"
    by
    export LESSCHARSET="UTF-8"
    in /etc/profile.
    One suggest to replace the line inside /etc/man.conf (from the gentoo wiki fr)
    NROFF iconv -f utf8 -t iso8859-1 | /usr/bin/nroff -Tlatin1 -c -mandoc
    I must admit that it doesn't work for me neither, and the above does not solve the problem. The file I tested is UTF-8 encoded and the LESSCHARSET defined to use UTF-8 gives badly accentuated characters (But at least printable characters). I think you will have to tweak a little these lines, but it's a start.
    Note that these lines suit (or don't suit) french man pages, but you may have to change the given charsets (especially latin1).
    Hope it will help you search
    Cilyan
    Edit: Ah, time to write the answer, the problem is solved !
    Edit2: The tip given by dyscoria does not work for me.
    Last edited by Cilyan (2008-02-27 18:01:57)

  • [Solved] Looking for arch's original man page color codes

    Hey everyone. I'm new to arch, and enjoying having everything begin to work out for me. One thing I was wondering though is what the color codes are that the man pages use before X is loaded or anything similar.
    Per the archwiki, I'm using the following to provide myself with colored man pages in urxvt:
    From .Xresources:
    ! colored man pages on rxvt-unicode-256color
    URxvt.colorIT: #87af5f
    URxvt.colorBD: #d7d7d7
    URxvt.colorUL: #87afd7
    This works, but it's not the same colorscheme as what arch starts out with initially. Anyone know what that colorscheme is? Or where I could look to find it?
    Last edited by zematis (2014-05-12 22:21:30)

    ayekat, thanks for the warm welcome!
    ayekat wrote:What article in the wiki?
    Here's the section in the Wiki I was referring to:
    https://wiki.archlinux.org/index.php/ma … vt-unicode
    karol wrote:Are you talking about using man pages before installing Arch or after installing but in the tty? Do you want to get the same colors in X?
    (I think) I was talking about the colors that the man pages are in the TTY. Specifically, my processes is:
    Boot up arch
    Login (X yet not started)
    Look at a man page - like the colors
    Startx - boot to window manager (i3)
    Look at a man page - want to change the colors
    That said, I liked the colors the man pages had before installing Arch quite a bit, and wouldn't object to learning what those are.
    ayekat wrote:Here you are changing how urxvt displays characters that are marked as underline, italic or bold; in particular you are changing their colours.
    The thing is, it won't only affect man pages viewed in urxvt, but everything.
    Makes sense
    ayekat wrote:As for changing the colour scheme of the manpage, you'll probably want to do it more properly, using the LESS_TERMCAP environment variables.
    I tried copying your format to my .bashrc and it worked great! So that's a win. Now I just need to figure out what the '\e[#;#;#m' numbers mean. I think I can probably handle that one on my own though. I found a resource here at:
    http://misc.flogisoft.com/bash/tip_colo … ng#colors2
    And it looks like it covers what I need to know.
    Thanks for your help!
    And honestly, at this point I think I can figure out what colorscheme I like given the info at hand. So I think we can call this one taken care of.
    If it interests anyone, I found a .sh script at the above link to display all 256 colors, then modified it to show the colors bolded, italicized etc. Here's the script:
    #!/bin/bash
    # This program is free software. It comes without any warranty, to
    # the extent permitted by applicable law. You can redistribute it
    # and/or modify it under the terms of the Do What The Fuck You Want
    # To Public License, Version 2, as published by Sam Hocevar. See
    # http://sam.zoy.org/wtfpl/COPYING for more details.
    for coltype in {0..8} ; do # Bold, Italic etc.
      for fgbg in 38 48 ; do #Foreground/Background
        for color in {0..256} ; do #Colors
          #Display the color
          echo -en "\e[(0${coltype});(${fgbg};5;${color}m ${color}\t\e[0m"
          #Display 10 colors per lines
          if [ $((($color + 1) % 10)) == 0 ] ; then
            echo #New line
          fi
        done
        echo #New line
        echo #New line
      done
      echo #New line
    done
    exit 0

  • [SOLVED] Where are all of the Man pages?

    On my system, man-pages do not exist for many things e.g.  bash commands like ls, rm, cp & cd are missing?
    The directory /usr/man/ has the following folders: man1, 3, 4, 5, 7, 8
    It would seem that at least numbers 2 & 6 are missing.
    I have reinstalled the man utility (though it already worked) & man-pages, though it doesn't give me access to the bash commands that I know man pages exist for.
    Any ideas?
    Last edited by handy (2008-10-19 03:49:01)

    Onwards wrote:
    handy wrote:Which is now entered in my /etc/profile/ but it has no noticeable effect.
    /etc/profile is read by the login shells only. So you could have got the desired effect w/o a reboot by doing either:
    su -
    OR...
    konsole --ls #starting it as a login shell
    What I needed to know was not just the line to add & where, which first answer told me, but also the line to delete, which second useful answer told me. I had logged out after adding the line, & decided after the removing the offending line that I will reboot for good measure!
    Thanks for your confirmation that a logout would have done the job.

  • Man pages present, utilities absent? ("at" "talk" others?) [Solved]

    Hi,
    I wasn't sure where to post this so I'm gonna post it here.
    I've got man page entries from certain utiilities from the posix programmers manual, like "at" and "talk" but these utilities aren't actually installed,
    I've searched the pacman repository and I'm not actually sure these utilities are even provided as a package at all.
    Is there something that I can use like "at"?  (besides crontabs)
    Also, is this worth filing a bug report over?  (I searched the bugs list, I didn't find anything matching this description, although I only tried searching for "man pages" and "posix", and only checked the first page for "man pages".
    There's also some problems with viewing certain man-pages, like that dhcpcd man page where some of the characters are garbled, but I think this is probably a known bug relating to the switchover to UTF-8 as the standard locale.
    Thanks
    Last edited by pseudonomous (2008-10-08 23:30:57)

    The pkg 'man-pages' is directly taken from http://www.kernel.org/doc/man-pages/, which is funded by the Linux Foundation. You can see in the link that this pkg provides man pages for system-calls, glibc lib functions, device-files, file-formats and section 7 (miscellanea).
    Each pkg (e.g. util-linux-ng) is supposed to provide it's own manual pages. The 'POSIX programmer manuals' are provided to document the fact that how should these utilities behave or be implemented (if somebody wants to implement them...). This doesn't mean that these utilities are installed (they may be if their pkg is installed).
    Hope it helps !!
    P.S. POSIX is a *nix standardization effort.
    Last edited by Onwards (2009-01-17 18:35:11)

  • [Solved] Cannot start firefox nor man pages without root acount.

    Hi all,
    when i try to start firefox with a normal user account, it doesn't start, but if i do sudo firefox
    it do starts.
    The same happens with the man pages, if i do man ls
    returns "no hay ninugna pagina sobre ls", but if i do sudo man ls
    the man page appears.
    Can anyone offer suggestions? Is there information you need? Thanks in advance.
    Last edited by SWcarlos (2008-05-25 21:18:23)

    My current values in /etc/profile.d/mozilla-commons.sh are:
    export PATH="${PATH}:/opt/mozilla/bin:/usr/bin"
    i added :/usr/bin but there is no change, even if i comment that line, nothing changes
    with MANPATH /usr/profile i have
    export MANPATH="/usr/man:/usr/X11R6/man"
    my manual pages are in /usr/man, but one more time even if i comment that line, nothing changes
    sudo man ls -> the man page appears
    man ls -> "no hay ninugna pagina sobre ls"
    one thing i realized, is that before i made any changes, i try to man as normal user anything on /usr/man subfolders, and that man pages do appear, both sudo and normal user.
    but ls vi sudo and other man pages only appear as root.
    Last edited by SWcarlos (2008-03-19 05:14:38)

  • Problem reading macports man pages while SSH'd in

    For some reason when a user SSH's in to one of our systems, they cannot read macports installed man pages. If I'm logged in on directly on the server - meaning I'm at the console - I can read the ports man pages, but if I SSH in from remote system, I can't.
    For example, locally on the server both man port and man doxygen produce man pages. Whille SSH'd in, those commands return: No manual entry for [command issued]
    Is this potentially a pathing issue where, for example, local (console) bash pathing gets set, but doesn't get passed when a user comes in via SSH?
    Honestly, yesterday we upgraded to 10.7.4. so I can't say for sure whether this is a 'new' problem or a known problem.
    Thanks much in advance - this is driving us nuts.

    In what way does that other process expect its input?
    My guess was
    that it expected a newline (\n) after every input
    field. The spawned application is not written by me but it puts the string to enter the username and waits for username, then password and does some validation check and asks again for directpath. Yes the it expects newline after every input.
    // output in shell
    D:\manish\martusproj>c:\Martus\bin\java.exe Xbootclasspath/p:c:\Martus\lib\ext\
    bc-jce.jar -cp c:\Martus\martus.jar org.martus.client.tools.ImportXmlBulletins -
    -import-directory=.\ --account-directory=c:\Martus
    Martus Bulletin XML Importer
    Enter User Name:mregmi
    Enter Password:hello
    Enter Martus folder name where you want these bulletins to be stored:mart
    Importing:Bulletin #1
    Importing:Bulletin #2
    Finished! 2 bulletins imported into Martus.
    Your process has
    to write exactly what that other process expects.
    Of course you can close the writer when you're done.
    kind regards,
    Jos
    ps. what happens if you change that 'flush' to
    'close' in my example?flush hangs.
    close works but the spawned app says invalid input.
    // output
    Martus Bulletin XML Importer
    java.lang.NullPointerException
         at org.martus.client.tools.ImportXmlBulletins.createSecurityObject(Unknown Source)
         at org.martus.client.tools.ImportXmlBulletins.main(Unknown Source)
    Exception in thread "main"
    Enter User Name:Enter Password:
    xml2martus Error code 1
    Convertion Complete.....
    the same command works from cmd.
    regards
    Manish

  • Thr_create() returns -1 which isn't specified in the man page. What is -1?

    Hello,
    I'm for the first time experimenting with Solaris threads as I'm porting an AIX app. over to Solaris.
    Anyhow, I have a sample program that creates a simple thread. For some reason, the return value of of the initial thr_create is -1, which isn't specified in the man page for thr_create. The man page lists the following return values, non of which are -1:
    RETURN VALUES
    Zero indicates a successful return and a non-zero value
    indicates an error.
    ERRORS
    If any of the following conditions occur, these functions
    fail and return the corresponding value:
    EAGAIN The system-imposed limit on the total number
    of threads in a process has been exceeded or
    some system resource has been exceeded (for
    example, too many LWPs were created).
    EINVAL The value specified by attr is invalid.
    If any of the following conditions are detected,
    pthread_create() fails and returns the corresponding value:
    ENOMEM Not enough memory was available to create the
    new thread.
    If any of the following conditions are detected,
    thr_create() fails and returns the corresponding value:
    EINVAL o stack_base is not NULL and stack_size is
    less than the value returned by
    thr_min_stack(3T).
    o stack_base is NULL and stack_size is not
    zero and is less than the value returned by
    thr_min_stack(3T).
    However, I don't see a -1 there and therefore, don't know what this means.
    Here is the simple code that I wrote for this experiment as well as the output. It doesn't get too far into the program before exiting - I've bolded where it exits:
    #define _REENTRANT
    #include <stdio.h>
    #include <thread.h>
    #include <errno.h>
    /* Function prototypes for thread routines */
    void sub_a(void );
    void sub_b(void );
    void sub_c(void );
    void sub_d(void );
    void sub_e(void );
    void sub_f(void );
    thread_t thr_a, thr_b, thr_c;
    void main()
    thread_t main_thr;
    int rc = 0;
    main_thr = thr_self();
    printf("Main thread = %d\n", main_thr);
    if (rc = thr_create(NULL, 0, sub_b, NULL, THR_NEW_LWP, &thr_b))
    printf("\n rc = %d",rc);
    switch(rc)
    case EAGAIN: printf("This one1");
    break;
    case EINVAL: printf("This one2");
    break;
    case ENOMEM: printf("This one3");
    break;
    default: printf("rc = %d");
    break;
    fprintf(stderr,"Can't create thr_b\n"),
    * exit(1); *
    /* if (thr_create(NULL, 0, sub_a, (void *)thr_b, THR_NEW_LWP, &thr_a))
    fprintf(stderr,"Can't create thr_a\n"), exit(1); */
    if (thr_create(NULL, 0, sub_c, (void *)main_thr, THR_NEW_LWP, &thr_c))
    fprintf(stderr,"Can't create thr_c\n"), exit(1);
    printf("Main Created threads A:%d B:%d C:%d\n", thr_a, thr_b, thr_c);
    printf("Main Thread exiting...\n");
    thr_exit((void *)main_thr);
    void sub_a(void arg)
    thread_t thr_b = (thread_t) arg;
    thread_t thr_d;
    int i;
    printf("A: In thread A...\n");
    if (thr_create(NULL, 0, sub_d, (void *)thr_b, THR_NEW_LWP, &thr_d))
    fprintf(stderr, "Can't create thr_d\n"), exit(1);
    printf("A: Created thread D:%d\n", thr_d);
    /* process
    for (i=0;i<1000000*(int)thr_self();i++);
    printf("A: Thread exiting...\n");
    thr_exit((void *)77);
    void * sub_b(void *arg)
    int i;
    printf("B: In thread B...\n");
    /* process
    for (i=0;i<1000000*(int)thr_self();i++);
    printf("B: Thread exiting...\n");
    thr_exit((void *)66);
    void * sub_c(void *arg)
    void *status;
    int i;
    thread_t main_thr, ret_thr;
    main_thr = (thread_t)arg;
    printf("C: In thread C...\n");
    if (thr_create(NULL, 0, sub_f, (void *)0, THR_BOUND|THR_DAEMON, NULL))
    fprintf(stderr, "Can't create thr_f\n"), exit(1);
    printf("C: Join main thread\n");
    if (thr_join(main_thr,(thread_t *)&ret_thr, &status))
    fprintf(stderr, "thr_join Error\n"), exit(1);
    printf("C: Main thread (%d) returned thread (%d) w/status %d\n", main_thr, ret_thr, (int) status);
    /* process
    for (i=0;i<1000000*(int)thr_self();i++);
    printf("C: Thread exiting...\n");
    thr_exit((void *)88);
    void * sub_d(void *arg)
    thread_t thr_b = (thread_t) arg;
    int i;
    thread_t thr_e, ret_thr;
    void *status;
    printf("D: In thread D...\n");
    if (thr_create(NULL, 0, sub_e, NULL, THR_NEW_LWP, &thr_e))
    fprintf(stderr,"Can't create thr_e\n"), exit(1);
    printf("D: Created thread E:%d\n", thr_e);
    printf("D: Continue B thread = %d\n", thr_b);
    thr_continue(thr_b);
    printf("D: Join E thread\n");
    if(thr_join(thr_e,(thread_t *)&ret_thr, &status))
    fprintf(stderr,"thr_join Error\n"), exit(1);
    printf("D: E thread (%d) returned thread (%d) w/status %d\n", thr_e,
    ret_thr, (int) status);
    /* process
    for (i=0;i<1000000*(int)thr_self();i++);
    printf("D: Thread exiting...\n");
    thr_exit((void *)55);
    void * sub_e(void *arg)
    int i;
    thread_t ret_thr;
    void *status;
    printf("E: In thread E...\n");
    printf("E: Join A thread\n");
    if(thr_join(thr_a,(thread_t *)&ret_thr, &status))
    fprintf(stderr,"thr_join Error\n"), exit(1);
    printf("E: A thread (%d) returned thread (%d) w/status %d\n", ret_thr, ret_thr, (int) status);
    printf("E: Join B thread\n");
    if(thr_join(thr_b,(thread_t *)&ret_thr, &status))
    fprintf(stderr,"thr_join Error\n"), exit(1);
    printf("E: B thread (%d) returned thread (%d) w/status %d\n", thr_b, ret_thr, (int) status);
    printf("E: Join C thread\n");
    if(thr_join(thr_c,(thread_t *)&ret_thr, &status))
    fprintf(stderr,"thr_join Error\n"), exit(1);
    printf("E: C thread (%d) returned thread (%d) w/status %d\n", thr_c, ret_thr, (int) status);
    for (i=0;i<1000000*(int)thr_self();i++);
    printf("E: Thread exiting...\n");
    thr_exit((void *)44);
    void sub_f(void arg)
    int i;
    printf("F: In thread F...\n");
    while (1) {
    for (i=0;i<10000000;i++);
    printf("F: Thread F is still running...\n");
    OUTPUT:
    # /emc/smithr15/solthread
    Main thread = 1
    rc = -1Can't create thr_b
    rc = -1#
    Any ideas as to what -1 indicates and how to solve this?
    Thanks for your response,
    dedham_ma_man

    ok, my bad. I wasn't linking in the -lthread library.
    Thanks anyway.

  • Man pages in other languages

    Hi,
    Is it possible to install man pages in other languages (i.e. Spanish)? Bash shell seems to be working in Spanish but not man pages. I have checked and it only comes with some languages (Russian, German, etc.) Could it be possible to install them from any source?
    Thanks in advance

    Open Dictionary.app in the Applications folder and go to its Preferences.  There you will see what Apple provides and you can check the boxes to activate it.  If you want something more, you will have to find it on the internet and install it.
    http://m10lmac.blogspot.com/2013/01/adding-dictionaries-to-dictionaryapp.html

  • Unable to view (most) man pages

    ... really aggravating:
    I've recently completed a Solaris 8 install (Sparc). I've also installed some software from the "companion" cd (in /opt/sfw). I have gobs of man page files in several locations, but I am unable to view most of them. I've tried entering various "man" incantations on a command line, and double-clicking on man page files in the file manager window. Nothing works - from the cmd line for example:
    # man -s 1 zip
    "Reformatting page. Please wait... done"
    or, in File Manager:
    Double-click a man file (e.g. zip.1) in File Manager gets this message: "Man page could not be formatted. THe requested Man Page is either not present, or corrupt."
    However, there are a few files (in /opt/sfw/man) that, when double-clicked in FIle Manager (or man'd fm the command line) will display.
    I've searched the FAQs 'til my eyes are bleeding, but have found no answers. Can someone tell me WTFIGO?
    Thanks!

    You may want to pkginfo -l SUNWman to see if your main man pages were installed successfully.
    Also check:
    http://docs.sun.com:80/ab2/coll.40.6/REFMAN1/@Ab2PageView/201680?Ab2Lang=C&Ab2Enc=iso-8859-1
    For info on MANPATH and locale variables that may affect viewing.

  • Can only access certain man pages with sudo

    I can only access certain man pages with sudo. They aren't accessible as either root or normal user. I can't be a 100% sure but it would appear that the man pages I have problems with are those located in /usr/share/man. I can't see any differences in file or directory permissions with those located in /usr/man. Anyone else having this problem. Or have I commited another noobish mistake.
    man pacman is an example.
    Any pointers would be greatly appreciated.

    the filesystem and bash packages need to be updated after the pacman 3.1 release
    if you want immediate results add
    UNSET MANPATH to your .bashrc
    Last edited by dolby (2008-01-24 20:45:17)

  • Man pages character encoding

    hi there,
    I just installed arch the weekend before.
    When I'm browsing the man pages I got problems with the character encoding. Most of them are displayed correctly, but sometimes there stands something like that: ?<80><98> instead of an character. As I do not know how to take an screenshot of an manpage without having an GUI installed I took a picture( XD ).
    [img=http://img411.imageshack.us/img411/184/dsc00185hj0.th.jpg]
    What configuration files do you need to help me? or do you know what my problem is, yet?
    thanks in advance

    I got a file named /etc/profile.pacnew
    what is the file I have to merge/replace it with?
    furthermore I got the problem with my manpages, which is solved by using unset MANPATH, but it will reappear after a reboot. These problems are probably connected.
    I just don't know which files I have to merge, remove or keep and so on.
    thx
    edit:
    ok replaced profile with profile.pacnew, as I can't remember that I changed something in the profile ever since. this solves the problem.
    does pacman tell me if it create such a .pacnew kinda file?
    Or how do I know that this files is existing, searching for all files with an .pacnew ending once in a while an mergen them with the old file?
    Last edited by okar (2008-03-18 18:08:29)

  • Man Pages for OS X Tiger

    Does anyone know where I can download the man pages ? My iMac went to the "grey screen with endless spinning gear of death" and I want to download my files to an external drive (by firewire) but my Mac will not recognize the external drive as I am in the Install services via Disk 1. I can see my files via terminal and I want to be able to manually set up the external drive to I can transfer then I can wipe out my HD and start over.
    Anyone have any suggestions and or know of where I can get the pages ? Thx !!!

    OK. Let me make sure I am understanding this correctly:
    - you have a problem with the mac such that you cannot boot
    - you can boot from the install disk
    - you have an external FW drive which you wish to transfer files to before reinstalling
    Questions:
    - have you used the external drive before or is it new?
    - when you say you are "at the utilities menu", do you mean that you've opened Disk Utility and you can see the external drive on the left?
    -> if so, select it and then choose the "Erase" tab. Select a format and give the disk a name. It is not a bad idea to choose the "security options" and opt to write zeros (once) to the disk. Then choose "erase". This will erase everything on the disk so only do this if the disk is new or you don't need anything on the disk. If you aren't sure which format to choose from the drop-down menu, "Mac OS Extended (Journaled)" is a good choice unless you need to use the disk with Windows as well. If you chose the writing zeros option, find something to do as it will take a while depending on the size of the disk. Try mounting the new volume now - that is, select the volume on the left (it will have your chosen name) and choose mount from the menu or toolbar.
    - how are you thinking of transferring your files? If the drive is suitable, you could install OS X on the external drive, boot from that and retrieve the files from your internal drive that way. Or were you thinking of something else?
    Manpages:
    - are you using Terminal from the Utilities menu on the install disk? I think you can access the man pages that way. I don't know if you can do so directly, though you can try, but you may be able to access them from hour hard drive by specifying a complete path e.g. man /Volumes/Macintosh\ HD/usr/share/man/man1/kill.1.
    Have you tried repairing your internal drive using Disk Utility?
    - cfr

  • Man pages missing?

    Hi
    In a core install, I noticed that the man pages are missing. How do I install them? And I mean the man pages plus those ones that are part of the programming in C functions.
    Also ... what's the name of the package which contains such usefull programs as strace and string?
    Last edited by Bangel (2008-03-02 13:49:37)

    Okay, im not sure about which stuff to merge from profile.pacnew to profile apart from unset MANPATH.
    # /etc/profile
    export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"
    export MANPATH="/usr/man:/usr/X11R6/man"
    export LESSCHARSET="latin1"
    export INPUTRC="/etc/inputrc"
    export LESS="-R"
    export LC_COLLATE="C"
    export COLUMNS LINES
    export PS1='[\u@\h \W]\$ '
    export PS2='> '
    umask 022
    if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
    fi
    # load profiles from /etc/profile.d
    # (to disable a profile, just remove execute permission on it)
    if [ `ls -A1 /etc/profile.d/ | wc -l` -gt 0 ]; then
    for profile in /etc/profile.d/*.sh; do
    if [ -x $profile ]; then
    . $profile
    fi
    done
    unset profile
    fi
    # End of file
    File: /etc/profile.pacnew
    # Note the explicit use of 'test' to cover all bases
    # and potentially incompatible shells
    #Determine our shell without using $SHELL, which may lie
    shell="sh"
    if test -f /proc/mounts; then
    case $(/bin/ls -l /proc/$$/exe) in
    *bash) shell=bash ;;
    *dash) shell=dash ;;
    *ash) shell=ash ;;
    *ksh) shell=ksh ;;
    *zsh) shell=zsh ;;
    esac
    fi
    # Load shell specific profile settings
    test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
    #Set our umask
    umask 022
    # Set our default path
    PATH="/bin:/usr/bin:/sbin:/usr/sbin"
    export PATH
    # Some readline stuff that is fairly common
    HISTSIZE=1000
    HISTCONTROL="erasedups"
    INPUTRC="/etc/inputrc"
    LESS="-R"
    LC_COLLATE="C"
    export HISTSIZE HISTCONTROL INPUTRC LESS LC_COLLATE
    # Load profiles from /etc/profile.d
    if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
    test -x $profile && . $profile
    done
    unset profile
    fi
    # Termcap is outdated, old, and crusty, kill it.
    unset TERMCAP
    # Man is much better than us at figuring this out
    unset MANPATH

  • Man pages...

    hey guys!
    i got a problem with all of my man pages. they all look this way:
    UMASK(2) Linux Programmer's Manual UMASK(2)
    ESC[1mNAMEESC[0m
    umask - set file creation mask
    ESC[1mSYNOPSISESC[0m
    ESC[1m#include <sys/types.h>ESC[0m
    ESC[1m#include <sys/stat.h>ESC[0m
    ESC[1mmode_t umask(mode_t ESC[4mESC[22mmaskESC[24mESC[1m);ESC[0m
    ESC[1mDESCRIPTIONESC[0m
    ESC[1mumask ESC[22msets the umask to ESC[4mmaskESC[24m & 0777.
    i've reinstalled man-pages, but it doesn't change anything...
    the installation is very old (0.3 with pacman -Syu). the problem is fixed on all other systems. it happens just on this one... any ideas?
    regards,
    moritz

    for the record:
    I use tcsh and not bash. I ran into the same problems. Here are the changes I needed in my .tcshrc file
    # Arch linux specific stuff
    setenv TERM "xterm-color"
    setenv LESS "-R"
    Also, arch-linux does not use (the older) termcap [ /etc/termcap ]. It uses the newer terminfo. [ /usr/share/terminfo/*/* ] . "man terminfo" for guidance.
    The 'setenv TERM "xterm-color"' setting enables colour in gvim, vim etc. instead of the ugly monochromatic-underlined-las-vegas-style-blinking interface that you see with 'setenv TERM "xterm"'.
    The 'setenv LESS "-R"' setting deals with the ESC chars and gives you clean man pages.
    On a side note:
    Moved my Pentium 3 server from gentoo to arch-linux, and was up and running in less than a day. very impressive except hosts.allow and hosts.deny bit me in the @ss for some time. Still keep gentoo on my laptop around for bleeding-edge-state-of-the-art cvs-access to Gnome.
    Debian sucks. Its like a 1950's record, sure it works but its so dusty and out of date.
    Gentoo failed me when it came to binary-based releases. Arch fills that gap more than easily. Only thing I DONT use pacman for is kernels, currently building my own. Will try that out some time.
    Thanks everyone for a great distro and a great forum. Your attention to user-feedback mechanisms is the best in the industry (open-source or otherwise).
    Please add openbox stuff to the repository. I am running openbox with bbpager on my server and would like access to obconf and other openbox tools.
    George W. Bush: noun, Biological Weapon of Mass Destruction. (see also: Axis of Stupidity)

Maybe you are looking for