[PYTHON] Prompt to give a synonym for each login

Forcibly use it in Python2 system.

Installation

curl -kL https://bootstrap.pypa.io/get-pip.py | python
pip install regalias
#Beware of updates for Python2
sed -i -E "s/      allow_abbrev=False\)  # yapf: disable/      \)/" /usr/lib/python2.7/site-packages/regalias/__main__.py

16.4. argparse — Parser for command line options, arguments and subcommands — Python 3.6.1 documentation

Changed in version 3.5: The allow_abbrev argument was added.

Since it is not 2.7, it works by deleting it. As a side effect of forcibly moving, it is a pity that the return value remains a Unicode character string at the time of fixed generation of a synonym that passed an argument (name).

prompt

function fish_right_prompt
    if [ $status -eq 0 ]
        set_color magenta
        echo "(゚*)  "
    else
        set_color blue
        echo "(=ω=.) "
    end
    if not set -q __fish_prompt_regalias
        #If you don't make it global, it will change every time
        set -g __fish_prompt_regalias (regalias)
    end
    set_color cyan
    echo "$__fish_prompt_regalias"
    set_color yellow
    echo -n $USER
    set_color normal
    echo -n '@'
    set_color red
    hostname
end

I've been playing with the right prompt recently, but I'm not sure what to put in.

penctions.gif

Even for identification when it is fully opened with play elements.

Recommended Posts

Prompt to give a synonym for each login
Give a title to the ipywidgets tab
AtCoder writer I wrote a script to aggregate the contests for each writer
How to write a ShellScript Bash for statement
[Wagtail] Add a login page to the Wagtail project
Create a dataset of images to use for learning
I want to give a group_id to a pandas data frame
Build a python environment for each directory with pyenv-virtualenv
[Go] How to create a custom error for Sentry
[Introduction to python] A high-speed introduction to Python for busy C ++ programmers
How to create a local repository for Linux OS
Convenient to use matplotlib subplots in a for statement
How to build a development environment for TensorFlow (1.0.0) (Mac)
I tried a simple RPA for login with selenium