这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bash/aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash

export DESKTOP="/mnt/c/Users/guilh/Desktop"
export BROWSER="/mnt/c/Program\ Files/Mozilla\ Firefox/firefox.exe"

Expand Down
9 changes: 5 additions & 4 deletions bash/autocomplete/config.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

_config() {
local wordList=$(config --bash-completion)
local curw=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=($(compgen -W '${wordList[@]}' -- "$curw"))
wordList=$(config --bash-completion)
curw=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=("$(compgen -W "${wordList[@]}" -- "$curw")")
return 0
}

# Complete config commands
complete -F _config config
2 changes: 2 additions & 0 deletions bash/autocomplete/gh.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# autocomplete for gh
if type gh &>/dev/null; then
eval "$(gh completion -s bash)"
Expand Down
10 changes: 6 additions & 4 deletions bash/autocomplete/mark.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/bash

_mark() {
local curw=${COMP_WORDS[COMP_CWORD]}
local wordlist=$(find $MARKPATH -type l -printf "%f\n")
COMPREPLY=($(compgen -W '${wordlist[@]}' -- "$curw"))
curw=${COMP_WORDS[COMP_CWORD]}
wordlist=$(find $MARKPATH -type l -printf "%f\n")
COMPREPLY=("$(compgen -W "${wordlist[@]}" -- "$curw")")
return 0
}

# Complete marks commands
complete -F _mark jump unmark cpmark vmark workspace
complete -F _mark jump unmark cpmark ws
9 changes: 0 additions & 9 deletions bash/autocomplete/recall.sh

This file was deleted.

3 changes: 2 additions & 1 deletion bash/colors.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash

# Color Syntax:
#
# '\[\e[x;ym $ \e[m\]'
Expand Down
2 changes: 2 additions & 0 deletions bash/editor.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# remap capslock for whole system to ESC (X only)
if [ -n "${DISPLAY}" ]; then
setxkbmap -option caps:escape
Expand Down
2 changes: 2 additions & 0 deletions bash/history.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# vi or die
set -o vi

Expand Down
2 changes: 2 additions & 0 deletions bash/interactive.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

# If not running interactively, don't do anything
case $- in
*i*) ;;
Expand Down
2 changes: 2 additions & 0 deletions bash/man-color.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

export LESS_TERMCAP_md=$'\e[01;31m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_us=$'\e[01;32m'
Expand Down
2 changes: 2 additions & 0 deletions bash/path.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

export RECALLPATH=$HOME/notes/recall
export MARKPATH=$HOME/.marks

Expand Down
3 changes: 2 additions & 1 deletion bash/ps1.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/bin/bash

parse_git_branch() {
git_folder=./.git
if [ -d $git_folder ]; then
Expand Down
2 changes: 2 additions & 0 deletions bash/settings.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

shopt -s checkwinsize
shopt -s expand_aliases
shopt -s globstar
Expand Down