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
|
||||
|
||||
# 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" \
|
||||
tmp="cd $HOME/Desktop/temp/ && ls" \
|
||||
dsk="cd $HOME/Desktop/ && ls" \
|
||||
prj="cd $HOME/Documents/projects/ && ls" \
|
||||
prj="cd $HOME/Desktop/projects/ && ls" \
|
||||
doc="cd $HOME/Documents/ && ls" \
|
||||
dow="cd $HOME/Downloads/ && ls" \
|
||||
mus="cd $HOME/Music/ && ls" \
|
||||
|
|
|
@ -10,6 +10,8 @@ PATH="$HOME/.local/bin${PATH:+:${PATH}}"
|
|||
|
||||
# Common
|
||||
export \
|
||||
HISTIZE= \
|
||||
HISTFILESIZE= \
|
||||
GITLAB="ssh://git@gitlab.com/tavo-wasd" \
|
||||
BOOKMARKS="$HOME/Documents/bookmarks" \
|
||||
BIB="$HOME/Documents/bibliography" \
|
||||
|
|
|
@ -24,9 +24,10 @@ fi
|
|||
|
||||
# Copy output of a command
|
||||
copy_history() {
|
||||
HISTTIMEFORMAT="%F %T "
|
||||
history |
|
||||
head -n -1 |
|
||||
fzf --cycle --height=50% --border top --tac --prompt='⯈ ' |
|
||||
sed 's/^\s*[0-9]*\s*//g' |
|
||||
tr -d '\n' |
|
||||
sed -z 's/^.*:[0-9]*\s*//g;s/\s*$//g' |
|
||||
xsel -ib
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue