You are not logged in.
[mutex@asus]$ (master)*$ man man
sed: can't read 2>/dev/null: No such file or directory
sed: can't read |: No such file or directory
sed: can't read less: No such file or directory
man: command exited with status 2: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | (cd <fd 3> && LESS=-ix8RmPm Manual page man(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page man(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$-iMSx4 -FXR MAN_PN=man(1) sed s/\([[:space:]]\+[0-9.\-]\+\)$/\1/;s/\([[:space:]]\+[0-9.\-]\+[[:space:]]\)/\1/g;s/|/|/g;s/^\([-+]\+\)/\1/ 2>/dev/null | less)Last edited by pensnarik (2017-01-25 15:15:37)
Offline
Do you have "man" aliased somewhere? Are you using oh-my-zsh, or anything like it?
Offline
Do you have "man" aliased somewhere? Are you using oh-my-zsh, or anything like it?
Oh, I found the problem. The problem was, I reexported PAGER and LESS variables in one function in .bashrc. Actually, psql command was redefined as function in ~/.bashrc.
psql() {
YELLOW=$(printf "\e[1;33m" )
LIGHT_CYAN=$(printf "\e[1;36m" )
NOCOLOR=$(printf "\e[0m" )
RED=$(printf "\e[1;31m" )
PAGER="sed \"s/\([[:space:]]\+[0-9.\-]\+\)$/${LIGHT_CYAN}\1$NOCOLOR/;"
PAGER+="s/\([[:space:]]\+[0-9.\-]\+[[:space:]]\)/${LIGHT_CYAN}\1$NOCOLOR/g;"
PAGER+="s/|/$YELLOW|$NOCOLOR/g;s/^\([-+]\+\)/$YELLOW\1$NOCOLOR/\" 2>/dev/null | less"
env psql "$@"
}I have changed it to:
psql() {
YELLOW=$(printf "\e[1;33m" )
LIGHT_CYAN=$(printf "\e[1;36m" )
NOCOLOR=$(printf "\e[0m" )
RED=$(printf "\e[1;31m" )
#export LESS="-iMSx4 -FXR"
PAGER="sed \"s/\([[:space:]]\+[0-9.\-]\+\)$/${LIGHT_CYAN}\1$NOCOLOR/;"
PAGER+="s/\([[:space:]]\+[0-9.\-]\+[[:space:]]\)/${LIGHT_CYAN}\1$NOCOLOR/g;"
PAGER+="s/|/$YELLOW|$NOCOLOR/g;s/^\([-+]\+\)/$YELLOW\1$NOCOLOR/\" 2>/dev/null | less"
#export PAGER
PAGER=$PAGER LESS=$LESS env psql "$@"
}Offline
if it is solved, kindly mark this threa solved by editing your first post and prepending [solved] to the title
Arch is home!
https://github.com/Docbroke
Offline
You could also use
psql() (
...
)(note the parentheses instead of the curly braces)
This will run the code inside the function in a sub shell, so variable declarations and exports should not affect your running shell.
Offline
Or you could just use local variables, so they don't leak outside the function...
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline