Tuesday, January 21, 2014

How To Luch Cygwin Shell with bash

The Issue

I have been bothered by Cygwin launching my my default shell as /usr/bin/sh. One big reason I don't like sh is that it does not have auto expand function, which to me is a life and death issue. So I decided to fix it. First of all, you may ask this question:
How do I know which shell I am running? It is a very good question, but the answer is simple. with the following command:
   ps -eaf
You should see the following:
# ps -eaf
     UID     PID    PPID TTY     STIME COMMAND
    gliu   12188       1   ?  14:34:09 /usr/bin/mintty
    gliu   11764   12188   0  14:34:09 /usr/bin/sh
    gliu   12192   11764   0  14:39:53 /usr/bin/ps

Solution

The reason for the problem I am having is that I didn't have the environment variable "SHELL" defined. Thus the solution is to add this variable in windows. Create a new environment variable SHELL with value of:
   /usr/bin/bash


Addtional

You can launch window's system properties editor by using WinKey + Pause/Break. Here are some interesting window keyboard shortcuts I use daily:
Windows Logo: Start menu
Windows Logo+R: Run dialog box
Windows Logo+M: Minimize all
SHIFT+Windows Logo+M: Undo minimize all
Windows Logo+F1: Help
Windows Logo+E: Windows Explorer
Windows Logo+F: Find files or folders
Windows Logo+D: Minimizes all open windows and displays the desktop
CTRL+Windows Logo+F: Find computer
CTRL+Windows Logo+TAB: Moves focus from Start, to the Quick Launch toolbar, to the system tray (use RIGHT ARROW or LEFT ARROW to move focus to items on the Quick Launch toolbar and the system tray)
Windows Logo+TAB: Cycle through taskbar buttons
Windows Logo+Break: System Properties dialog box
Application key: Displays a shortcut menu for the selected item

No comments:

Post a Comment

Anypoint Studio Error: The project is missing Munit lIbrary to run tests

Anypoint Studio 7.9 has a bug. Even if we following the article: https://help.mulesoft.com/s/article/The-project-is-missing-MUnit-libraries-...