0

NOT Working: /bin/bash: Psu: command not found

M-! cmd Psu

Working

M-! cmd ls

.bashrc

cat ~/.bashrc | grep Psu
cat ~/.bashrc | grep aliases

 alias Psu='sudo pacman -Syyu'
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases

.bashprofile

cat ~/.bash_profile | grep -A 2 bashrc

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

.bashaliases

cat ~/.bash_aliases

if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

I've read and followed: https://emacs.stackexchange.com/a/28999/21118

What am I missing?

1

From the documentation:

To specify the shell file name used by M-x shell, customize the variable explicit-shell-file-name. If this is nil (the default), Emacs uses the environment variable ESHELL if it exists. Otherwise, it usually uses the variable shell-file-name

You obviously want to use bash shell; may I suggest a piece of my Emacs configuration:

;; make emacs recognize my bash aliases and functions & use bash as default shell                                                                                              
(setq explicit-shell-file-name "/bin/bash")                                                                                                                                    
(setq shell-file-name "bash")                                                                                                                                                  
(setq explicit-bash.exe-args '("--noediting" "--login" "-ic"))                                                                                                                 
(setq shell-command-switch "-ic")                                                                                                                                              
(setenv "SHELL" shell-file-name)
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.