SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: SyRenity on July 06, 2006, 07:40:07 pm

Title: System commands help is displayed instead of functions help in Linux?
Post by: SyRenity on July 06, 2006, 07:40:07 pm
Hi.

Is there a way to make SE to show a man of a function, instead of a system command (when there is one with the same name)? For example, trying to show the help for the stat() function brings the stat command, and not the function description.

I think it's because the stat command man page is higher in priority then the function man page, but this only a guess.

Thanks.
Title: Re: System commands help is displayed instead of functions help in Linux?
Post by: Kohei on July 06, 2006, 09:15:53 pm
Hi.

Is there a way to make SE to show a man of a function, instead of a system command (when there is one with the same name)?

You might want to give the section number to the command, like this

Code: [Select]
man 2 stat
This should display the system call stat, instead of the user command version.

HTH,
Kohei
Title: Re: System commands help is displayed instead of functions help in Linux?
Post by: SyRenity on July 07, 2006, 02:24:39 pm
Thanks for the tip. Is there a way to make SE to show the correct man pages?
Title: Re: System commands help is displayed instead of functions help in Linux?
Post by: Kohei on July 07, 2006, 03:07:40 pm
Since SlickEdit simply executes the system "man" command and displays its output, what you need do is to change the section search order that your man command follows.  You could control the section search order at several different levels.  To do it globally, become a super user and edit /etc/man.config.  Find the parameter named MANSECT.  Its value should look like 1:8:2:3:4:5:6:7:9:0p:1p:3p:tcl:n:l:p:o .  Simply move the 2 before the 1, and save the file.  This way section 2 is always searched before section 1, and in the case of the stat command, you would always get the stat system call, not the stat shell command.  This also applies when you execute the man command within SlickEdit.

If you don't want the change to be global or you don't have a super user account on your system, you can set the MANSECT environment variable to something like 2:1:8:3:4:5:6:7:9:0p:1p:3p:tcl:n:l:p:o by
Code: [Select]
export MANSECT=2:1:8:3:4:5:6:7:9:0p:1p:3p:tcl:n:l:p:othen the change is limited only to the current session.

If you even want to limit the change to a certain workspace within SlickEdit, go to Project > Workspace Properties > Environment, and set the MANSECT value therein.  This way, the change only affects that specific workspace.
Title: Re: System commands help is displayed instead of functions help in Linux?
Post by: SyRenity on July 15, 2006, 03:03:33 pm
Thank you for the explanation. Eventually I started using the command line "man X function_name", because some of the functions are located on the 3 index.