Giter Site home page Giter Site logo

alias usage about shell-bot HOT 7 OPEN

elanozturk avatar elanozturk commented on September 16, 2024
alias usage

from shell-bot.

Comments (7)

wjs avatar wjs commented on September 16, 2024 2

It works like a charm! Thanks!

from shell-bot.

mildsunrise avatar mildsunrise commented on September 16, 2024

I'm not sure what you mean. If you have an alias defined in your ~/.bashrc:

alias ll='ls -l'

then you can use it, i.e. /run ll.

from shell-bot.

avissian avatar avissian commented on September 16, 2024

You must change the shell to bash for the user, or run the command /shell for the current bot instance.
See "{you linux dist name} change default shell to user" in google. My Raspberry Pi with raspbian starts with sh, and .bashrc is't loaded. I set first line "/bin/bash" in file /etc/shells and now bot start with bash shell

from shell-bot.

mildsunrise avatar mildsunrise commented on September 16, 2024

oh, didn't think about that, thanks for chiming in ^^

from shell-bot.

wjs avatar wjs commented on September 16, 2024

Hi, I have the same issue with zsh. I use on-my-zsh, and have some alias in my .zshrc. The aliases work well on my computer. But when I use the bot, I got the following messages:

$ xxx
zsh:1: command not found: xxx
⛔️ Exited with 127.

The result of /shell is

Current shell: /usr/bin/zsh

Other shells:
/bin/sh
/bin/bash
/bin/zsh
/usr/bin/git-shell

Does anyone get it works?

from shell-bot.

mildsunrise avatar mildsunrise commented on September 16, 2024

Update! A while ago I disabled interactive mode by default, because some shells (such as fish) are buggy with it.

If you want aliases to work, you have to enable interactive mode with /setinteractive :)

from shell-bot.

marcuzz0 avatar marcuzz0 commented on September 16, 2024

Hi,

is it possible to set an alias for a command without typing "/r command" each time but only "command"?
For example instead of "/r ls" only "ls"?

from shell-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.