summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-01-27 15:27:39 +0100
committerMarc Vertes <mvertes@free.fr>2025-01-27 15:27:39 +0100
commit36f68f4b7390defbb45ce3f2cc48840e4c52f0a2 (patch)
treeb05105d8de602fbaba1e6a70e680fc8e7394d223
parent5408fd4eaac7c8ee8fcfcdf08e5d375378ce1a78 (diff)
fixup
-rw-r--r--.bashrc7
-rw-r--r--.vimrc2
-rwxr-xr-xbin/open8
3 files changed, 13 insertions, 4 deletions
diff --git a/.bashrc b/.bashrc
index 36a7139..85b53b4 100644
--- a/.bashrc
+++ b/.bashrc
@@ -30,13 +30,13 @@ case $(uname -o) in
alias ls='ls -GF'
alias ll='ls -AlGFhv'
alias ldd='otool -L'
- trap 'printf "\e]2;${PWD/~/\~}: ${BASH_COMMAND/update_terminal_cwd/bash}\a"' DEBUG
+ trap 'printf "\e]2;${PWD/~/\~} ${BASH_COMMAND%update_terminal_cwd}\a"' DEBUG
;;
(GNU/Linux|Linux)
export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
alias ls='ls --color=auto -v'
alias ll='ls -AlFhv'
- [ -f /etc/arch-release ] || trap 'printf "\e]2;${PWD/~/\~}:\ ${BASH_COMMAND/ps1/bash}\a"' DEBUG
+ [ -f /etc/arch-release ] || trap 'printf "\e]2;${PWD/~/\~} ${BASH_COMMAND%ps1}\a"' DEBUG
;;
esac
@@ -69,6 +69,7 @@ alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date
#alias cl='cf xft:Mono:size=12'
#alias cp='cp --reflink'
+alias grep='grep -i --color'
alias more='less'
alias vi='vim'
alias view='vim -R'
@@ -167,4 +168,4 @@ meteo() {
#bind -m vi-command 'Control-l: clear-screen'
#bind -m vi-insert 'Control-l: clear-screen'
-# [ -f ~/.fzf.bash ] && source ~/.fzf.bash
+[ -f ~/.fzf.bash ] && source ~/.fzf.bash
diff --git a/.vimrc b/.vimrc
index 1327e1a..f95f935 100644
--- a/.vimrc
+++ b/.vimrc
@@ -86,7 +86,7 @@ hi SpellBad gui=undercurl
noremap <leader>n :bn<cr>
noremap <leader><leader> :bd<cr>
-noremap <leader>o :!xdg-open <cWORD>&<cr><cr>
+noremap <leader>o :!open <cWORD>&<cr><cr>
noremap <C-g> :tag <c-r><c-w><cr>
noremap <C-p> :Files<cr>
diff --git a/bin/open b/bin/open
new file mode 100755
index 0000000..aa5bfb2
--- /dev/null
+++ b/bin/open
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+case $(uname -s) in
+(Darwin)
+ exec /usr/bin/open "$@" ;;
+(*)
+ exec xdg_open "$@" >/dev/null 2>&1 </dev/null & ;;
+esac