#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
GOPATH=~/go
PATH=~/.gem/ruby/2.5.0/bin:~/bin:$GOPATH/bin:$PATH
# Check for an interactive session
[ -z "$PS1" ] && return
export MAN_DISABLE_SECCO=1
#man() {
# LESS_TERMCAP_md=$'\e[01;31m' \
# LESS_TERMCAP_me=$'\e[0m' \
# LESS_TERMCAP_se=$'\e[0m' \
# LESS_TERMCAP_so=$'\e[01;44;33m' \
# LESS_TERMCAP_ue=$'\e[0m' \
# LESS_TERMCAP_us=$'\e[01;32m' \
# command man "$@"
#}
_PROMPT() {
_EXIT_STATUS=$?
[ $_EXIT_STATUS != 0 ] && _EXIT_STATUS_STR=" \[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;9m\]$_EXIT_STATUS\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]"
_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! $_BRANCH == "" ]
then
_BRANCH_STR="[\[$(tput sgr0)\]\[\033[38;5;11m\]$_BRANCH\[$(tput sgr0)\]\[\033[38;5;7m\]]"
else
_BRANCH_STR=""
fi
PS1="\[\033[38;5;2m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;12m\]\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]╺─╸\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;2m\]\W\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;7m\]$_BRANCH_STR\[$(tput sgr0)\]\[\033[38;5;15m\] \n\[$(tput sgr0)\]\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;11m\]\A\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\]$_EXIT_STATUS_STR \[$(tput sgr0)\]\[\033[38;5;7m\]»\[$(tput sgr0)\] "
unset _EXIT_STATUS_STR
unset _EXIT_STATUS
unset _BRANCH_STR
unset _BRANCH
}
PROMPT_COMMAND=_PROMPT
# virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv2
source /usr/bin/virtualenvwrapper.sh
# Mimic Zsh run-help ability
bind '"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"'
# search the official repositories, when entering an unrecognized command
source /usr/share/doc/pkgfile/command-not-found.bash
function homestead() {
( cd ~/Homestead && vagrant $* )
}
# Import colorscheme from 'wal'
# & # Run the process in the background.
# ( ) # Hide shell job control messages.
(cat ~/.cache/wal/sequences &)
#Some aliases
alias e="exit"
alias v="vim"
alias ka="killall"
alias sv="sudo vim"
alias r="ranger"
alias ls='ls -hN --color=auto --group-directories-first'
alias g="git"
alias gitup="git push origin master"
alias mkdir="mkdir -pv"
alias crep="grep --color=always"
alias p="sudo pacman"
alias sdn="sudo shutdown now"
]]>export MAN_DISABLE_SECCOMP=1
man man
$ git pull --help
col: invalid option -- 'u'
Try 'col --help' for more information.
man: nroff: Bad system call (core dumped)
man: command exited with status 159: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=177n -rLT=177n -Tutf8)
$ MANPAGER= git pull --help
man: nroff: Bad system call (core dumped)
man: command exited with status 159: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=177n -rLT=177n -Tutf8)
$ MANPAGER= MAN_DISABLE_SECCOMP=1 git pull --help
GIT-PULL(1) Git Manual GIT-PULL(1)
NAME
...
The last one worked. So in the case where I could replicate the problem MAN_DISABLE_SECCOMP=1 was sufficient to fix it. I also stumbled on another issue here though: git --help seems to spawn a bash shell regardless of what is configured as the default shell or linked by /bin/sh.
]]>MAN_DISABLE_SECCOMP=1 man man
#type man
man is /usr/bin/man
#sudo type man
sudo: type: command not found
#sudo bash
#type man
man is /usr/bin/man
type man
sudo type man
]]>#ls -ld /usr/share/man /usr/lib/man-db/zsoelim /usr/lib/man-db/manconv
drwxr-xr-x 66 root root 4.0K Apr 10 15:24 /usr/share/man
-rwxr-xr-x 1 root root 15K Apr 5 13:36 /usr/lib/man-db/manconv
-rwxr-xr-x 1 root root 47K Apr 5 13:36 /usr/lib/man-db/zsoelim
#localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: /usr/local/share/kbd/keymaps/personal.map
X11 Layout: n/a
#sudo localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: /usr/local/share/kbd/keymaps/personal.map
X11 Layout: n/a
What is the output of this command?
ls -ld /usr/share/man /usr/lib/man-db/zsoelim /usr/lib/man-db/manconv
Also, I'm not very experienced with this stuff, but I wonder if it's a locale issue. As in, if the man page doesn't know what language you want, then it won't know what to display. What is the output of these two commands?
localectl
sudo localectl
man: command exited with status 2: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=231n -rLT=231n -Tutf8)
This occurs anytime I try to run man. I have tried with both bash and zsh shells, have tried moving the shell config file and starting a new terminal to see if it was an error in there but the error still occurs. However, if a run sudo man the pages work no problem.
I've tried runnnig mandb but it doesn't fix the issue either.
Could this be a permissions error?
]]>