Stop trapping SIGINT to allow further use of Ctrl+C once lfcd is closed (#1231)
* Avoid expansion of file path containing spaces * Do not trap INT signal on lfcd * Untrap to stop trapping once lfcd quit * Revert "Avoid expansion of file path containing spaces" This reverts commit edcccf8f1bb0eb283aa332dc3a2d2b431eb6d189. * Trap SIGINT again
This commit is contained in:
parent
75bc064a2f
commit
d6616cf08b
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
|
|||
# Use lf to switch directories and bind it to ctrl-o
|
||||
lfcd () {
|
||||
tmp="$(mktemp -uq)"
|
||||
trap 'rm -f $tmp >/dev/null 2>&1' HUP INT QUIT TERM PWR EXIT
|
||||
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
|
||||
lf -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
|
|
Loading…
Reference in a new issue