Giter Club home page Giter Club logo

bash-config's Introduction

.bashrc Functions

Enhance your terminal experience with these .bashrc functions. Add file select for cd with cds, cd in terminal to the ranger current working directory on quit with rcd, open file explorer in the ranger current working directory on quit with re, and search with google in new tab in default browser with g.

Copy the text in bash-config.txt and paste into your .bashrc. Update your bash config with $. ~/.bashrc to get started

Getting Started

  1. Install ranger

sudo apt install ranger

  1. Adding Functions to .bashrc

To use these functions, you'll need to add them to your .bashrc config file.

The .bashrc file is usually found in ~/.bashrc (/home/{user}/.bashrc) Copy and paste the functions provided into the file.

  1. Reload .bashrc

Run

bash $ source ~/.bashrc

Function Descriptions and Usage

  1. cds: CD with File Selector

    Purpose: Navigate through directories or open files directly from the command line, with optional support for hidden files. Uses home row first key bindings for index selection. Usage: To use the file selector, simply type cds in your terminal. For including hidden files in the list, use cds -a.

  2. rcd: Open CWD from Ranger in Terminal

    Purpose: Launch the Ranger file explorer from the current working directory (CWD) and return to the terminal in the selected directory upon exiting Ranger. Usage: Type rcd to open Ranger. Navigate to your desired directory, then quit Ranger (:q) to change your terminal's current directory to the selected one.

  3. re: Open CWD from Ranger in Windows File Explorer

    Purpose: Similar to rcd, but opens the selected directory in Windows File Explorer, useful for WSL users. Usage: Type re to launch Ranger. Navigate and select your directory, then quit Ranger to open it in Windows File Explorer.

  4. g: Google Search

    Purpose: Perform a Google search directly from your terminal. Usage: Type g followed by your search query. Example: g openai documentation.

Customization: Feel free to adjust the key bindings or modify the commands to fit your workflow. Compatibility: These functions are designed for use in Bash on Linux or WSL. Ensure compatibility with your system before use.

bash-config's People

Contributors

gabebohlmann avatar

Watchers

 avatar

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.