mirror of
				https://github.com/nmasur/dotfiles
				synced 2025-10-30 15:03:17 +00:00 
			
		
		
		
	clean up aliases and remove pyenv
This commit is contained in:
		| @@ -34,7 +34,6 @@ if status --is-interactive | ||||
|  | ||||
|     # Individual features | ||||
|     aliases | ||||
|     pyenv | ||||
|     notes | ||||
|     awstools | ||||
|     mactools | ||||
|   | ||||
| @@ -12,6 +12,7 @@ function aliases --description 'All aliases' | ||||
|     # Tmux | ||||
|     abbr -a ta 'tmux attach-session' | ||||
|     abbr -a tan 'tmux attach-session -t noah' | ||||
|     abbr -a tnn 'tmux new-session -s noah' | ||||
|  | ||||
|     # Git | ||||
|     abbr -a gs 'git status -sb' | ||||
| @@ -53,12 +54,19 @@ function aliases --description 'All aliases' | ||||
|     abbr -a h 'http -Fh --all'                  # Curl site for headers | ||||
|  | ||||
|     # Fun CLI Tools | ||||
|     alias search='googler -j' | ||||
|     alias checkip='curl checkip.amazonaws.com' | ||||
|     abbr goo 'googler' | ||||
|     abbr gooj 'googler -j' | ||||
|     alias weather='curl wttr.in' | ||||
|     alias moon='curl wttr.in/Moon' | ||||
|     alias ipinfo='curl ipinfo.io' | ||||
|     alias worldmap='telnet mapscii.me' | ||||
|     function ip | ||||
|         if count $argv > /dev/null | ||||
|             curl ipinfo.io/$argv | ||||
|         else | ||||
|             curl checkip.amazonaws.com | ||||
|         end | ||||
|     end | ||||
|     function qr | ||||
|         qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png | ||||
|     end | ||||
| @@ -74,8 +82,8 @@ function aliases --description 'All aliases' | ||||
|     # Cheat Sheets | ||||
|     abbr -a ssl 'openssl req -new -newkey rsa:2048 -nodes' \ | ||||
|                 '-keyout server.key -out server.csr' | ||||
|     abbr -a get-fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -' | ||||
|     abbr -a public-key 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub' | ||||
|     abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -' | ||||
|     abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub' | ||||
|  | ||||
|     # Docker | ||||
|     abbr -a dc '$DOTS/bin/docker_cleanup' | ||||
| @@ -89,6 +97,7 @@ function aliases --description 'All aliases' | ||||
|  | ||||
|     # Terraform | ||||
|     abbr -a te 'terraform' | ||||
|     abbr -a tap 'terraform apply' | ||||
|  | ||||
|     # Kubernetes | ||||
|     abbr -a k 'kubectl' | ||||
|   | ||||
| @@ -1,32 +0,0 @@ | ||||
| #!/usr/local/bin/fish | ||||
|  | ||||
| function 'pyenv' --description 'Features for Pyenv virtualenvs' | ||||
|  | ||||
|     abbr -a d 'deactivate' | ||||
|     alias pv='cd $PYENV_VERSIONS_DIR' | ||||
|     alias ip='source $PYENV_VERSIONS_DIR/ipython/bin/activate.fish' | ||||
|  | ||||
|     function 'venv' --description 'Enter a pyenv virtualenv' | ||||
|         source ~/.pyenv/versions/$argv[1]/bin/activate.fish | ||||
|     end | ||||
|  | ||||
|     # vers - switch to pyenv virtualenv with fuzzy menu | ||||
|     function 'vers' --description 'Switch to virtualenv' | ||||
|         set pyversion (bash -c "pyenv versions --bare --skip-aliases" | fzf) | ||||
|         if test $status -ne 0 | ||||
|             return 1 | ||||
|         else | ||||
|             source "$PYENV_VERSIONS_DIR/$pyversion/bin/activate.fish" | ||||
|         end | ||||
|     end | ||||
|  | ||||
|     function 'ipy' --description 'Borrow iPython interpreter' | ||||
|         set STORED_VENV $VIRTUAL_ENV | ||||
|         source $PYENV_VERSIONS_DIR/ipython/bin/activate.fish; and \ | ||||
|             ipython; and \ | ||||
|             deactivate; and \ | ||||
|             if [ $STORED_VENV ]; | ||||
|                 source $STORED_VENV/bin/activate.fish | ||||
|             end | ||||
|     end | ||||
| end | ||||
		Reference in New Issue
	
	Block a user