remove trailing newlines, infinite histsize
This commit is contained in:
parent
dfae0bb587
commit
33f4648c23
4 changed files with 8 additions and 4 deletions
|
@ -10,4 +10,5 @@ snippet=$(ls "$snippets" | menu "Snippet:")
|
||||||
[ -z "$snippet" ] && exit
|
[ -z "$snippet" ] && exit
|
||||||
|
|
||||||
# Copy to clipboard and notify otherwise
|
# Copy to clipboard and notify otherwise
|
||||||
cat "$snippets"/"$snippet" | xsel -ib && notify-send "Snippet" "'$snippet' copied to clipboard!"
|
printf '%s' "$(cat $snippets/$snippet)" |
|
||||||
|
xsel -ib && notify-send "Snippet" "'$snippet' copied to clipboard!"
|
||||||
|
|
|
@ -6,7 +6,7 @@ alias \
|
||||||
cfg="cd $HOME/.config/ && ls" \
|
cfg="cd $HOME/.config/ && ls" \
|
||||||
tmp="cd $HOME/Desktop/temp/ && ls" \
|
tmp="cd $HOME/Desktop/temp/ && ls" \
|
||||||
dsk="cd $HOME/Desktop/ && ls" \
|
dsk="cd $HOME/Desktop/ && ls" \
|
||||||
prj="cd $HOME/Documents/projects/ && ls" \
|
prj="cd $HOME/Desktop/projects/ && ls" \
|
||||||
doc="cd $HOME/Documents/ && ls" \
|
doc="cd $HOME/Documents/ && ls" \
|
||||||
dow="cd $HOME/Downloads/ && ls" \
|
dow="cd $HOME/Downloads/ && ls" \
|
||||||
mus="cd $HOME/Music/ && ls" \
|
mus="cd $HOME/Music/ && ls" \
|
||||||
|
|
|
@ -10,6 +10,8 @@ PATH="$HOME/.local/bin${PATH:+:${PATH}}"
|
||||||
|
|
||||||
# Common
|
# Common
|
||||||
export \
|
export \
|
||||||
|
HISTIZE= \
|
||||||
|
HISTFILESIZE= \
|
||||||
GITLAB="ssh://git@gitlab.com/tavo-wasd" \
|
GITLAB="ssh://git@gitlab.com/tavo-wasd" \
|
||||||
BOOKMARKS="$HOME/Documents/bookmarks" \
|
BOOKMARKS="$HOME/Documents/bookmarks" \
|
||||||
BIB="$HOME/Documents/bibliography" \
|
BIB="$HOME/Documents/bibliography" \
|
||||||
|
|
|
@ -24,9 +24,10 @@ fi
|
||||||
|
|
||||||
# Copy output of a command
|
# Copy output of a command
|
||||||
copy_history() {
|
copy_history() {
|
||||||
|
HISTTIMEFORMAT="%F %T "
|
||||||
history |
|
history |
|
||||||
|
head -n -1 |
|
||||||
fzf --cycle --height=50% --border top --tac --prompt='⯈ ' |
|
fzf --cycle --height=50% --border top --tac --prompt='⯈ ' |
|
||||||
sed 's/^\s*[0-9]*\s*//g' |
|
sed -z 's/^.*:[0-9]*\s*//g;s/\s*$//g' |
|
||||||
tr -d '\n' |
|
|
||||||
xsel -ib
|
xsel -ib
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue