Compare commits

...

4 commits

Author SHA1 Message Date
Benjamin Bädorf 8bd7474651
Fix blesh hash
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-24 18:33:13 +01:00
Benjamin Bädorf 5f3dc81f73
Explain option for paperless 2023-02-24 18:33:01 +01:00
Benjamin Bädorf 2468acd8e0
Update flake lock 2023-02-24 18:32:36 +01:00
teutat3s 9167cc0054
bash: disable ble.sh history share
complete on first TAB if there's a single matching filename
with show-all-if-ambiguous on

enable history search with arrow up after starting to type a command
2023-02-24 18:10:03 +01:00
4 changed files with 36 additions and 31 deletions

View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1675176355,
"narHash": "sha256-Qjxh5cmN56siY97mzmBLI1+cdjXSPqmfPVsKxBvHmwI=",
"lastModified": 1677126346,
"narHash": "sha256-4s+PPGC1M07QsPyeye5drc2JLa1lhDnCV3XAsG8+pH4=",
"owner": "ryantm",
"repo": "agenix",
"rev": "b7ffcfe77f817d9ee992640ba1f270718d197f28",
"rev": "c2a71c83c70844c5e31db69347e86af080bcdad0",
"type": "github"
},
"original": {
@ -324,11 +324,11 @@
"utils": "utils_2"
},
"locked": {
"lastModified": 1674440933,
"narHash": "sha256-CASRcD/rK3fn5vUCti3jzry7zi0GsqRsBohNq9wPgLs=",
"lastModified": 1676257154,
"narHash": "sha256-eW3jymNLpdxS5fkp9NWKyNtgL0Gqtgg1vCTofKXDF1g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "65c47ced082e3353113614f77b1bc18822dc731f",
"rev": "2cb27c79117a2a75ff3416c3199a2dc57af6a527",
"type": "github"
},
"original": {
@ -340,11 +340,11 @@
},
"latest": {
"locked": {
"lastModified": 1675763311,
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
"lastModified": 1677063315,
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2",
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
"type": "github"
},
"original": {
@ -356,11 +356,11 @@
},
"master": {
"locked": {
"lastModified": 1675871537,
"narHash": "sha256-zx7BDeAGI2M19pRs2pmCuYp4W1CNC3QQSIU1BtcvaIY=",
"lastModified": 1677244726,
"narHash": "sha256-lwzie+EgYjPianeH82eb0mEDPOmOcXqlOR5lBZ7dkkM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "94a6a5c81a232a98c6df0977ab16019d759135e5",
"rev": "566169a4eaca1513d4fd396c239367b869fcdb0c",
"type": "github"
},
"original": {
@ -387,11 +387,11 @@
},
"nixos": {
"locked": {
"lastModified": 1675757258,
"narHash": "sha256-pIRer8vdsoherlRKpzfnHbMZ5TsAcvRlXHCIaHkIUbg=",
"lastModified": 1677075010,
"narHash": "sha256-X+UmR1AkdR//lPVcShmLy8p1n857IGf7y+cyCArp8bU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "af96094e9b8eb162d70a84fa3b39f4b7a8b264d2",
"rev": "c95bf18beba4290af25c60cbaaceea1110d0f727",
"type": "github"
},
"original": {
@ -407,11 +407,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1674666581,
"narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
"lastModified": 1676297861,
"narHash": "sha256-YECUmK34xzg0IERpnbCnaO6z6YgfecJlstMWX7dqOZ8=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
"rev": "1e0a05219f2a557d4622bc38f542abb360518795",
"type": "github"
},
"original": {
@ -422,11 +422,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1675785029,
"narHash": "sha256-EoD3Wgqc0XWkBCwUrAxCIZett64jN/SEPPpXX2mCmrE=",
"lastModified": 1677232326,
"narHash": "sha256-rAk2/80kLvA3yIMmSV86T1B4kNvwCFMSQ1FxXndaUB0=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "16b6928ec622fd2356a80c0a9359eb350a94227d",
"rev": "2d44015779cced4eec9df5b8dab238b9f6312cb2",
"type": "github"
},
"original": {

View file

@ -56,6 +56,8 @@ in {
Here, the scannerDevice is `hp3900:libusb:005:002`.
'';
type = types.str;
example = "hp3900:libusb:005:002";
default = "";
};
};

View file

@ -27,33 +27,36 @@ in {
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
bind 'set show-all-if-ambiguous on'
# Syntax highlighting, auto suggestions, vim modes, etc.
# https://github.com/akinomyoga/ble.sh/wiki/Manual-A1-Installation#user-content-nixpkgs
source "$(blesh-share)" --attach=none
# ctrl + space to accept autocomplete suggestion
ble-bind -m 'auto_complete' -f 'C-@' 'auto_complete/insert-on-end'
# Meta (Alt) + Backspace to delete a word
ble-bind -m 'emacs' -f 'M-C-?' 'kill-backward-cword'
ble-bind -m 'vi_imap' -f 'M-C-?' 'kill-backward-cword'
# Meta (Alt) + p to jump one word backwards
ble-bind -m 'emacs' -f M-p '@nomarked backward-cword'
ble-bind -m 'vi_imap' -f M-p '@nomarked backward-cword'
# Meta (Alt) + n to jump one word forwards
ble-bind -m 'emacs' -f M-n '@nomarked forward-cword'
ble-bind -m 'vi_imap' -f M-n '@nomarked forward-cword'
# Arrow up and Ctrl + p searches history for entered input
ble-bind -f up 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -f C-p 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -m 'vi_imap' -f up 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -m 'vi_imap' -f C-p 'history-search-backward hide-status:immediate-accept:empty=emulate-readline:point=end'
# Arrow down and Ctrl + n searches history for entered input
ble-bind -f down 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -f C-n 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -m 'vi_imap' -f down 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
ble-bind -m 'vi_imap' -f C-n 'history-search-forward hide-status:immediate-accept:empty=emulate-readline:point=end'
function my/complete-load-hook {
bleopt complete_auto_delay=300
bleopt complete_auto_delay=500
}
blehook/eval-after-load complete my/complete-load-hook
bleopt exec_errexit_mark=
bleopt history_share=1
bleopt filename_ls_colors="$LS_COLORS"
bleopt complete_menu_style=desc-raw
# Bash vim mode keybindings
if [[ $- == *i* ]]; then # in interactive session
set -o vi

View file

@ -5,7 +5,7 @@ final: prev: {
owner = "akinomyoga";
repo = "ble.sh";
rev = "0ceb0cb38157c2c37650ffb069098783338eb02c";
hash = "sha256-f3w3gHKysRafBGcZbCPUvy9e/fOrQc9TBZAjb0ioxpo=";
hash = "sha256-e/CetIdKuc8fhZp1v+SzOBwkZn8o1g5SjaF74Ir1daI=";
fetchSubmodules = true;
leaveDotGit = true;
};