This commit is contained in:
Gokcehan committed 2020-12-24 02:28:25 +03:00
1 parent e7f5f90b0c
commit eedcc258c2
4 files changed
+39 -36

No files matched your search

+10 -7
View File
@@ -1,12 +1,15 @@
# Autocompletion for tcsh shell.
#
# For using these completions you must load it from .tcshrc
# You need to either copy the content of this file to your shell rc file
# (e.g. ~/.tcshrc) or source this file directly:
#
# source ~/.config/lf/lf.csh
# set LF_COMPLETE = "/path/to/lf.csh"
# if ( -f "$LF_COMPLETE" ) then
# source "$LF_COMPLETE"
# endif
#
set lf_args = "-command -cpuprofile -doc --help -last-dir-path -memprofile -remote -selection-path -server -version --version"
uncomplete lf
uncomplete lfcd
set LF_ARGS = "-command -cpuprofile -doc -last-dir-path -memprofile -remote -selection-path -server -version -help "
complete lf "C/-*/(${lf_args})/"
complete lfcd "C/-*/(${lf_args})/"
complete lf "C/-*/(${LF_ARGS})/"
complete lfcd "C/-*/(${LF_ARGS})/"
+19 -20
View File
@@ -1,29 +1,28 @@
#compdef lf
# For using these completions you must:
# - rename this file to _lf
# - add the containing folder to $fpath in .zshrc, like this:
# '''
# fpath=(/path/to/folder/containing_lf $fpath)
# autoload -U compinit
# compinit
# '''
# Autocompletion for zsh shell.
#
# zsh completions for 'lf'
# automatically generated with http://github.com/RobSis/zsh-completion-generator
# You need to rename this file to _lf and add containing folder to $fpath in
# ~/.zshrc file:
#
# fpath=(/path/to/directory/containing/the/file $fpath)
# autoload -U compinit
# compinit
#
local arguments
arguments=(
'-command[command to execute on client initialization]'
'-cpuprofile[path to the file to write the CPU profile]'
'-doc[show documentation]'
'-last-dir-path[path to the file to write the last dir on exit (to use for cd)]'
'-memprofile[path to the file to write the memory profile]'
'-remote[send remote command to server]'
'-selection-path[path to the file to write selected files on open (to use as open file dialog)]'
'-server[start server (automatic)]'
'-version[show version]'
'*:filename:_files'
'-command[command to execute on client initialization]'
'-cpuprofile[path to the file to write the CPU profile]'
'-doc[show documentation]'
'-last-dir-path[path to the file to write the last dir on exit (to use for cd)]'
'-memprofile[path to the file to write the memory profile]'
'-remote[send remote command to server]'
'-selection-path[path to the file to write selected files on open (to use as open file dialog)]'
'-server[start server (automatic)]'
'-version[show version]'
'*:filename:_files'
)
_arguments -s $arguments
+8 -7
View File
@@ -1,13 +1,14 @@
# Change working dir in shell to last dir in lf on exit.
# Change working dir in tcsh to last dir in lf on exit (adapted from ranger).
#
# You need to either copy the content of this file to your shell rc file
# (e.g. ~/.tcshrc) or source this file directly:
# You need to either copy the content of this file to your shell rc file (e.g.
# ~/.tcshrc) or source this file directly:
#
# setenv LF_HOME "${HOME}/.config/lf"
# [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
# setenv LF_HOME "${HOME}/.config/lf"
# [ -e "${LF_HOME}/lfcd.csh" ] && source "${LF_HOME}/lfcd.csh"
#
# You may also like to assign a key to this command:
# You may also like to assign a key to this command:
#
# bindkey -c "^O" lfcd
# bindkey -c "^O" lfcd
#
alias lfcd 'set _=`mktemp` && lf -last-dir-path=$_ "\!*" && set _=`cat $_ && rm -f $_` && [ -d "$_" ] && cd "$_"'
+2 -2
View File
@@ -4,14 +4,14 @@
#
# You may also like to assign a key to this command:
#
# You may put this in one of the profiles found in $PROFILE.
#
# Set-PSReadLineKeyHandler -Chord Ctrl+o -ScriptBlock {
# [Microsoft.PowerShell.PSConsoleReadLine]::RevertLine()
# [Microsoft.PowerShell.PSConsoleReadLine]::Insert('lfcd.ps1')
# [Microsoft.PowerShell.PSConsoleReadLine]::AcceptLine()
# }
#
# You may put this in one of the profiles found in $PROFILE.
#
$tmp = [System.IO.Path]::GetTempFileName()
lf -last-dir-path="$tmp" $args