forked from CodelyTV/dotly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
207f1a5
commit 689f51a
Showing
16 changed files
with
58 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,4 @@ source "$DOTFILES_PATH/scripts/core/_main.sh" | |
##? Usage: | ||
##? git-co <thing> | ||
|
||
docs::eval "$@" | ||
|
||
git checkout $thing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,4 @@ source "$DOTFILES_PATH/scripts/core/_main.sh" | |
##? Usage: | ||
##? git-undo | ||
|
||
docs::eval "$@" | ||
|
||
git reset HEAD~1 --mixed |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
function cdd() { | ||
cd "$(ls -d -- */ | fzf)" || echo "Invalid directory" | ||
} | ||
|
||
function j() { | ||
fname=$(declare -f -F _z) | ||
|
||
[ -n "$fname" ] || source "$DOTFILES_PATH/modules/z/z.sh" | ||
|
||
_z "$1" | ||
} | ||
|
||
function recent_dirs() { | ||
# This script depends on pushd. It works better with autopush enabled in ZSH | ||
escaped_home=$(echo $HOME | sed 's/\//\\\//g') | ||
selected=$(dirs -p | sort -u | fzf) | ||
|
||
cd "$(echo "$selected" | sed "s/\~/$escaped_home/")" || echo "Invalid directory" | ||
} | ||
|
||
reverse-search() { | ||
local selected num | ||
setopt localoptions noglobsubst noposixbuiltins pipefail HIST_FIND_NO_DUPS 2> /dev/null | ||
|
||
selected=( $(fc -rl 1 | | ||
FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m" fzf) ) | ||
local ret=$? | ||
if [ -n "$selected" ]; then | ||
num=$selected[1] | ||
if [ -n "$num" ]; then | ||
zle vi-fetch-history -n $num | ||
fi | ||
fi | ||
zle redisplay | ||
typeset -f zle-line-init >/dev/null && zle zle-line-init | ||
return $ret | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# This is a useful file to have the same aliases/functions in bash and zsh | ||
|
||
# Enable aliases to be sudo’ed | ||
alias sudo='sudo ' | ||
|
||
# Register custom aliases and functions | ||
for aliasToSource in "$DOTFILES_PATH/shell/_aliases/"*; do source "$aliasToSource"; done | ||
for exportToSource in "$DOTFILES_PATH/shell/_exports/"*; do source "$exportToSource"; done | ||
for functionToSource in "$DOTFILES_PATH/shell/_functions/"*; do source "$functionToSource"; done | ||
source "$DOTFILES_PATH/shell/aliases.sh" | ||
source "$DOTFILES_PATH/shell/exports.sh" | ||
source "$DOTFILES_PATH/shell/functions.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# All bindings can be found https://www.zsh.org/mla/users/2014/msg00266.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters