function pips() { echo $'\n'$1 >> requirements.txt; pip install $1 } <<<<<<< HEAD function reset_webstorm(){ cd ~/.WebStorm* rm config/eval/WebStorm*evaluation.key rm config/options/options.xml cd ~/.java/.userPrefs/jetbrains rm -rf webstorm } ======= >>>>>>> parent of 02ed9ee... WS-2017.2 /dev/null 2>&1; then echo -e "$_wrn_col""You must have the 'xclip' program installed.\e[0m" # Check user is not root (root doesn't have access to user xorg server) elif [[ "$USER" == "root" ]]; then echo -e "$_wrn_col""Must be regular user (not root) to copy a file to the clipboard.\e[0m" else # If no tty, data should be available on stdin if ! [[ "$( tty )" == /dev/* ]]; then input="$(< /dev/stdin)" # Else, fetch input from params else input="$*" fi if [ -z "$input" ]; then # If no input, print usage message. echo "Copies a string to the clipboard." echo "Usage: cb " echo " echo | cb" else # Copy input to clipboard echo -n "$input" | xclip -selection c # Truncate text for status if [ ${#input} -gt 80 ]; then input="$(echo $input | cut -c1-80)$_trn_col...\e[0m"; fi # Print status. echo -e "$_scs_col""Copied to clipboard:\e[0m $input" fi fi } function gi() { curl -L -s https://www.gitignore.io/api/\$@ ;}