Menu

Do aliases work with Lshell?

Alex
2011-12-24
2013-04-26
  • Alex

    Alex - 2011-12-24

    Bear with the questions of a new user of lshell, please.

    In .bash I could 'source .bash_profile' and use custom aliases. In lshell I tried, but could not load aliases. Does lshell aloww aliases at all? How and where should I define them?

    Thanks!

     
  • Alex

    Alex - 2011-12-25

    Actually, I see the following in the config file:

    ##  command aliases list (similar to bash’s alias directive)
    aliases         : {'ll':'ls -l', 'vi':'vim'}
    

    However (1) defined ll does not take effect:

    myusername:~$ ll
    *** unknown command: ll
    

    (2) in my .bash_profile I had something like:

    userprompt () {
    local usercolor="\[\033[1;36m\]"
    [[ $EUID == 0 ]] && usercolor="\[\033[1;31m\]"
    PS1="$(pwd)"
    PS1="$usercolor\u\[\033[0m\]@\[\033[1;34m\]\h\[\033[0m\]:${PS1//\//$usercolor/\[\033[0;1m\]}$usercolor\\$\[\033[0m\]
    "
    }
    PROMPT_COMMAND=userprompt
    

    to colorify bash screen. How can I do it in lshell?

     
  • Ignace Mouzannar

    Hi,

    For it to take affect, you should add 'll' in the allowed command list.

    Regards,
    Ignace M

     
  • Frank Stuppy

    Frank Stuppy - 2013-04-26

    Hi,

    but when I use 'all' in the allowed list lshell ignores ll either and
    it is not allowed to write e.g. 'all' ['ll']

    Regards
    Franky

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.