From b8d56ee0835e968ca4441438f4cc440eb10ceebd Mon Sep 17 00:00:00 2001 From: bretello Date: Sat, 9 Oct 2021 00:18:10 +0200 Subject: [PATCH] cleanup --- README.md | 15 +-------------- functions.zsh | 30 ++---------------------------- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index e539f79..2fb2779 100644 --- a/README.md +++ b/README.md @@ -91,20 +91,7 @@ in your `.zshrc`. This requires antibody installed. color $Red "This will be printed in red" color $Yellow "This will be printed in red" -4. `mecp` to copy files back to the machine from wich you are ssh-ing. - For this to work an ssh tunnel with `Remoteforward` is needed: - - ssh -R 22:localhost:2222 YOURHOSTNAMEHERE - - or specify this in `~/.ssh/config` for a persistent configuration: - - Host YOURHOSTNAMEHERE - Remoteforward 2222 localhost:22 - - This can be enabled in `~/.ssh/config` globally for all hosts by uncommenting the relevant `Host * Remoteforward`. - You might have to manually edit the username in the `mecp` definition in `functions.sh` if this is - different between the two machines. `mecp` copies by default on the local machine on `~/Desktop/` - +4. `git fixup` (`git-fixup`) to create a fixup command and immediately rebase it 5. Many more. Use `list_functions` to list defined functions and a small description ### Files/Folders diff --git a/functions.zsh b/functions.zsh index 28f743a..6032254 100755 --- a/functions.zsh +++ b/functions.zsh @@ -44,13 +44,6 @@ function calc awk "BEGIN { print $* }" } -## Make new directory and cd to that directory. Usage: mcd newfolder -function mcd -{ - mkdir -p "$1" - cd $1 -} - ## Print full path of item in current directory function ppath { @@ -105,12 +98,7 @@ function httpserver echo "Starting webserver in $PWD/" fi open "http://localhost:8000" &>/dev/null & - if [[ "$(command -v python3)" ]]; then - python=python3 - else - python=python - fi - $python -m http.server 8000 + python -m http.server 8000 ) } alias webserver='httpserver' @@ -171,24 +159,10 @@ function genpwd } -if [[ "$(uname)" == "Darwin" ]]; then - ## Copy output of previous command to termbin.com (command line pastebin) and put in in clipboard - function termbin - { - nc termbin.com 9999 | pbcopy && echo -n "$(pbpaste) --> in clipboard" - } -else - ## Copy output of previous command to termbin.com (command line pastebin) - function termbin - { - nc termbin.com 9999 - } -fi - ## List defined functions in $DOTFILES/functions.sh function list_functions { - grep --color=no -A 1 '^##' $DOTFILES/functions.sh | sed -E 's/function (.*)/\1/g' + grep --color=no -A 1 '^##' $DOTFILES/functions.zsh | sed -E 's/function (.*)/\1/g' }