Consistent indenting for .fish files
This commit is contained in:
parent
ce52fc5aff
commit
d5b9a71d71
18 changed files with 106 additions and 93 deletions
|
@ -1,5 +1,5 @@
|
||||||
# To work around mpv not liking locales that use , as a decimal separator
|
# To work around mpv not liking locales that use , as a decimal separator
|
||||||
function mpv
|
function mpv
|
||||||
set -x LC_ALL C
|
set -lx LC_ALL C
|
||||||
command mpv $argv
|
command mpv $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,8 +10,7 @@ function prompt_pwd --description 'Print the current working directory'
|
||||||
|
|
||||||
# Replace $HOME with "~"
|
# Replace $HOME with "~"
|
||||||
set realhome ~
|
set realhome ~
|
||||||
set -l tmp (string replace -r '^'"$realhome"'($|/)' '~$1' $PWD)
|
set -l tmp (basename (string replace -r '^'"$realhome"'($|/)' '~$1' $PWD))
|
||||||
set tmp (basename $tmp)
|
|
||||||
|
|
||||||
test $PWD = "/$tmp"
|
test $PWD = "/$tmp"
|
||||||
and set tmp $PWD
|
and set tmp $PWD
|
||||||
|
|
14
config/fish/functions/pws.fish
Normal file
14
config/fish/functions/pws.fish
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
function pws
|
||||||
|
set -l clipboard
|
||||||
|
if type -q pbcopy
|
||||||
|
set clipboard pbcopy
|
||||||
|
else if type -q xclip
|
||||||
|
set clipboard xclip
|
||||||
|
else
|
||||||
|
echo "No clipboard handler found!"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
cryptopassphrase -k ~/.scrypt-pwgen-server.key $argv \
|
||||||
|
| tr -d '\n' | $clipboard
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue