Coder Social home page Coder Social logo

.bashcustomizations's Introduction

bashCustomizations

Custom bashrc files and aliases.

Table Of Content

Getting Started and Installation

  • Clone the repository.

    cd ~ && git clone https://github.com/debaraj-barua/.bashCustomizations.git
  • Add the lines below to your .bashrc file. If you do not need any functionality, comment or remove that particular line.

    # ---------------------------------------------------------------------------------------
    # bashCustomizations
    
    if [  -d "$HOME"/.bashCustomizations/ ]; then
      # npm functionalities
      . "$HOME"/.bashCustomizations/package_specific_functionalities/bashrc_npm.bash
    
      # git functionalities
      . "$HOME"/.bashCustomizations/package_specific_functionalities/bashrc_git.bash
    
      # conda with ros functionalities
      . "$HOME"/.bashCustomizations/package_specific_functionalities/conda_with_ros.bash
    
      # generic aliases
      . "$HOME"/.bashCustomizations/aliases/generic_aliases.bash
    
      # docker aliases
      . "$HOME"/.bashCustomizations/aliases/docker_aliases.bash
    
      # shorten prompt alias
      . "$HOME"/.bashCustomizations/aliases/shorterPrompt.bash
    fi
    # ---------------------------------------------------------------------------------------
    

[Note] Using Conda with ROS Functionality

This has been taken from StefanFabian's gist

  1. Remove the line that adds the anaconda bin folder to your PATH in the ~/.bashrc file (if you've let anaconda add itself to the PATH during installation)
  2. Change _ROS_CONDA_PATH in conda_with_ros file @line 23 to the path of your Anaconda bin folder (if you didn't install it to ~/anaconda3)
  3. Add the scripts mentioned above before any ROS setup bash files are sourced.

[Note] Random

In addition to useful bash scripts, the random directory has a list of known issues, workarounds and scripts not related to bash.

How To Use

Aliases Defined

                                                        Command                                                                 Alias             
Get rid of command not found:
cd.. cd ..
Quicker change directory:
cd .. ..
cd ../.. ...
cd ../../.. ....
cd ../../../.. .....
Resume wget by default:
wget -c wget
Restart network-manager:
sudo service network-manager restart net-restart
Quicker apt commands:
sudo apt update a-update
sudo apt upgrade a-upgrade
sudo apt install a-install
What does your gut say:
gut echo ACCORDING TO MY GUT: && echo && git
Using Anaconda with ROS:
activate anaconda environment release-the-snake
deactivate anaconda environment cage-the-snake
Docker Aliases:
Clean all docker containers clean-docker
Run docker container interactively dockerRunInteractive
Shorten Prompt:
shorten prompt <user>:<pwd basename> short-prompt
long prompt <user>@host:<pwd> long-prompt
Node Aliases:
Clean npm project clean-node

Package Specific Functionalities

Git

  • Update prompt when in a git repository.
  • Add branch details to prompt.
  • Prompts updated according to git status
    • '*' for un-staged changes
    • '+' for staged changes
    • '$' if something is stashed
    • '%' if there are any un-tracked files

Node Package Manager (npm)

  • Add functionality to enable auto complete features for npm cli.
  • Sets npm install path to home

Using Anaconda with ROS

  • As described before, this enables usage of anaconda for ROS users without running into conflicts.
  • Enable and disable conda environments via the aliases mentioned in the table above.
  • Updates the prompt to add conda identifier.

.bashcustomizations's People

Contributors

debaraj-barua avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

.bashcustomizations's Issues

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.